How can I determine whether a bet has been settled?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • monkeymagix
    Junior Member
    • Jul 2010
    • 105

    #1

    How can I determine whether a bet has been settled?

    I am trying to "finish off" the API-ING C# example code which has lots of missing parts. I would have thought they would have finished and tested the API before making example code live but then hey I guess we are the free "testing" department.

    I am currently writing the code for the listCurrentOrders method however I see in the new system there are only two OrderStatuses.

    EXECUTION_COMPLETE

    An order that does not have any remaining unmatched portion.

    OR

    EXECUTABLE

    An order that has a remaining unmatched portion.

    In the old system there was:

    M = Matched
    U = Unmatched
    MU = Partial Match
    C = Cancelled
    V = Voided
    L = Lapsed
    S = Settled

    Therefore I want to know how I can determine if a bet has been settled in the new system and how much I have won/lost.

    I can understand how EXECUTION_COMPLETE would equal M (Matched) (if the SizeMatched amount is the full bet amount with no SizeRemaining)

    and EXECUTABLE would be U (Unmatched) if the SizeRemaining was the full BetAmount, and partially matched MU if the SizeRemaining / SizeMatched was less than the BetAmount.

    Also by checking for SizeCancelled, SizeVoided and SizeLapsed I can figure out whether the bet has been voided, cancelled or lapsed.

    However what is the best way to find out if a bet has been settled? With correct return amounts?

    BDP told me last night that (and I quote)..

    Thanks for contacting us.

    At the moment, there is no way of checking details of your settled bets via API-NG. However, we will shortly be releasing a new listClearedOrder service. This is scheduled for release on the 16th December and will enable you to retrieve your settled bets.
    Therefore it seems there is no way in the new API to find settled bets and profit/loss etc? That seems crazy to me unless I am totally missing something?

    I suppose if I could access the account balance and knew if the runner had WON/LOST their race/bet and I see there is a RunnerStatus enum that shows WON, LOST, REMOVED etc and I suppose I could work it out from that using the price matched * amount etc to get liability or profit but surely there is a better way to get ACCURATE data from the system?

    How is everyone else calculating whether a bet has been settled and the profit/loss from it? Are you all just waiting for new bits of the API to be rolled out or trying to handle it some other way?

    I seriously hope they don't even consider starting to stop the SOAP API until the new one is 100% complete, tested and bug free - THEN WAIT 18 months. Otherwise we will be running round like headless chickens fixing bugs and adding new features as and when they come out.

    Any help would be much appreciated.

    Thanks
  • gus
    Senior Member
    • Jan 2009
    • 134

    #2
    I suppose if I could access the account balance and knew if the runner had WON/LOST their race/bet and I see there is a RunnerStatus enum that shows WON, LOST, REMOVED etc and I suppose I could work it out from that using the price matched * amount etc

    That's more or less what what I'm doing just now:

    ... keep calling listMarketBook until a Runner has a status of WINNER, so I know Bets have been settled, except that I just keep track of the Stakes and Matched prices of my Bets and then calculate the Profit/Loss at that point but it does get kinda complicated when there are 2 (or more) WINNERs, e.g. a dead-heat in a Horse Race, so eagerly looking forward to Dec 16th !

    Comment

    Working...
    X