Skip to main content

getAllOpenBidOrders

Retrieves a paginated list of all active buy-side (bid) 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 getAllOpenBidOrders.
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 bid orders).

Example Request

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

Successful Response

{
"openOrders": [
{
"order": "47382019481029384",
"totem": "9876543210123456789",
"account": "9876543210987654321",
"accountRS": "SHAMWARI-WXYZ-EFGH-JKLM-NOPQR",
"quantityQNT": "500000",
"priceNQT": "50000",
"height": 500122,
"type": "bid"
}
]
}

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).