1inch_v6_0_classic_swap_liquidity_sources
The 1inch_v6_0_classic_swap_liquidity_sources
method returns liquidity sources for classic swaps from 1inch API version 6.0.
To use methods which interface with the 1inch API, you need to set the 1inch_api
url in your MM2.json file.
You'll also need to set your 1inch API key as an environment variable called ONE_INCH_API_TEST_AUTH
, e.g. ONE_INCH_API_TEST_AUTH="Bearer YourAPIkey"
.
As this feature is still experimental, you will need to build KDF from source on the dev branch with a build flag, e.g. cargo build --features test-ext-api
.
Refer to the 1inch Classic Swap documentation for more information.
Structure | Type | Description |
---|---|---|
chain_id | numeric | Chain id |
Structure | Type | Description |
---|---|---|
dst_amount | rational number | Destination token amount, in coins units. |
protocols | list | Optional. A list of standard 1inchProtocolImage objects. |
POST
1inch_v6_0_classic_swap_liquidity_sources{
"mmrpc": "2.0",
"userpass": "RPC_UserP@SSW0RD",
"method": "1inch_v6_0_classic_swap_liquidity_sources",
"params": {
"chain_id": 1
}
}