/swapTo - Request swap options
Check the swap options for a given token
The /swapTo endpoint is called specifying a token, and provides a list of tokens it can be traded to using SwapKit's API. The response includes all possible providers.
It can be used as an alternative filter to the /tokens endpoint.
Method: GET
URL: https://api.swapkit.dev/swapTo
Example Request
curl -X 'GET' \
'https://api.swapkit.dev/swapTo?sellAsset=BTC.BTC' \
-H 'accept: application/json' \
-H "x-api-key: YOUR_VARIABLE_HERE"Example shortened response
[
"BTC.BTC",
"ETH.USDT-0xdAC17F958D2ee523a2206206994597C13D831ec7",
"ETH.ETH",
"MAYA.CACAO",
"ETH.USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48",
"THOR.RUNE",
"SOL.SOL",
"ETH.USDC-0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"BASE.USDC-0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"ARB.WBTC-0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f",
"ARB.USDC-0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"ETH.WBTC-0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599",
"ETH.CBBTC-0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
"BASE.CBBTC-0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
"BSC.BTCB-0x7130d2A12B9BCbFAe4f2634d864A1Ee1Ce3Ead9c",
"BSC.USDC-0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d",
...
]
Notes
Include the token's identifier in the request as a parameter, as in the example request.
For USDC on Ethereum, it would be
https://api.swapkit.dev/swapTo?sellAsset=ETH.USDC-0XA0B86991C6218B36C1D19D4A2E9EB0CE3606EB48for example
As mentioned before, the response includes all available tokens to swap to using any of the providers SwapKit has available. Because of this, the list for an ERC-20 token will be quite long.
Last updated

