I am re-coding a BOT I had built that auto-traded for me on the exchange, however to do that correctly with an overlay (so I win £ whether the horse wins or loses from a back bet with lower stake and higher odds than a LAY bet with a higher stake than the BACK bet and lower matched odds) - there is obviously a commission to be paid if the bet wins which I need to take into consideration when working out the DESIRED BACK/LAY price before placing the bets.
A £2 LAY bet winning might only return £1.90 after commission is deducted which obviously means I need to know the amount that will be deducted before working out the other side of the trades price, especially if the gap between the BACK and LAY positions are a few ticks.
Is there a method to call to get the commission that will be deducted OR when I place a bet and it's matched is there a way of finding out the commission I will have to pay if the bet wins before listing settled bet status which is the only article I have seen for getting it e.g:
Request:
and the response
I was doing okay before but I totally forgot about the commission deduction from winning bets as just making 100 small trade bets in the last 5 minutes before a race could be just the difference between the BACk and LAY price of a couple of ticks or two and a very small stake difference (which all adds up in the end if all are matched) - but I obviously need the commission to be included in my calculation code that works out the positions of each side of the trade.
I am using C# API_ING but the JSON would be alright for me to work out what to code.
Thanks for any help in advance,
Rob
A £2 LAY bet winning might only return £1.90 after commission is deducted which obviously means I need to know the amount that will be deducted before working out the other side of the trades price, especially if the gap between the BACK and LAY positions are a few ticks.
Is there a method to call to get the commission that will be deducted OR when I place a bet and it's matched is there a way of finding out the commission I will have to pay if the bet wins before listing settled bet status which is the only article I have seen for getting it e.g:
Request:
Code:
[SIZE=12px][B][{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/listClearedOrders", "params": {"betStatus":"SETTLED","eventTypeIds":["7"],"settledDateRange":{},"groupBy":"MARKET"}, "id": 1}[/B][/SIZE]
Code:
[SIZE=12px][B][{"jsonrpc ":"2.0","result":{"clearedOrders":[{"eventTypeId":"7","eventId":"28947625","marketId" :"1.149312109","placedDate":"2018-10-10T13:20:25.000Z","persistenceType":"LAPSE","order Type":"MARKET_ON_CLOSE","betOutcome":"LOST","settl edDate":"2018-10-10T13:25:34.000Z","lastMatchedDate":"2018-10-10T13:21:02.000Z","betCount":2,"commission":0.0,"p riceReduced":false,"profit":-0.3},{"eventTypeId":"7","eventId":"28917668","mark etId":"1.148478572","selectionId":12819184,"handic ap":0.0,"betId":"138605913699","placedDate":"201 8-09-24T08:50:44.000Z","persistenceType":"LAPSE","order Type":"LIMIT","side":"BACK","betOutcome":"LOST","p riceRequested":1.78,"settledDate":"2018-09-24T14:54:50.000Z","lastMatchedDate":"2018-09-24T08:50:44.000Z","betCount":1,"commission":0.0,"p riceMatched":1.72,"priceReduced":true,"sizeSettled ":2.0,"profit":-2.0},{"eventTypeId":"7","eventId":"28853743","mark etId":"1.146920662","selectionId":2643412,"handicap":0.0,"betId":"134652560450","placedDate":"201 8-08-21T13:51:26.000Z","persistenceType":"PERSIST","ord erType":"LIMIT","side":"LAY","betOutcome":"WON","p riceRequested":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,"sizeSettl ed":1.0,"profit":1.0}],"moreAvailable":false},"id":1}][/B][/SIZE]
I am using C# API_ING but the JSON would be alright for me to work out what to code.
Thanks for any help in advance,
Rob
Comment