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 |
| 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 | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique identifier for the chain. e.g., 1: Ethereum. See more here. |
| pmmProtocol | String | Yes | settlement contract address |
| makerAmount | String | Yes | Trade quantity of makerToken |
| makerAddress | String | Yes | Address of order signer |
| takerAsset | String | Yes | Address of takerToken |
| makerAsset | String | Yes | Address of makerToken |
| takerAmount | String | Yes | Trade quantity of takerToken |
| takerAddress | String | Yes | Address of Taker |
| rfqId | Long | Yes | A unique identifier assigned to each quote request. |
| expiry | Timestamp | Yes | Expiration time. |
| signature | String | Yes | The signature of market maker. |
| callData | String | No | The signed transaction and the modified calldata.(required for solana) |
| signatureScheme | String | No | EIP-712 or EIP-1271(required for EVM) |
| usePermit2 | Boolean | No | Use Permit2 to approve, default is false.(required for EVM) |
| permit2Signature | String | No | Optional inline Permit2 signature (65 bytes if present) |
| permit2Witness | String | No | Packed witness hash when using Permit2 witnesses |
| permit2WitnessType | String | No | Canonical witness type string for Permit2 |
| confidenceT | Long | No | Request timestamp plus offset |
| confidenceRate | Long | No | Slippage per second, 1e6 |
| confidenceCap | Long | No | Maximum slippage cap ,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
}
