ListMarketProfitAndLoss

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Guest

    #1

    ListMarketProfitAndLoss

    Hey guys anyone know what I am doing wrong?


    Calling: SportsAPING/v1.0/listMarketProfitAndLoss With args: {"marketIds":["2.101357325","2.101357327","2.101357275"],"includeSettledBets":false,"includeBspBets":false ,"netOfCommission":false}

    Got Response: {"jsonrpc":"2.0","result":[],"id":2}
  • BigSprout
    Junior Member
    • Feb 2011
    • 60

    #2
    Hi Troy,
    1. Were the markets listed still "OPEN" when you made the call?
    2. Did you have any of your own orders in the markets?

    I don't call listMarketProfitAndLoss, but reading the document, I think both of the above criteria need to be met to produce a result other than what you received.

    cheers

    Comment

    • Guest

      #3
      ProfitAndLoss

      Thanks mate - I will do some more reading and googling. I don't think markets have to be open because when you are logged into Betfair you can get Profit and Loss months after the markets are closed. Anyway I guess its not a biggy if I can't get it working as I can calculate this on the fly anyway.

      The reason I assumed something wrong is when I try to return the result into my class below it generates an error:

      Dim MarketProfitAndLossBF = New MarketProfitAndLoss()
      MarketProfitAndLossBF = clientBF.listMarketProfitAndLoss(marketIds, True, True, True)

      Comment

      • Guest

        #4
        listMarketProfitAndLoss

        Thanks BigSprout, I did go back to the documentation and you are spot on.

        Retrieve profit and loss for a given list of OPEN markets. The values are calculated using matched bets and optionally settled bets. Only odds (MarketBettingType = ODDS) markets are implemented, markets of other types are silently ignored.

        To retrieve your profit and loss for CLOSED markets, please use the listClearedOrders request.

        So after I had a bet on an open market and made the call, it return a potential profit and loss. So really the call to listProfitandLoss is more of a "What could I win or lose" call. The listClearedOrders is what I was looking for.

        Comment

        Working...
        X