Multihop
Native Relay API and Router support multihop for pairs that have no direct market, making swapping with Native liquidity more versatile.
To enable, add allow_multihop=true when requesting /indicative-quote or /firm-quote.
Example
Example orderbooks:
[
// WBTC->USDT
{
"base_symbol": "WBTC",
"quote_symbol": "USDT",
"base_address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
"quote_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"minimum_in_base": 0,
"side": "bid",
"levels": [
[
0.5,
122739.77003987515
],
[
1,
122728.46555507004
],
[
1,
122713.39290866326
],
[
0.6261126319999994,
122701.13799830334
]
]
},
// USDT->USDC
{
"base_symbol": "USDT",
"quote_symbol": "USDC",
"base_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"quote_address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"minimum_in_base": 0,
"side": "bid",
"levels": [
[
295958.17538750934,
1.0003537268714557
]
]
},
//...Tx: https://www.tdly.co/shared/simulation/52280a28-72a7-41fb-a741-896101281cac
Last updated