Utviklerportal
Tema

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-order

Request parameters#

FieldTypeRequiredDescription
chainIndexStringYesUnique chain identifier; Solana is fixed to 501.
rfqIdStringYesRFQ correlation identifier generated by OKX.
callDataStringYesBase58-encoded Solana transaction already signed by the user.

Required validation#

  1. Validate that rfqId exists, belongs to the expected request, and remains valid.
  2. Validate that instructions, accounts, mints, amounts, and recipients match the expected RFQ.
  3. Validate the user signature.
  4. Validate that the execution price and current liquidity remain acceptable.
  5. Validate the recent blockhash, account state, and current executability.
  6. Add the required market-maker signature.
  7. Return txHash or signedTx according to the agreed broadcast mode.

Response parameters#

FieldTypeRequiredDescription
codeStringYes0 means success.
msgStringYesEmpty on success; reason on failure.
data.chainIndexStringYesUnique chain identifier.
data.rfqIdStringYesEcho of the request rfqId.
data.txHashStringConditionalReturn only in MM-broadcast mode; Base58 Solana transaction hash.
data.signedTxStringConditionalReturn 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..."
  }
}