POST
/
orders
/
closeMarket
curl --request POST \
  --url https://api-dex.chainstream.io/orders/closeMarket \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chain": "solana",
  "dex": "openbook",
  "marketAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
  "userAddress": "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH",
  "priorityFee": "5000",
  "extra": {
    "reason": "low_volume",
    "timestamp": "2024-03-14T12:00:00Z"
  }
}'
{
  "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 closing trading pair
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 address to close

Example:

"58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"

userAddress
string
required

Market admin wallet address

Example:

"HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"

priorityFee
integer
default:5000

Priority fee in microLamports

Example:

"5000"

extra
object

Additional market closure metadata

Example:
{
  "reason": "low_volume",
  "timestamp": "2024-03-14T12:00:00Z"
}

Response

200 - application/json
serializedTx
string
required

Base64 encoded transaction

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="