Skip to content

Get Orders

Get bid/ask orders given an asset ID, in order of decreasing bid price or increasing ask price (if sortByPrice is true for expected orders, otherwise in the expected order of execution).

Request:

  • requestType is one of getBidOrders, getAskOrders, getExpectedBidOrders or getExpectedAskOrders, where expected orders are from the unconfirmed transactions pool or are phased transactions scheduled to finish in the next block
  • asset is the asset ID
  • sortByPrice is true to sort by price (optional, applies only to expected orders, which are returned in expected order of execution by default)
  • showExpectedCancellations is true to include orders that are expected to be cancelled in the next block, based on the content of the unconfirmed transactions pool and the phased transactions expected to finish in the next block (optional, does not apply to expected orders)
  • firstIndex is a zero-based index to the first order to retrieve (optional, does not apply to expected orders)
  • lastIndex is a zero-based index to the last order to retrieve (optional, does not apply to expected orders)
  • requireBlock is the block ID of a block that must be present in the blockchain during execution (optional)
  • requireLastBlock is the block ID of a block that must be last in the blockchain during execution (optional)

Response:

  • bidOrders or askOrders (A) is an array of order objects (refer to Get Orders for details) with the following additional field only for an expected order:
    • phased (B) is true if the order is phased, false otherwise
  • lastBlock (S) is the last block ID on the blockchain (applies if requireBlock is provided but not requireLastBlock)
  • requestProcessingTime (N) is the API request processing time (in millisec)