Skip to main content

API Reference: cancelBidOrder

Cancels an active buy-side (bid) order on a sovereign BetaChain order book and releases locked currency funds back to the buyer's account unconfirmed balance.


Endpoint Details

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

Request Parameters

ParameterTypeRequiredDescription
requestTypeStringYesMust be set to cancelBidOrder.
orderlongYesUnique 64-bit identifier of the bid order to cancel.
chainintYesSovereign BetaChain ID where the order resides.
secretPhraseStringYesPost-Quantum Cryptography (PQC) passphrase of the account that placed the order.
feeNQTlongConditionalTransaction execution fee in base units (NQT).
deadlineshortConditionalTransaction expiration window in minutes (1-1440).

Example Request

curl -X POST http://localhost:22024/nxt \
-d "requestType=cancelBidOrder" \
-d "chain=2" \
-d "order=47382019481029384" \
-d "secretPhrase=your_pqc_passphrase" \
-d "feeNQT=10000000" \
-d "deadline=60"

Successful Response

{
"signatureHash": "b8e7c6a5...",
"unsignedTransactionBytes": "0100...",
"transactionJSON": {
"sender": "1234567890123456789",
"feeNQT": "10000000",
"type": 2,
"subtype": 4,
"attachment": {
"version.OrderCancellation": 1,
"order": "47382019481029384"
},
"timestamp": 89234150
},
"broadcasted": true,
"transaction": "87123049120394811"
}

Error Codes

Error CodeCause / Description
UNKNOWN_ORDEROrder ID does not exist or does not belong to the requesting sender account.
INSUFFICIENT_FEEThe specified feeNQT is below the network minimum threshold for order cancellation.