Skip to main content

getAskOrders

Retrieves sorted open sell-side (ask) orders for a specific Totem and payment currency pair resting on a BetaChain order book, sorted in Price-Time Priority (ascending price).


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 getAskOrders.
totemlong / StringYesUnique 6464-bit identifier of the Totem being sold.
currencylong / StringYesUnique 6464-bit identifier of the target payment currency.
chainintYesSovereign BetaChain ID.
firstIndexintNoZero-based start index for pagination. Default: 0.
lastIndexintNoEnd index for pagination. Default: -1.
showExpectedCancellationsbooleanNoIf true, checks the unconfirmed transaction pool and sets "expectedCancellation": true on orders pending cancellation. Default: false.

Example Request

curl -X POST http://localhost:22024/nxt \
-d "requestType=getAskOrders" \
-d "chain=2" \
-d "totem=9876543210123456789" \
-d "currency=5544332211" \
-d "firstIndex=0" \
-d "lastIndex=10" \
-d "showExpectedCancellations=true"

Successful Response

{
"askOrders": [
{
"order": "88492019481029384",
"totem": "9876543210123456789",
"currency": "5544332211",
"account": "1234567890123456789",
"accountRS": "SHAMWARI-ABCD-EFGH-JKLM-NOPQR",
"quantityQNT": "1000000",
"priceNQT": "50000",
"height": 500120,
"expectedCancellation": true
}
]
}

Error Codes

Error CodeCause / Description
UNKNOWN_TOTEMTotem ID does not exist on the network.
UNKNOWN_CURRENCYCurrency ID does not exist on the specified BetaChain.
INCORRECT_CHAINInvalid or inactive BetaChain ID specified.