C# The beginnings of a bot

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts

  • betdynamics
    replied
    This example is written for the API version 6, which is due to be retired on the 1st November.

    Leave a comment:


  • JACAB
    replied
    Originally posted by sjdev View Post
    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.

    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:


  • baggio1510
    replied
    I would like to carry on development of this project.

    Leave a comment:


  • sjdev
    replied
    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:


  • MrLeusk
    replied
    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:


  • jpppuam
    replied
    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:


  • Ruggy
    replied
    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:


  • aubergine
    replied
    Originally posted by nmpgaspar View Post
    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.
    Note, these are quick hack fixes just to get it building, I have no idea of the actual impact of these changes:

    Line 337:
    marketToUpdate.eventHierarchy = (int[])bfMarket.eventHierarchy.Clone();

    Line 472:
    request.eventTypeIds = new int?[eventTypeIds.Length];

    Leave a comment:


  • nmpgaspar
    replied
    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:


  • stranger77
    replied
    klabor bee

    Originally posted by strik50000 View Post
    How to make automat bet to Lay 2 euro any market ?
    Use klabor bee tool to do it,

    Leave a comment:


  • sandstormed
    replied
    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;
    }
    }
    }
    Last edited by sandstormed; 13-12-2010, 08:32 AM. Reason: Found Fix

    Leave a comment:


  • strik50000
    replied
    How to make automat bet to Lay 2 euro any market ?

    Leave a comment:


  • Gentlehag
    replied
    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:


  • Mapper
    replied
    VS express 2010

    Could it be this apps recompliled in VS 2010? I cannot complite it again due to errors. Thanks!

    Leave a comment:


  • geraintwalesuk
    replied
    Hi

    Great project, any plans on further development?

    I've made a slight change to LoadMarkets() in AutoMarketLoader.cs

    Before:

    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;
    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.

    Many thanks

    Leave a comment:

Working...
X