POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
marketcancelorder
wallet/marketcancelorder
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/marketcancelorder \
  --header 'Content-Type: application/json' \
  --data '{
  "owner_address": "41b487cdb2d8dc7b2a8e5e7e7b4e3e8b8b8b8b8b",
  "order_id": "0x1234567890abcdef1234567890abcdef12345678"
}'
{
  "visible": true,
  "txID": "<string>",
  "raw_data": {
    "contract": [
      "<any>"
    ],
    "ref_block_bytes": "<string>",
    "ref_block_hash": "<string>",
    "expiration": 123,
    "timestamp": 123
  },
  "raw_data_hex": "<string>"
}
TRON API method that creates a transaction to cancel an existing market order on the TRON DEX. This allows users to withdraw their unfilled buy or sell orders from the order book.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • owner_address — hexadecimal address of the account that created the order
  • order_id — unique identifier of the market order to cancel (as hexadecimal string)

Response

  • visible — boolean indicating whether addresses are in visible format
  • txID — unique transaction ID for the order cancellation transaction
  • raw_data — raw transaction data containing:
    • contract — array with market order cancellation contract details
    • ref_block_bytes — reference block bytes for transaction validation
    • ref_block_hash — hash of the reference block
    • expiration — transaction expiration timestamp
    • timestamp — transaction creation timestamp
  • raw_data_hex — complete transaction data encoded in hexadecimal format

Use case

The wallet/marketcancelorder method is used for:
  • Canceling orders that are no longer needed or desired.
  • Withdrawing funds locked in unfilled orders back to the account balance.
  • Adjusting trading strategies by removing stale or mispriced orders.
  • Managing order book exposure and market position.
  • Implementing automated order management systems.
You can only cancel orders that you created and that are still active. Once an order is fully filled or already canceled, it cannot be canceled again. The locked tokens will be returned to your account balance upon successful cancellation.

Body

application/json

Response

200 - application/json

Order cancellation transaction

The response is of type object.