JSON Example
Last updated
Was this helpful?
Last updated
Was this helpful?
If we take a look at request below, where we are trading 1000 ARB on Arbitrum for Matic on Polygon, it will produce the following JSON response.
{
"estimation": {
"srcChainTokenIn": {
"address": "0x912ce59144191c1204e64559fe8253a0e49e6548",
"chainId": 42161,
"decimals": 18,
"name": "Arbitrum",
"symbol": "ARB",
"amount": "1000097362178910640486",
"approximateOperatingExpense": "97362178910640486",
"mutatedWithOperatingExpense": true,
"approximateUsdValue": 337.491121850529,
"originApproximateUsdValue": 337.458266178442
},
"srcChainTokenOut": {
"address": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"chainId": 42161,
"decimals": 6,
"name": "USD Coin",
"symbol": "USDC",
"amount": "336778910",
"maxRefundAmount": "1182866",
"approximateUsdValue": 336.77891
},
"dstChainTokenOut": {
"address": "0x0000000000000000000000000000000000000000",
"chainId": 137,
"decimals": 18,
"name": "Polygon",
"symbol": "MATIC",
"amount": "1414379129275580318365",
"recommendedAmount": "1414379129275580318365",
"maxTheoreticalAmount": "1427196423556434769924",
"approximateUsdValue": 334.305266698456,
"recommendedApproximateUsdValue": 334.305266698456,
"maxTheoreticalApproximateUsdValue": 337.334786078531
},
"costsDetails": [
{
"chain": "42161",
"tokenIn": "0x912ce59144191c1204e64559fe8253a0e49e6548",
"tokenOut": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"amountIn": "1000097362178910640486",
"amountOut": "337961776",
"type": "PreSwap"
},
{
"chain": "42161",
"tokenIn": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"tokenOut": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"amountIn": "337961776",
"amountOut": "336778910",
"type": "PreSwapEstimatedSlippage",
"payload": {
"feeAmount": "1182866",
"feeBps": "35",
"estimatedVolatilityBps": "35"
}
},
{
"chain": "42161",
"tokenIn": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"tokenOut": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
"amountIn": "336778910",
"amountOut": "336644199",
"type": "DlnProtocolFee",
"payload": {
"feeAmount": "134711",
"feeBps": "4",
"feeApproximateUsdValue": "0.134711"
}
},
{
"chain": "137",
"tokenIn": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"tokenOut": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"amountIn": "336644199",
"amountOut": "336509542",
"type": "TakerMargin",
"payload": {
"feeAmount": "134657",
"feeBps": "4"
}
},
{
"chain": "137",
"tokenIn": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"tokenOut": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"amountIn": "336509542",
"amountOut": "336476680",
"type": "EstimatedOperatingExpenses",
"payload": {
"feeAmount": "32862"
}
},
{
"chain": "137",
"tokenIn": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"tokenOut": "0x0000000000000000000000000000000000000000",
"amountIn": "336476680",
"amountOut": "1422201236073987248230",
"type": "AfterSwap",
"payload": {
"amountOutBeforeCorrection": "1422201236073987248230"
}
},
{
"chain": "137",
"tokenIn": "0x0000000000000000000000000000000000000000",
"tokenOut": "0x0000000000000000000000000000000000000000",
"amountIn": "1422201236073987248230",
"amountOut": "1414379129275580318365",
"type": "AfterSwapEstimatedSlippage",
"payload": {
"feeAmount": "7822106798406929865",
"feeBps": "55",
"estimatedVolatilityBps": "55"
}
}
],
"recommendedSlippage": 0.9
},
"tx": {
"value": "1000000000000000",
"data": "0x4d8160ba000000000000000000000000912ce59144191c1204e64559fe8253a0e49e654800000000000000000000000000000000000000000000003637239428a726d96600000000000000000000000000000000000000000000000000000000000001400000000000000000000000006131b5fae19ea4f9d964eac0408e4408b66337b50000000000000000000000000000000000000000000000000000000000000160000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000000000000000000000000000000000001412d69e00000000000000000000000055a8f5cce1d53d9ff84ec0962882b447e5914db8000000000000000000000000ef4fb24ad0916217251f553c0596f8edc630eb660000000000000000000000000000000000000000000000000000000000000940000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a4e21fd0e90000000000000000000000000000000000000000000000000000000000000020000000000000000000000000c7d3ab410d49b664d03fe5b1038852ac852b1b29000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000004e000000000000000000000000000000000000000000000000000000000000001c402020000003d0200000011d53ec50bc8f54b9357fbfe2a7de034fc00f8b3000000000000000d8dc8e50a29c9b65e0100000000000000000000000000000000000000000a0000002e020000006f38e884725a116c9c7fbf208e79fe8828a2595f010100000000000000000000000000000001000276a40a020000003d020000006ce9bc2d8093d32adde4695a4530b96558388f7e0000000000000028a95aaf1e7d5d23080100000000000000000000000000000000000000000a0000006102000000b1026b8e7276e7ac75410f1fcbbe21796e8f7526af88d065e77c8cc2239327c5edb3a432268e5831010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010009046d15912ce59144191c1204e64559fe8253a0e49e6548af88d065e77c8cc2239327c5edb3a432268e5831663dc15d3c1ac63ff12e45ab68fea3f0a883c25100000000000000000000000068151dea000000540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001510000000000000000000000001424e3304f82e73edb06d29ff62c91ec8f5ff06571bdeb2900000000000000000000000000000000000000000000000000000000000000000000000000000000912ce59144191c1204e64559fe8253a0e49e6548000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000663dc15d3c1ac63ff12e45ab68fea3f0a883c25100000000000000000000000000000000000000000000003637239428a726d966000000000000000000000000000000000000000000000000000000001412d69d000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c7d3ab410d49b664d03fe5b1038852ac852b1b29000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000003637239428a726d96600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002707b22536f75726365223a2264654272696467652d346663642d396531662d393161373561343166333562222c22416d6f756e74496e555344223a223333382e3534393433323535393439343835222c22416d6f756e744f7574555344223a223333382e3436323735373036353236383134222c22526566657272616c223a22222c22466c616773223a302c22416d6f756e744f7574223a22333337393631373736222c2254696d657374616d70223a313734363231333137382c22526f7574654944223a2264356636393531372d343162362d346237632d616435302d623032663132313261373130222c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a22634552725149787330784b50584d3670726d4c484f4e553757324b762b365839646a6c4b385a6972746361762b66617a744c46646e33775a2f6c5277317533487a4d5649554d7a65507a567476303663782b386742754174594651714f626e6159624d6d6b7774786e6848346b4a336c3278544f733134457639585735386b54757069496c48494f7a565479644f4a693838707238746c753534757353514b55453142707353356a35456651415577303137626271384b557670496943346f685050506b66514d33457a4c575a3362427976504367646e6442332f4444597433544e5970525262474e36476e623375664a682f5a696e4f3749666d49587576625a5046316a335a2f77327a333655774d495866732f334142333376774d5a6d4d4f2b7747774637696c5a7a3770783865646336695a5939672b5368735852354a37794f4e467072773674495831652b674757464637513d3d227d7d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000424b930370100000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000196926a90a000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000007c3d000000000000000000000000000000000000000000000000000000000000038000000000000000000000000000000000000000000000000000000000000003a0000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e5831000000000000000000000000000000000000000000000000000000001412d69e000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000004cac74145fd542829d000000000000000000000000000000000000000000000000000000000000008900000000000000000000000000000000000000000000000000000000000001a000000000000000000000000055a8f5cce1d53d9ff84ec0962882b447e5914db800000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001455a8f5cce1d53d9ff84ec0962882b447e5914db8000000000000000000000000000000000000000000000000000000000000000000000000000000000000001455a8f5cce1d53d9ff84ec0962882b447e5914db80000000000000000000000000000000000000000000000000000000000000000000000000000000000000014555ce236c0220695b68341bc48c68d52210cc35b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042010100000066d986c862e659010000000000000000000000009d8242d55f1474ac4c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"to": "0x663DC15D3C1aC63ff12E45Ab68FeA3F0a883C251"
},
"prependedOperatingExpenseCost": "97362178910640486",
"order": {
"approximateFulfillmentDelay": 3,
"salt": 1746213179552,
"metadata": "0x010100000066d986c862e659010000000000000000000000009d8242d55f1474ac4c0000000000000000000000000000000000000000000000000000000000000000"
},
"orderId": "0x19499ede9b21fa5cc0ce5f74a155482576ff7d85b51863fb5231dbf648300b6a",
"fixFee": "1000000000000000",
"userPoints": 198.47,
"integratorPoints": 49.62
}