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
| Parameter | Type | Required | Description |
|---|---|---|---|
requestType | String | Yes | Must be set to getAllOpenAskOrders. |
chain | int | Yes | Sovereign BetaChain ID where the order book resides. |
firstIndex | int | No | Zero-based start index for pagination. Default: 0. |
lastIndex | int | No | End 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 Code | Cause / Description |
|---|---|
INCORRECT_CHAIN | Invalid, missing, or inactive BetaChain ID specified in the request. |
INCORRECT_INDEX | Invalid firstIndex or lastIndex pagination bounds when firstIndex exceeds lastIndex (unless lastIndex is -1). |