Using Excel VB Sample Code Sheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • betdynamics
    replied
    The use of "Soccer" is correct.

    The issue is caused by the fact that you are trying to retrieve the WIN market - but there is no WIN market in football matches.

    Try retrieving the MATCH_ODDS market instead in the GetListMarketCatalogueRequestString function.

    Leave a comment:


  • gus
    replied
    This is a total guess, since I know nothing about Excel and less than nothing about VB6, but I'd try changing 'Soccer' to 'Football' and see what happens.

    At least it shouldn't take too much effort!

    Leave a comment:


  • judgement
    replied
    i meant documentation for the SampleCode.xlsm spreadsheet apart from the comments in the VBA. us newbies need spoon feeding!

    anyway here is my next challenge..

    when i change 'Horse Racing' on line 121 of the Util module to 'Soccer' (my area of interest) and click the Go button the macro stops at line 129 in the Util module:

    GetMarketIdFromMarketCatalogue = Response.Item(1).Item("marketId")

    with a Run-time error 5 - Invalid procedure call or argument.

    and the 'Raw Response: listMarketCatalogue' (cell B7) is not completed with any football data.

    Leave a comment:


  • jabe
    replied
    Lots of documentation: http://docs.developer.betfair.com/do...lu3yomq5qye0ni

    The odds are in the response to the listMarketBook call.

    Leave a comment:


  • judgement
    replied
    Originally posted by vexxejr View Post
    I am fairly new to the Betfair API.
    me too


    Originally posted by vexxejr View Post
    I wondered if somebody could let me know what to type and how to instruct the sample code to retrieve betfair prices?
    i couldn't find any documentation and was asking the same questions.

    having spent a some time trying to understand how it works as far as i understand it with my limited VBA knowledge is that you don't enter anything just click either Go button and it returns 7 in B11 which is the Event Type ID for horse racing, enters the Market ID of the next horse race in B12, the Selection ID of the first horse in that race in B13 and the prices for that horse in B14, B15 and B16. i think it then tries to place a 1p bet on that horse using the back price in B14 but the bet fails to be placed because the stake is too low.

    i think the idea is not to use this spreadsheet as it is but to take the relevant bits of code from it for our own app.

    now the hard work begins

    Leave a comment:


  • jabe
    replied
    I haven't used the Excel VBA spreadsheet example. For some reason it wouldn't open in my copy of Excel 2010. My coding has been in VB.NET.

    Have you looked at the documentation? That has more examples in it.

    I'd suggest you familiarise yourself with these, if you haven't already:

    1. JSON. I believe there's a tutorial on the w3c site
    2. Check out curl. You may not need to use it for VBA/API calls, but it'll give you an idea what calls look like and what other bits and pieces need calling.
    3. The relevant stuff in the documentation. Sometimes looking at the examples for other coding languages can help.

    To get odds, you call ListMarketBook. Beforehand, you will have chosen an event (listEvents) and obtained details of one or more markets for that Event using listMarketCatalogue.

    There's an awful lot to learn about.

    Leave a comment:


  • vexxejr
    started a topic Using Excel VB Sample Code Sheet

    Using Excel VB Sample Code Sheet

    Hi all,

    I am fairly new to the Betfair API. I have just downloaded the sample code sheet to see what the results look like when implementing the API with excel.

    I have got myself an App Key and Session ID which worked using the test screen on the Betfair developers site. However i am having trouble in learning how to use the sample sheet, it has the rows which i have listed below and i have tried entering an ID from a normal betfair URL and various other things but none of that works.

    I wondered if somebody could let me know what to type and how to instruct the sample code to retrieve betfair prices?

    Raw Response: listEventTypes
    Raw Response: listMarketCatalogue
    Raw Response: listMarketBook
    Raw Response: placeOrders

    Event Type ID
    Market ID
    Selection ID
    Prices
    Result
    Instruction Result

    Thanks in advance
Working...
X