Announcement

Collapse
No announcement yet.

"withOrders" problem

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

  • "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"]
        }';

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

    Comment


    • #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