Firm Order#
After the user signs the Solana transaction, OKX submits the rfqId and user-signed transaction to the market maker. The market maker performs final validation and signing, then returns txHash or signedTx according to the selected settlement mode.
Request URL#
POST
https://your-api-endpoint.com/OKXDEX/rfq/firm-orderRequest parameters#
| Field | Type | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique chain identifier; Solana is fixed to 501. |
| rfqId | String | Yes | RFQ correlation identifier generated by OKX. |
| callData | String | Yes | Base58-encoded Solana transaction already signed by the user. |
Required validation#
- Validate that
rfqIdexists, belongs to the expected request, and remains valid. - Validate that instructions, accounts, mints, amounts, and recipients match the expected RFQ.
- Validate the user signature.
- Validate that the execution price and current liquidity remain acceptable.
- Validate the recent blockhash, account state, and current executability.
- Add the required market-maker signature.
- Return
txHashorsignedTxaccording to the agreed broadcast mode.
Response parameters#
| Field | Type | Required | Description |
|---|---|---|---|
| code | String | Yes | 0 means success. |
| msg | String | Yes | Empty on success; reason on failure. |
| data.chainIndex | String | Yes | Unique chain identifier. |
| data.rfqId | String | Yes | Echo of the request rfqId. |
| data.txHash | String | Conditional | Return only in MM-broadcast mode; Base58 Solana transaction hash. |
| data.signedTx | String | Conditional | Return only in OKX-broadcast mode; complete Base58 transaction with user and MM signatures. |
Request example#
shell
curl --location --request POST \
'https://your-api-endpoint.com/OKXDEX/rfq/firm-order' \
--header 'X-API-KEY: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"chainIndex": "501",
"rfqId": "1748612345678",
"callData": "2TTazkUnUv..."
}'
Response example: MM broadcast#
json
{
"code": "0",
"msg": "",
"data": {
"chainIndex": "501",
"rfqId": "1748612345678",
"txHash": "5Uf8PqzKLtVBh3J2mN9xYrQwDcEf7GiHkM4oP6sT1uV2wX8yZ3aB4cD5eF6gH7iJ"
}
}
Response example: OKX broadcast#
json
{
"code": "0",
"msg": "",
"data": {
"chainIndex": "501",
"rfqId": "1748612345678",
"signedTx": "THBYXUKt46Gg..."
}
}
