POST
/
orders
/
takeOrder
curl --request POST \
  --url https://api-dex.chainstream.io/orders/takeOrder \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chain": "solana",
  "dex": "raydium",
  "amount": 1000000000,
  "price": 50.5,
  "side": "bid",
  "marketAddress": "58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2",
  "userAddress": "HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH",
  "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
吃单所需参数
chain
enum<string>
required

区块链网络标识符

Available options:
solana,
ethereum
Example:

"solana"

dex
enum<string>
required

DEX 标识符

Available options:
raydium,
openbook,
jupiter
Example:

"raydium"

amount
number
required

订单金额(基本单位)

Example:

1000000000

price
number
required

订单价格(报价单位)

Example:

50.5

side
enum<string>
required

订单方向

Available options:
bid,
ask
Example:

"bid"

marketAddress
string
required

市场/资金池地址

Example:

"58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2"

userAddress
string
required

下订单的钱包地址

Example:

"HN7cABqLq46Es1jh92dQQisAq662SmxELLLsHHe4YWrH"

priorityFee
integer
default:5000

优先费用(微 Lamports)

Example:

"5000"

Response

200 - application/json
serializedTx
string
required

Base64 编码的交易

Example:

"AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDRgYGpQEDAQIABQcICQoLDA0ODwAAAAAAAAAAAAAQERITFBUWFxgZGhscHR4fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA="

此页面对您有帮助吗?