Skip to main content

getAllOpenAskOrders

Retrieves a paginated list of all active sell-side (ask) orders currently resting on the order book of a specified sovereign BetaChain.


Endpoint Details

  • HTTP Method: POST
  • Gateway Path: /nxt
  • Content-Type: application/x-www-form-urlencoded
  • API Tags: AE
  • Chain Specific: Yes

Request Parameters

ParameterTypeRequiredDescription
requestTypeStringYesMust be set to getAllOpenAskOrders.
chainintYesSovereign BetaChain ID where the order book resides.
firstIndexintNoZero-based start index for pagination. Default: 0.
lastIndexintNoEnd index for pagination. Default: -1 (returns all open ask orders).

Example Request

curl -X POST http://localhost:22024/nxt \
-d "requestType=getAllOpenAskOrders" \
-d "chain=2" \
-d "firstIndex=0" \
-d "lastIndex=10"

Successful Response

{
"openOrders": [
{
"order": "88492019481029384",
"totem": "9876543210123456789",
"account": "1234567890123456789",
"accountRS": "SHAMWARI-ABCD-EFGH-JKLM-NOPQR",
"quantityQNT": "1000000",
"priceNQT": "50000",
"height": 500120,
"type": "ask"
}
]
}

Error Codes

Error CodeCause / Description
INCORRECT_CHAINInvalid, missing, or inactive BetaChain ID specified in the request.
INCORRECT_INDEXInvalid firstIndex or lastIndex pagination bounds when firstIndex exceeds lastIndex (unless lastIndex is -1).