POST
/
orders
/
cancelAllOrders
curl --request POST \
  --url https://api-dex.chainstream.io/orders/cancelAllOrders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chain": "solana",
  "dex": "openbook",
  "marketAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
  "userAddress": "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH",
  "side": "bid",
  "limit": 10,
  "priorityFee": "5000"
}'
{
  "serializedTx": "AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Required parameters for canceling all orders
chain
enum<string>
required

Blockchain network identifier

Available options:
solana,
ethereum
Example:

"solana"

dex
enum<string>
required

DEX identifier

Available options:
raydium,
openbook,
jupiter
Example:

"openbook"

marketAddress
string
required

Market/Pool address

Example:

"58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"

userAddress
string
required

Wallet address owning the orders

Example:

"HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"

side
enum<string>
required

Order side to cancel

Available options:
bid,
ask
Example:

"bid"

limit
number
default:10
required

Maximum number of orders to cancel

Required range: 1 <= x <= 100
Example:

10

priorityFee
integer
default:5000

Priority fee in microLamports

Example:

"5000"

Response

200 - application/json
serializedTx
string
required

Base64 encoded transaction

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="