Unsettled b

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Burdett
    Junior Member
    • Sep 2012
    • 29

    #1

    Unsettled b

    I've been adequately testing and getting the outcomes on settled bets. However - is there a test for a betID to argue are you settled yet?

    var myReport = client.listClearedOrders(BetStatus.SETTLED, null, null, null, null, myBetIds, null, null, null, null, null, null, null);

    The above code works if the bet has indeed settled. But I get an out of range exception if the bet is not BetStatus.SETTLED. I guess because its not part of the settled group. So if you're purpose is to ask if the bet is yet settled? - what would you do?

    BetStatus.NotSettled would of course be great......any help or advice?

    Thanks
    David.
    Last edited by Burdett; 09-03-2016, 01:31 PM.
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    Originally posted by Burdett View Post
    I've been adequately testing and getting the outcomes on settled bets. However - is there a test for a betID to argue are you settled yet?

    var myReport = client.listClearedOrders(BetStatus.SETTLED, null, null, null, null, myBetIds, null, null, null, null, null, null, null);

    The above code works if the bet has indeed settled. But I get an out of range exception if the bet is not BetStatus.SETTLED. I guess because its not part of the settled group. So if you're purpose is to ask if the bet is yet settled? - what would you do?

    BetStatus.NotSettled would of course be great......any help or advice?

    Thanks
    David.
    An out-of-range error should be manageable within your program. Is that C#.NET you're using?

    You could try something like this (I'm not a C# programmer, so it will need tweaking):

    Try
    var myReport = client.listClearedOrders(BetStatus.SETTLED, null, null, null, null, myBetIds, null, null, null, null, null, null, null);
    Catch ex as exception
    if ex == system.error.outofrange
    ' do something or nothing
    end if
    end try

    There might be better ways, but I don't know how your myReport is defined.

    Comment

    Working...
    X