"withOrders" problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cks1007
    Junior Member
    • Mar 2020
    • 9

    #1

    "withOrders" problem

    hi, as I try to use withOrders function, it's not work
    anyone can advise? thanks a lot

    Code:
    $params='{"filter":{
        "eventTypeIds":["' . $eventTypeIds . '"],
        "withOrders":{"OrderBy":"BY_MATCH_TIME", "SortDir":"LATEST_TO_EARLIEST"},
        "marketStartTime":{"from":"' . $Today . '", "to":"' . $Tomorrow . '"}
        },
        "maxResults":"'. $maxResults . '",
        "marketProjection":["COMPETITION",  "MARKET_DESCRIPTION", "EVENT", "EVENT_TYPE", "RUNNER_DESCRIPTION"]
        }';
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    I think you are mixing up listMarketCatalogue and listMarketBook, check the docs.

    Comment

    • cks1007
      Junior Member
      • Mar 2020
      • 9

      #3
      thanks LiamP
      after your advise, I fix the problem.

      Code:
      $params='{"filter":{
          "eventTypeIds":["' . $eventTypeIds . '"],
          "marketStartTime":{"from":"' . $Today . '", "to":"' . $Tomorrow . '"}},
          "maxResults":"'. $maxResults . '",
          "sort":"FIRST_TO_START",
          "marketProjection":["COMPETITION",  "MARKET_DESCRIPTION", "EVENT", "EVENT_TYPE", "RUNNER_DESCRIPTION"]
          }';
      $a=sportsApingRequest($appKey, $sessionToken, 'listMarketCatalogue', $params);

      Comment

      Working...
      X