C# The beginnings of a bot
Collapse
This topic is closed.
X
X
-
This example is written for the API version 6, which is due to be retired on the 1st November.
-
Originally posted by sjdev View PostI've put this on Github if anyone is interested in carrying on development? I believe the creator has left Betfair.
https://github.com/sjdweb/lignite
It compiles in Visual Studio 2012 too.
Hello, thanks for this great job, just one question, would it be possible to get version for Visual Studio 2010?
Many thanks
Leave a comment:
-
I've put this on Github if anyone is interested in carrying on development? I believe the creator has left Betfair.
https://github.com/sjdweb/lignite
It compiles in Visual Studio 2012 too.
Leave a comment:
-
Vs 2010
I am not able to get this running in VS 2010 after making the recommended changes. I keep getting :
AutoMarketLoader: Message:Object reference not set to an instance of an object.
AM$ EXCEPTION: AutoMarketLoader: Stack Trace:System.NullReferenceException: Object reference not set to an instance of an object.
at Lignite.Engine.AutoMarketLoader.LoadMarkets()
If anyone has a fix, please let me know.
Thanks
Leave a comment:
-
Hello,
i've downloaded the aplication and correct the 2 lines.
i've configured the user and passwd account, and then "Start", but nothing happens ? Am i doing something wrong ?
thanks,
jppuam
Leave a comment:
-
Starter Prog Queries
Hi Vossie and everyone else.
Thanks for all the help you have given me so far (without knowing it
)
Just started to look at C#, (although have been a developer for some time) is the example in the first post still a suitable starting point as it is a couple of years old. It works a treat in VS2010 however I thought I would check.
Also I've read this thread a few times and I was wondering if you have any documentation on how it all fits together (any documentation on what the parts in the solution explorer do and their importance), I've gone down a few blind alleys looking up XML and I think I'm slowly piecing it together. However I think I'm mixing up two ways of doing a bot. Although I have replaced (due to following the API Quickstart pdf).
<value>https://api.betfair.com/global/v3/BFapi.global.wsdl</value>
<value>https://api.betfair.com/global/v3/BFGlobalService.wsdl</value>
is this correct?
I'm also thinking of turning the UI into a browser based UI (as I'm a web developer and am not that versed in GUI apps), do you know of any problems with doing this?
thanks again for an excellent starter program.
Leave a comment:
-
Note, these are quick hack fixes just to get it building, I have no idea of the actual impact of these changes:Originally posted by nmpgaspar View PostI tried to compile it and got 4 errors.
Error 3 Cannot implicitly convert type 'int?[]' to 'int[]' : Betfair.API.cs line 337
Error 4 Cannot implicitly convert type 'int[]' to 'int?[]' : Betfair.API.cs line 472
could not load referenced assembly ".../LigniteEngine.dll"
Metada file ".../Betfair.API.dll" could not be found
I guess the 2 last errors should be gone be fixing the two firsts...
How do I fix them?
cheers.
Line 337:
marketToUpdate.eventHierarchy = (int[])bfMarket.eventHierarchy.Clone();
Line 472:
request.eventTypeIds = new int?[eventTypeIds.Length];
Leave a comment:
-
I tried to compile it and got 4 errors.
Error 3 Cannot implicitly convert type 'int?[]' to 'int[]' : Betfair.API.cs line 337
Error 4 Cannot implicitly convert type 'int[]' to 'int?[]' : Betfair.API.cs line 472
could not load referenced assembly ".../LigniteEngine.dll"
Metada file ".../Betfair.API.dll" could not be found
I guess the 2 last errors should be gone be fixing the two firsts...
How do I fix them?
cheers.
Leave a comment:
-
klabor bee
Use klabor bee tool to do it,Originally posted by strik50000 View PostHow to make automat bet to Lay 2 euro any market ?
Leave a comment:
-
Erroe
When I click on the dropdown next to the yellow light I get the error:
"There is no region associated with the Invariant Culture (Culture ID: 0x7F)."
The code stops at:
public abstract class Helpers
public static string GetCurrencySymbol(string currency)
var regionInfo = (from c in CultureInfo.GetCultures(CultureTypes.InstalledWin3 2Cultures)
let r = new RegionInfo(c.LCID)
I'm running Windows 7, which apparently behaves differently to Vista when it comes to invariant cultures.
So I changed the code to:
var regionInfo = new RegionInfo(System.Threading.Thread.CurrentThread.C urrentUICulture.LCID);
foreach (var cultureInfo in CultureInfo.GetCultures(CultureTypes.AllCultures & ~CultureTypes.NeutralCultures))
{
if (!cultureInfo.Equals(CultureInfo.InvariantCulture) )
{
var regionCulture = new RegionInfo(cultureInfo.LCID);
if(regionCulture.ISOCurrencySymbol == currency)
{
regionInfo = regionCulture;
}
}
}
Leave a comment:
-
There are nullable Types.
You can fix it with some simple changes in code (note tested and no warranty)
in BetFairAPI.cs Line 472 change to
request.eventTypeIds = new int?[eventTypeIds.Length];
(insert the ? sign)
and Line 337 to
bfMarket.eventHierarchy.CopyTo(marketToUpdate.even tHierarchy,0);
this are just workarounds but it should keep the code running
BTW it would be a great way to change the apllication architecture to a kind of EBC Architecture and also it would be great using WPF as GUI :-)
If you need any advisory help let me know.
Leave a comment:
-
VS express 2010
Could it be this apps recompliled in VS 2010? I cannot complite it again due to errors. Thanks!
Leave a comment:
-
Hi
Great project, any plans on further development?
I've made a slight change to LoadMarkets() in AutoMarketLoader.cs
Before:
After:Code:case QueryOperator.GREATER_THAN: if (Convert.ToDouble(propertyValue) > Convert.ToDouble(query.Value)) { loadMarket[x] = false; } break; case QueryOperator.LESS_THAN: if (Convert.ToDouble(propertyValue) < Convert.ToDouble(query.Value)) { loadMarket[x] = false; } break;
I have added a few lines of code to BetfairAPI.PlaceBets() to allow for paper trading, but I'm not sure where to place the event handler to actually add a new bet so its processed by MarketProcessor? Any pointers would be very welcome.Code:case QueryOperator.GREATER_THAN: if (Convert.ToDouble(propertyValue) < Convert.ToDouble(query.Value)) { loadMarket[x] = false; } break; case QueryOperator.LESS_THAN: if (Convert.ToDouble(propertyValue) > Convert.ToDouble(query.Value)) { loadMarket[x] = false; } break;
Many thanks
Leave a comment:


Leave a comment: