dex
Create Order
Generates an unsigned limit order message for decentralized trading, specifying parameters for maker/taker assets, amounts, fees, and execution conditions. The endpoint returns EIP-712 domain data, type definitions, and a structured payload (including salt, addresses, and asset data), which must be signed using the Blockdaemon SDK to finalize the order on-chain.
💡 Compute Unit Value: 15 (Fixed)
post/defi/v1/dex/createorder
Request
- Base URLhttps://svc.blockdaemon.com
- URLhttps://svc.blockdaemon.com/defi/v1/dex/createorder
- AuthAPI key in header X-API-Key
Request body
Example request
{
"dexId": "1900",
"amountOutMin": "0",
"decayStartTime": "1741869257",
"decayEndTime": "1741969257",
"deadline": "1707313948",
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"path": [
"0x514910771AF9Ca656af840dff83E8264EcF986CA",
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
],
"amountIn": "1000000000000000000",
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"slippage": "10",
"enableFee": false,
"makerAsset": "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
"takerAsset": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
"amountOut": "1000000000000000000"
}Response
Successful response
Example response
{
"status": 200,
"msg": "success",
"data": {
"unsignedCreateOrder": {
"types": {
"DSOrder": [
{
"name": "orderHash",
"type": "bytes32"
},
{
"name": "opExpireTime",
"type": "uint32"
}
],
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Order": [
{
"name": "salt",
"type": "uint256"
},
{
"name": "makerAsset",
"type": "address"
},
{
"name": "takerAsset",
"type": "address"
},
{
"name": "maker",
"type": "address"
},
{
"name": "receiver",
"type": "address"
},
{
"name": "allowedSender",
"type": "address"
},
{
"name": "makingAmount",
"type": "uint256"
},
{
"name": "takingAmount",
"type": "uint256"
},
{
"name": "feeConfig",
"type": "uint256"
},
{
"name": "makerAssetData",
"type": "bytes"
},
{
"name": "takerAssetData",
"type": "bytes"
},
{
"name": "getMakerAmount",
"type": "bytes"
},
{
"name": "getTakerAmount",
"type": "bytes"
},
{
"name": "predicate",
"type": "bytes"
},
{
"name": "interaction",
"type": "bytes"
}
]
},
"domain": {
"chainId": "137",
"name": "Kyber DSLO Protocol",
"verifyingContract": "0xcab2FA2eeab7065B45CBcF6E3936dDE2506b4f6C",
"version": "1"
},
"primaryType": "Order",
"message": {
"allowedSender": "0x0000000000000000000000000000000000000000",
"feeConfig": "146604093245187877466343990972209337885448885627689",
"getMakerAmount": "0xf4a215c30000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000007a120",
"getTakerAmount": "0x296637bf0000000000000000000000000000000000000000000000000de0b6b3a7640000000000000000000000000000000000000000000000000000000000000007a120",
"interaction": "0x",
"maker": "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402",
"makerAsset": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"makerAssetData": "0x",
"makingAmount": "1000000000000000000",
"predicate": "0x961d5b1e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000cab2fa2eeab7065b45cbcf6e3936dde2506b4f6c000000000000000000000000cab2fa2eeab7065b45cbcf6e3936dde2506b4f6c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000044cf6fc6e3000000000000000000000000dae2f6eddda6fb4fb60cc02633de27e2b431b402000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002463592c2b000000000000000000000000000000000000000000000000000000006c8b6e2a00000000000000000000000000000000000000000000000000000000",
"receiver": "0xdae2f6eddda6fb4fb60cc02633de27e2b431b402",
"salt": "106607874126107032926667449974930188158",
"takerAsset": "0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
"takerAssetData": "0x",
"takingAmount": "500000"
}
},
"referenceId": "efbbc600a72441fd9390ffc15049a787"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.