Curl listMarketBook error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devefab
    Junior Member
    • May 2023
    • 5

    #1

    Curl listMarketBook error

    Hi guys, can someone tell me what's wrong with this curl post?

    # Execute the curl command and save response to a file
    curl -s -X POST --header "Accept: application/json" \
    --header "Content-Type: application/json" \
    --header "X-Application: $APP_KEY" \
    --header "X-Authentication: $SESSION_TOKEN" \
    --data '[{
    "jsonrpc":"2.0",
    "method":"SportsAPING/v1.0/listMarketBook",
    "params": {
    "marketIds": ['$MARKET_IDS'],
    "priceProjection": {
    "priceData": "EX_BEST_OFFERS"},
    "orderProjection": "EXECUTABLE",
    "matchProjection" :"ROLLED_UP_BY_AVG_PRICE"},
    "id":1
    }]' \
    $HOST > "$OUTPUT_DIR/football_markets_Prices.json"​


    heres the ouput: [{"jsonrpc":"2.0","error":{"code":-32602,"message":"DSC-0018"},"id":1}]
    Last edited by devefab; 31-05-2023, 09:58 PM.
  • WTPooh
    Member
    • May 2012
    • 88

    #2
    "priceData": ["EX_BEST_OFFERS"]

    Comment

    • devefab
      Junior Member
      • May 2023
      • 5

      #3
      Thanks WTPooh for that... had the same result though.

      Comment

      • WTPooh
        Member
        • May 2012
        • 88

        #4
        Most likely your problem is here: "marketIds": ['$MARKET_IDS']
        Try something like "marketIds":["1.207772667"]

        Comment

        • devefab
          Junior Member
          • May 2023
          • 5

          #5
          I am in awe. I used that $MARKET_ID variable in another method request and it worked... impressed that it didn't work there, but that was definitely the cause. Thanks so much! Do you know how many markets you are allowed to query in a single string?

          Comment

          • WTPooh
            Member
            • May 2012
            • 88

            #6
            Read about Market Data Request Limits here: https://docs.developer.betfair.com/d...Request+Limits

            Comment

            Working...
            X