Firm order#
OKX DEX will request relevant data using the parameters below.
Request Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique identifier for the chain. e.g., 1: Ethereum. See more here. |
| takerAsset | String | Yes | Address of takerToken |
| makerAsset | String | Yes | Address of makerToken |
| takerAmount | String | Yes | Trade quantity of takerToken |
| toAmount | String | — | The expected makerToken output amount calculated using the Levels returned during the Pricing stage and the takerAmount for this request. Expressed in the token's smallest unit, consistent with makerAmount in the Firm Order response. |
| takerAddress | String | Yes | Address of Taker |
| rfqId | Long | Yes | A unique identifier assigned to each quote request. |
| expiryDuration | Integer | Yes | This parameter sets the validity duration of a quote or request, indicating the time interval from when the quote/request is generated until it expires. |
| callData | String | No | The transaction needs to be signed, this requirement applies to Solana only. |
| beneficiaryAddress | String | No | Address of taker |
| orderId | String | No | |
| confidenceT | Long | No | Slippage start time (in seconds) |
| confidenceRate | Long | No | Slippage per second, 1e6 |
| confidenceCap | Long | No | Maximum slippage cap ,1e6 |
| requestType | String | No | 0: C-end users or whitelisted API keys 1: Other OpenAPI requests |
| slippageRejectThreshold | String | No | Maximum permitted slippage fluctuation for this request. The project may reject the order if this threshold is exceeded. `` indicates that the parameter was not provided and is handled by the compatibility policy. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| chainIndex | String | Unique chain identifier. For example, 1 represents Ethereum. See supported chains for more information. |
| pmmProtocol | String | Settlement contract address. |
| makerAmount | String | Amount of makerToken to trade. |
| makerAddress | String | Address of the order signer. |
| takerAsset | String | Address of takerToken. |
| makerAsset | String | Address of makerToken. |
| takerAmount | String | Amount of takerToken to trade. |
| takerAddress | String | Address of the taker. |
| toAmount | String | The expected makerToken output amount calculated using the Levels returned during the Pricing stage and the takerAmount for this request. Expressed in the token's smallest unit, consistent with makerAmount in the Firm Order response. |
| rfqId | Long | Unique identifier assigned to each quote request. |
| expiry | Timestamp | Expiration timestamp. |
| signature | String | Market maker's signature. |
| callData | String | Signed transaction and modified call data (required for Solana). |
| signatureScheme | String | EIP-712 or EIP-1271 (required for EVM). |
| usePermit2 | Boolean | Whether to use Permit2 for approval. Defaults to false (required for EVM). |
| permit2Signature | String | Optional embedded Permit2 signature (65 bytes if provided). |
| permit2Witness | String | Packed witness hash when using a Permit2 witness. |
| permit2WitnessType | String | Canonical witness type string for Permit2. |
| confidenceT | Long | Request time plus the specified timestamp. |
| confidenceRate | Long | Slippage per second, with a precision of 1e6. |
| confidenceCap | Long | Maximum slippage, with a precision of 1e6. |
Request Example#
json
{
"chainIndex" : "1",
"takerAsset": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", // Address of takerToken
"makerAsset": "0xdac17f958d2ee523a2206206994597c13d831ec7", // Address of makerToken
"takerAmount": "6000000000000000", // Quantity of takerToken
"takerAddress": "taker address", // Address of order taker
"rfqId": 12345678, // uniqueId for the rfq
"expiryDuration": 60
"beneficiaryAddress":"0xf921fb05ed9db87889f413d7fefb2cd4af03beb6" // Address of taker
"orderId": 1002142110, //
"confidenceT": 30, // Slippage start time (in seconds)
"confidenceRate": 75, // Slippage per second, 1e6
"confidenceCap": 1200, // Maximum slippage cap ,1e6
"slippageRejectThreshold": null
}
Response Example#
json
{
"chainIndex" : "1",
"rfqId" : 12345678,
"expiry": 172120120102,
"pmmProtocol": "0x0Bdf246b4AEF9Cfe4DD6eEf153A1b645aC4BcBb6", //settlement contract address
"makerAsset": "0xdac17f958d2ee523a2206206994597c13d831ec7", //Address of makerToken
"takerAsset": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", //Address of takerToken
"makerAddress": "0xcfdfea67395c531249a9e1dc8d916c9158810509", //Address of order signer
"takerAddress": "0xF36bC73f9783539E1DAC8Cf6d2bfd74e0663699C", //Address of trading user
"makerAmount": "100000000", //Trade quantity of makerToken. TakerAmount * takerTokenRate
"takerAmount": "6000000000000000", //Trade quantity of takerToken
"signature": "0xc64bf62b7619edda019fe491da256b9fbe892fbfeac91f9d1fce168478ad53053dde038584f063fe21e267fcb4e758bcf420036cd2838fe5cbd993ec6d3dde561b",
"sign_scheme": "EIP-712" //EIP-712 or 1271,
"usePermit2": false
"confidenceT": 1769767048, // Request timestamp plus offset
"confidenceRate": 75, // Slippage per second, 1e6
"confidenceCap": 1200, // Maximum slippage cap ,1e6
}
