GET /trade/v1/{chainId}/quote/cross
Find all available quotes for cross-chain trade via Unizen DEX Aggregator
The chain ID of the chain to quote on.
137Possible values: The address of the token being traded. If native, use address zero.
0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270The address of the token to receive in exchange. If native, use address zero.
0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7Amount of tokens being traded
10000000000000000000The chain ID of the destination network.
43114Possible values: The address of the sender.
0x54c47034887C582Fc1Af4a9a3b68180a8a9eF2d2The address of the receiver of the funds.
bc1qf7cd6pvs9sqnkr0nadsuhgecy8prnc9t8k0jnyThe maximum slippage percentage allowed.
0.005The timestamp of the transaction deadline.
1685541105List of dexes excluded by chain
{"1":["0x0000000000000"]}The percentage of price impact protection, from 0 to 1
0.5The fee percentage, from 0 to 1
The percentage of slippage protection, from 0 to 1, default 0.5
0.5Disable estimate gas, default is true.
Whether it is an exact out trade.
Whether split trade is enabled. Default is true.
The response is an array of objects, with each object representing one provider. Currently, we support two interoperable providers for cross-chain transactions: Stargate, Celer
GET /trade/v1/{chainId}/quote/cross?fromTokenAddress=text&toTokenAddress=text&amount=text&destinationChainId=1&sender=text HTTP/1.1
Host:
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
The response is an array of objects, with each object representing one provider. Currently, we support two interoperable providers for cross-chain transactions: Stargate, Celer
[
{
"srcTradeList": [
{}
],
"dstTradeList": [
{}
],
"srcTrade": {
"fromTokenAmount": "26031659637168024367",
"toTokenAmount": "26031659637168024367",
"deltaAmount": "26083722956442360416",
"tokenFrom": {
"name": "ZCX",
"symbol": "ZCX",
"decimals": 18,
"contractAddress": "0xc52c326331e9ce41f04484d3b5e5648158028804",
"priceInUsd": 0.1,
"chainId": 1,
"buyTax": 0,
"sellTax": 0
},
"tokenTo": {
"name": "ZCX",
"symbol": "ZCX",
"decimals": 18,
"contractAddress": "0xc52c326331e9ce41f04484d3b5e5648158028804",
"priceInUsd": 0.1,
"chainId": 1,
"buyTax": 0,
"sellTax": 0
},
"protocol": [
{}
],
"transactionData": {
"info": {
"amountIn": "26031659637168024367",
"amountOutMin": "26031659637168024367",
"amountInMax": "26083722956442360416",
"amountOut": "26083722956442360416",
"actualQuote": "26083722956442360416",
"srcToken": "text",
"dstToken": "text",
"uuid": "text",
"apiId": "text",
"userPSFee": 0,
"deadline": 1684251,
"tradeType": 0,
"slippage": 0.1,
"feePercent": 0,
"sharePercent": 0,
"tokenHasTaxes": false,
"path": false,
"v3Path": false
},
"amountInfo": {
"amount": "26031659637168024367",
"actualQuote": "26031659637168024367"
},
"call": [
"text"
]
}
},
"dstTrade": {
"fromTokenAmount": "26031659637168024367",
"toTokenAmount": "26031659637168024367",
"deltaAmount": "26083722956442360416",
"tokenFrom": {
"name": "ZCX",
"symbol": "ZCX",
"decimals": 18,
"contractAddress": "0xc52c326331e9ce41f04484d3b5e5648158028804",
"priceInUsd": 0.1,
"chainId": 1,
"buyTax": 0,
"sellTax": 0
},
"tokenTo": {
"name": "ZCX",
"symbol": "ZCX",
"decimals": 18,
"contractAddress": "0xc52c326331e9ce41f04484d3b5e5648158028804",
"priceInUsd": 0.1,
"chainId": 1,
"buyTax": 0,
"sellTax": 0
},
"protocol": [
{}
],
"transactionData": {
"info": {
"amountIn": "26031659637168024367",
"amountOutMin": "26031659637168024367",
"amountInMax": "26083722956442360416",
"amountOut": "26083722956442360416",
"actualQuote": "26083722956442360416",
"srcToken": "text",
"dstToken": "text",
"uuid": "text",
"apiId": "text",
"userPSFee": 0,
"deadline": 1684251,
"tradeType": 0,
"slippage": 0.1,
"feePercent": 0,
"sharePercent": 0,
"tokenHasTaxes": false,
"path": false,
"v3Path": false
},
"amountInfo": {
"amount": "26031659637168024367",
"actualQuote": "26031659637168024367"
},
"call": [
"text"
]
}
},
"transactionData": {},
"nativeValue": "29422186306758765852",
"nativeFee": "1070050644652846329",
"processingTime": 1000,
"tradeProtocol": "CROSS_CHAIN_CELER",
"crossChainTradeQuotesType": "TRADE_ON_BOTH",
"sourceChainId": 137,
"destinationChainId": 43114,
"contractVersion": "V1",
"providerInfo": {
"name": "Celer",
"contractVersion": "v2",
"logo": "https://api.zcx.com/data/logo/interoperability-provider/cbridge.svg"
},
"estimateGas": "11231133211313",
"estimateGasError": "Execution reverted",
"gasPrice": "56442235035"
}
]Last updated
Was this helpful?