Skip to main content

API Reference: cancelAskOrder

Cancels an active sell-side (ask) order on a sovereign BetaChain order book and releases the locked Totem balance back to the seller'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 cancelAskOrder.
orderlongYesUnique 64-bit identifier of the ask 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=cancelAskOrder" \
-d "chain=2" \
-d "order=88492019481029384" \
-d "secretPhrase=your_pqc_passphrase" \
-d "feeNQT=10000000" \
-d "deadline=60"

Successful Response

{
"signatureHash": "a9f8b7c6...",
"unsignedTransactionBytes": "0100...",
"transactionJSON": {
"sender": "1234567890123456789",
"feeNQT": "10000000",
"type": 2,
"subtype": 3,
"attachment": {
"version.OrderCancellation": 1,
"order": "88492019481029384"
},
"timestamp": 89234102
},
"broadcasted": true,
"transaction": "98123049120394810"
}

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.