Vývojářský portál
Motiv

Pricing#

OKX polls this endpoint every second to retrieve supported pairs, the maker address, and independent price levels for the requested chain.

Request URL#

GET
https://your-api-endpoint.com/OKXDEX/rfq/pricing

Request parameters#

ParameterTypeRequiredDescription
chainIndexStringYesUnique chain identifier; Solana is fixed to 501.

Response parameters#

FieldTypeDescription
codeString0 on success.
msgStringEmpty on success; reason on failure.
data.chainIndexStringUnique chain identifier.
data.levelData[]ArrayList of supported pair/depth entries.
.takerTokenAddressStringMint address of the token sold by the taker.
.makerTokenAddressStringMint address of the token bought by the taker.
.makerAddressStringMM wallet used by OKX to build calldata and derive Solana ATAs.
.levelsArrayIndependent, non-cumulative [amount, rate] entries. amount is the taker-token quantity; rate is the taker-to-maker exchange rate.
.minTakerAmountStringMinimum accepted taker quantity. Omitted, null, or 0 means no minimum. Use the same unit as levels[][0].

Price-level rule: levels are independent, incremental depth entries. Each level represents only its own executable quantity and rate; do not carry prior-level quantity into later levels.

Request example#

shell
curl --location --request GET \
  'https://your-api-endpoint.com/OKXDEX/rfq/pricing?chainIndex=501' \
  --header 'X-API-KEY: <API_KEY>'

Response example#

json
{
  "code": "0",
  "msg": "",
  "data": {
    "chainIndex": "501",
    "levelData": [
      {
        "takerTokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "makerTokenAddress": "So11111111111111111111111111111111111111112",
        "minTakerAmount": "0.1",
        "makerAddress": "MMyVMkp3BmjNHnQQ9B9ApNcGBXgQHnSR7rV3dBdNaZd",
        "levels": [
          ["0.1", "0.00625"],
          ["0.5", "0.00620"]
        ]
      }
    ]
  }
}