Commission amount of bet in API?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Simon
    Junior Member
    • Oct 2018
    • 1

    #1

    Commission amount of bet in API?

    Hello
    I'm new working with Betfair API and have a simple question.
    Is it possible somewhere to get the commission betfair is taken when a odds is won?

    At the moment I can only see the price, bet and profit when using "listClearedOrders", but not anything about the commission amount.

    Hope someone have an answer on this :-)
  • BetfairDeveloperProgram
    Administrator
    • Oct 2008
    • 679

    #2
    Hi Simon,

    When making a request to listClearedOrders you need to specify groupBy MARKET to see the amount of commission paid.

    Please see listClearedOrders - Roll-up Fields Available via http://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/listClearedOrders+-+Roll-up+Fields+Available

    See an example below:

    Request
    Code:
     [B][{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params": {"betStatus":"SETTLED","eventTypeIds":["7"],"settledDateRange":{},"groupBy":"MARKET"}, "id": 1}[/B]
    Response

    Code:
    [{"jsonrpc
    ":"2.0","result":{"clearedOrders":[{"eventTypeId":"7","eventId":"28947625","marketId":"1.149312109","placedDate":"2018-10-10T13:20:25.000Z","persistenceType":"LAPSE","orderType":"MARKET_ON_CLOSE","betOutcome":"LOST","settledDate":"2018-10-10T13:25:34.000Z","lastMatchedDate":"2018-10-10T13:21:02.000Z","betCount":2,"commission":0.0,"priceReduced":false,"profit":-0.3},{"eventTypeId":"7","eventId":"28917668","marketId":"1.148478572","selectionId":12819184,"handicap":0.0,"betId":"138605913699","placedDate":"2018-09-24T08:50:44.000Z","persistenceType":"LAPSE","orderType":"LIMIT","side":"BACK","betOutcome":"LOST","priceRequested":1.78,"settledDate":"2018-09-24T14:54:50.000Z","lastMatchedDate":"2018-09-24T08:50:44.000Z","betCount":1,"commission":0.0,"priceMatched":1.72,"priceReduced":true,"sizeSettled":2.0,"profit":-2.0},{"eventTypeId":"7","eventId":"28853743","marketId":"1.146920662","selectionId":2643412,"handicap":0.0,"betId":"134652560450","placedDate":"2018-08-21T13:51:26.000Z","persistenceType":"PERSIST","orderType":"LIMIT","side":"LAY","betOutcome":"WON","priceRequested":2.78,"settledDate":"2018-08-21T15:52:17.000Z","lastMatchedDate":"2018-08-21T13:51:26.000Z","betCount":1,"commission":0.05,"priceMatched":2.78,"priceReduced":false,"sizeSettled":1.0,"profit":1.0}],"moreAvailable":false},"id":1}]



    Thanks

    Neil
    Last edited by BetfairDeveloperProgram; 31-10-2018, 04:43 PM.

    Comment

    • olk
      Junior Member
      • Nov 2018
      • 3

      #3
      The commission is not listed when GroupBy "BET" is requested, that is really sad...i want the commission that is paid for every bet, but it is not possible.

      Comment

      Working...
      X