Skip to main content

getBidOrders

Retrieves sorted open buy-side (bid) orders for a specific Totem and payment currency pair resting on a BetaChain order book, sorted in Price-Time Priority (descending 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 getBidOrders.
totemlong / StringYesUnique 6464-bit identifier of the Totem being bought.
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=getBidOrders" \
-d "chain=2" \
-d "totem=9876543210123456789" \
-d "currency=5544332211" \
-d "firstIndex=0" \
-d "lastIndex=10" \
-d "showExpectedCancellations=true"

Successful Response

{
"bidOrders": [
{
"order": "47382019481029384",
"totem": "9876543210123456789",
"currency": "5544332211",
"account": "9876543210987654321",
"accountRS": "SHAMWARI-WXYZ-EFGH-JKLM-NOPQR",
"quantityQNT": "500000",
"priceNQT": "50000",
"height": 500122,
"expectedCancellation": false
}
]
}

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.