Post DEX Exchange API
Initiates a decentralized exchange (DEX) transaction, including sender and receiver details, transaction status, quoted amounts, and associated fees.
Endpoint: POST /dexExchange
POST /dexExchange
Request Body: A JSON object containing dexExchange
details.
Request Body Fields:
Field
Type
Description
amount
number
Amount to be exchanged (example: 0.2
)
tokenIdTo
string
ID of the output token (example: 6689b73ec90e45f3b3e51558
)
tokenIdFrom
string
ID of the input token (example: 6689b73ec90e45f3b3e51553
)
addressTo
string
Destination address (example: H1DiPSsBVBpDG57q5ZnxhZpRrsPQBvZfrbFQth6wyGyw
)
addressFrom
string
Sender's address (example: 0x45CF73349a4895fabA18c0f51f06D79f0794898D
)
swap
string
Swap method (example: sw
)
quoteId
string
Quote identifier (example: 66fa79723eccf00d849b48ed
)
Inside RouteDTO we have QuoteDataDTO Fields explained below:
Field
Type
Description
integration
string
Integration name (example: debridge
)
type
string
Type of exchange (example: swap
)
bridgeFee
string
Fee for bridge transactions (example: 29257969
)
bridgeFeeInNativeToken
string
Bridge fee in native tokens (example: 1000000000000000
)
amount
string
Amount involved in the exchange (example: 657693444
)
decimals
number
Number of decimals for precision (example: 9
)
amountUSD
string
Amount converted to USD (example: 94.905
)
bridgeFeeUSD
string
Bridge fee in USD (example: 4.221
)
Example Request:
POST/dexExchange
Content-Type: application/json
{
"amount": 0.2,
"tokenIdTo": "6689b73ec90e45f3b3e51558",
"tokenIdFrom": "6689b73ec90e45f3b3e51553",
"addressTo": "H1DiPSsBVBpDG57q5ZnxhZpRrsPQBvZfrbFQth6wyGyw",
"addressFrom": "0x45CF73349a4895fabA18c0f51f06D79f0794898D",
"swap": "sw",
"quoteId": "66fa79723eccf00d849b48ed",
"route": {
"duration": 1,
"gas": "5387746374601800",
"quote": {
"integration": "debridge",
"type": "swap",
"bridgeFee": "29257969",
"bridgeFeeInNativeToken": "1000000000000000",
"amount": "657693444",
"decimals": 9,
"amountUSD": "94.905",
"bridgeFeeUSD": "4.221",
"bridgeFeeInNativeTokenUSD": "2.434",
"fees": [
{
"type": "bridge",
"amount": "29257969",
"amountUSD": "4.221",
"chainSlug": "solana",
"tokenSymbol": "SOL",
"tokenAddress": "11111111111111111111111111111111",
"decimals": 9,
"deductedFromSourceToken": true
},
{
"type": "bridge",
"amount": "1000000000000000",
"amountUSD": "2.434",
"chainSlug": "ethereum",
"tokenSymbol": "ETH",
"tokenAddress": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"deductedFromSourceToken": false
},
{
"type": "gas",
"amount": "5387746374601800",
"amountUSD": "13.118",
"chainSlug": "ethereum",
"tokenSymbol": "ETH",
"tokenAddress": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"deductedFromSourceToken": false
},
{
"type": "partner",
"amount": "200000",
"amountUSD": "0.200",
"chainSlug": "ethereum",
"tokenSymbol": "USDT",
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals": 6,
"deductedFromSourceToken": true
}
]
},
"route": [
{
"bridge": "debridge",
"bridgeTokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"steps": [
"allowance",
"approve",
"send"
],
"name": "USDC",
"part": 100
}
],
"distribution": {
"debridge": 1
},
"gasUSD": "13.118",
"useXmr": false,
"deviceInfo": "MacOS",
"isMobile": false
}
}
Example Response:
{
"houdiniId": "h9NpKm75gRnX7GWaFATwYn",
"created": "2024-10-08T12:22:25.843Z",
"senderAddress": "0xe90cAc99ccab34A669fFC2eE4e9c0E5067dE29ac",
"receiverAddress": "H1DiPSsBVBpDG57q5ZnxhZpRrsPQBvZfrbFQth6wyGyw",
"anonymous": false,
"expires": "2024-10-08T12:52:25.843Z",
"status": 0,
"inAmount": 50,
"inSymbol": "6689b73ec90e45f3b3e51592",
"outAmount": 0.266471241,
"outSymbol": "6689b73ec90e45f3b3e51558",
"senderTag": "",
"receiverTag": "",
"notified": false,
"eta": 1,
"inAmountUsd": 38.422,
"inCreated": "2024-10-08T12:22:25.843Z",
"quote": {
"amountIn": 50,
"amountOut": 0.266471241
},
"metadata": {
"from": "0xe90cAc99ccab34A669fFC2eE4e9c0E5067dE29ac",
"to": "0xD0c0bA0b6F151729f4BacB40b8Bb8047360b1ad6",
"data": "0x601e0bbe00000000000000000000000000000000000000000000000000000000000000200000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f9f4fb5cc1e4455f8c6fd0ca48090058443a5e7f0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000002b5e3af16b1880000000000000000000000000000000000000000000000000000000000001405a9530000000000000000000000000000000000000000000000000011c37937e0800000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000012c12c0d17c9ecde56ec1604582abfe102c331c235be9da45aa266519080d3e9d10d64656272696467650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ac76a51cc950d9822d68b83fe1ad97b32cd580d000000000000000000000000000000000000000000000002b480699e53fe00000000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000001405a9530000000000000000000000000000000000000000000000000000000000736f6c00000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000e90cac99ccab34a669ffc2ee4e9c0e5067de29ac00000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002400000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020edc95db8b8c45632a9599351eb3e42b2fe14638b0ee9c4c708fbf3529ac93cc20000000000000000000000000000000000000000000000000000000000000020edc95db8b8c45632a9599351eb3e42b2fe14638b0ee9c4c708fbf3529ac93cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"value": "0x11c37937e08000",
"txId": "0x2c0d17c9ecde56ec1604582abfe102c331c235be9da45aa266519080d3e9d10d",
"gas": "0x0699bc"
},
"isDex": true
}
Response Fields:
houdiniId
string
Unique transaction ID
created
string
Timestamp when transaction was created
senderAddress
string
Sender's wallet address
receiverAddress
string
Recipient's wallet address
anonymous
boolean
Indicates if transaction is anonymous
expires
string
Expiration timestamp
status
number
Status code
inAmount
number
Input amount
inSymbol
string
Input token symbol
outAmount
number
Output amount
outSymbol
string
Output token symbol
eta
number
Estimated time of arrival in minutes
inAmountUsd
number
Input amount in USD
inCreated
string
Timestamp when input was created
quote
object
Quoted exchange details
metadata
object
Additional metadata
isDex
boolean
Indicates if transaction is a DEX trade
Last updated