Announcement

Collapse
No announcement yet.

Help calling placeOrders

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

    Help calling placeOrders

    Hi all,

    I think i got it all wrong to place a bet, if some can help me:

    1. i get a market i want to bet on:
    Code:
    "market": {
        "marketId": "1.157260766",
        "marketName": "Match Odds",
        "totalMatched": 190.68,
        "runners": [
          {
            "selectionId": 2482528,
            "runnerName": "Dinamo Brest",
            "handicap": 0,
            "sortPriority": 1,
            "status": "ACTIVE",
            "totalMatched": 0,
            "lastPriceTraded": 1.32
          },
          {
            "selectionId": 23514500,
            "runnerName": "FC Dnjapro-MCZ",
            "handicap": 0,
            "sortPriority": 2,
            "status": "ACTIVE",
            "totalMatched": 0,
            "lastPriceTraded": 14.5
          },
          {
            "selectionId": 58805,
            "runnerName": "The Draw",
            "handicap": 0,
            "sortPriority": 3,
            "status": "ACTIVE",
            "totalMatched": 0,
            "lastPriceTraded": 5.6
          }
        ],
    So i want to bet £2 on the first team "Dinamo Brest"

    2. i call placeOrders with these parameters:

    Code:
    [{
        "jsonrpc": "2.0",
        "method": "SportsAPING/v1.0/placeOrders",
        "params": {
          "marketId": "1.157260766",
          "instructions": [
            {
              "selectionId": "2482528",
              "handicap": "0",
              "side": "LAY",
              "orderType": "LIMIT",
              "limitOrder": {
                "size": "2",
                "price": "1.32",
                "persistenceType": "LAPSE"
              }
            }
          ]
        },
        "id": 1
      }
    ]
    Can someone confirm i am good so far ?
    (because once my bet order is settled, it seems like the bet outcome is reversed: it says LOST when i win, and WIN when i loose...)

    #2
    hi

    It can turn my losing bets into winning bets ? I will buy it, name your price

    But seriously, I had a look at that snippet, its correct Json and all your data looks sensible to me. I cant spot anything wrong with it.

    Geoff

    Comment


      #3
      You placed a LAY bet on Dinamo Brest. That's a bet that they are not going to win. If you expected them to win (as they did), you needed to place a BACK bet. (I'm assuming this was the 3-1 home win on Sunday).

      Comment


        #4
        That explains a lot . thanks

        (The match in the example has not happened yet)

        Comment

        Working...
        X