API - v0.1
This page provides a guide on how to use the Fluid3 RESTful API, enabling developers to seamlessly integrate the Fluid3 liquidity layer into their dApp.
Authentication
The Fluid3 API does not currently require any form of authentication and can be accessed directly from the endpoints listed below.
For platforms anticipating high traffic/ RPS, please contact us.
Supported Chains
GET
https://api.fluid3.io/v1/supported/chain
Retrieve a list of supported chains.
[
{
"key": "eth",
"type": "EVM",
"name": "Ethereum",
"ticker": "ETH",
"id": 1,
"metamask": {
"chainId": "0x1",
"blockExplorerUrls": [
"https://etherscan.io/"
],
"chainName": "Ethereum Mainnet",
"nativeCurrency": {
"name": "ETH",
"symbol": "ETH",
"decimals": 18
},
"rpcUrls": [
"https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161"
]
}
},
{
"key": "pol",
"type": "EVM",
"name": "Polygon",
"ticker": "MATIC",
"id": 137,
"metamask": {
"chainId": "0x89",
"blockExplorerUrls": [
"https://polygonscan.com/",
"https://explorer-mainnet.maticvigil.com/"
],
"chainName": "Matic(Polygon) Mainnet",
"nativeCurrency": {
"name": "MATIC",
"symbol": "MATIC",
"decimals": 18
},
"rpcUrls": [
"https://polygon-rpc.com/",
"https://rpc-mainnet.maticvigil.com/"
]
}
}
]
Supported Gateways
GET
https://api.fluid3.io/v1/supported/gateway
Retrieve a list of supported gateways.
{
"exchange": [
{
"key": "dodo",
"name": "DODO",
"supportedChain": [
1,
56,
137,
42161,
43114,
1285,
1313161554,
288,
66
]
},
{
"key": "1inch",
"name": "1inch",
"supportedChain": [
1,
56,
137,
10,
43114,
100,
250,
42161,
1313161554
]
}
]
}
Supported Tokens
GET
https://api.fluid3.io/v1/supported/token
Retrieve a list of supported tokens, or look up specific tokens.
Query Parameters
{
"key": "USDT",
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"chainId": 1,
"ticker": "USDT",
"decimal": 6,
"name": "USDT",
"priceUSD": "1.000165"
}
{
"1": [
{
"key": "ETH",
"address": "0x0000000000000000000000000000000000000000",
"chainId": 1,
"ticker": "ETH",
"decimal": 18,
"name": "ETH",
"priceUSD": "1914.85"
},
{
"key": "WETH",
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"chainId": 1,
"ticker": "WETH",
"decimal": 18,
"name": "WETH",
"priceUSD": "1914.85"
}
]
}
Request Quote
GET
https://api.fluid3.io/v1/exchange/quote
Request for a quotation with the given parameters.
*Note: fromChain
and toChain
must be the same value. This restriction will be lifted when the protocol supports cross chain swaps.
Query Parameters
{
"fromChainId": 1,
"fromAmount": "173640000000000000000",
"fromToken": {
"address": "0x0000000000000000000000000000000000000000",
"chainId": 1,
"symbol": "ETH",
"decimals": 18,
"name": "ETH",
"priceUSD": "1914.85",
"coinKey": "ETH"
},
"fromAddress": "0x0000000000000000000000000000000000000001",
"toChainId": 1,
"toToken": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"chainId": 1,
"symbol": "USDT",
"decimals": 6,
"name": "USDT",
"priceUSD": "1.000165",
"coinKey": "USDT"
},
"toAddress": "0x0000000000000000000000000000000000000001",
"slippage": 0.005,
"estimate": {
"toAmount": "332517649802",
"toAmountMin": "330855061553",
"executionDuration": 30,
"fromAmountUSD": "332494.55",
"toAmountUSD": "332572.52"
},
"transaction": {
"data": "0x4630a0d8909b67eb093a35695e0938fe317d5856cc5ff40267d2f586c91d723178c3122500000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000004d082ddf8f000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000000086c6966692d617069000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a30783030303030303030303030303030303030303030303030303030303030303030303030303030303000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000001111111254eeb25477b68fb85ed929f73a9605820000000000000000000000001111111254eeb25477b68fb85ed929f73a9605820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000969bd34040ed4000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000068812aa3caf00000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf33588000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf335880000000000000000000000009b11bc9fac17c058cab6286b0c785be6a65492ef00000000000000000000000000000000000000000000000969bd34040ed400000000000000000000000000000000000000000000000000000000004d087f9830000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004f40000000000000000000000000000000000000004d60004a800045e00044400a0c9e75c480000000000000000060400000000000000000000000000000000000000000000000000041600020d00a007e5c0d20000000000000000000000000000000000000001e900013900006900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db002a00000000000000000000000000000000000000000000000034ad57f7cdbda1c65ee63c1e500109830a1aaad605bbf02a9dfa7b0b92ec2fb7daac02aaa39b223fe8d0a0e5c4f27ead9083c756cc2512237417b2238aa52d0dd2d6252d989e728e8f706e47f39c581f595b53c5cb19bd0b3f8da6c935e2ca00044a64833a0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf335885120390f3595bca2df7d23783dfd126427cceb997bf4f939e0a03fb07f59a73314e73794be0e57ac1b4e00443df021240000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001eaabf7c2a00a0c9e75c480000000000000000250d0000000000000000000000000000000000000000000000000001db00008d00a007e5c0d200000000000000000000000000000000000000000000000000006900001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db002a00000000000000000000000000000000000000000000000000000000bf3fc6c0eee63c1e50111b815efb8f581194ae79006d24e0d814b7697f6c02aaa39b223fe8d0a0e5c4f27ead9083c756cc200a007e5c0d200000000000000000000000000000000000000000000000000012a00001a4041c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2d0e30db05120d17b3c9784510e33cd5b87b490e79253bcd81e2ec02aaa39b223fe8d0a0e5c4f27ead9083c756cc2004458d30ac9000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002206aa9a9e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000092f3f71cef740ed5784874b8c70ff87ecdf335880000000000000000000000000000000000000000000000000000000064bdfd890020d6bdbf78dac17f958d2ee523a2206206994597c13d831ec700a0f2fa6b66dac17f958d2ee523a2206206994597c13d831ec70000000000000000000000000000000000000000000000000000004d6b98ad8a000000000000000000000000004c4b4080a06c4eca27dac17f958d2ee523a2206206994597c13d831ec71111111254eeb25477b68fb85ed929f73a9605820000000000000000000000002e9b3012000000000000000000000000000000000000000000000000",
"to": "0x9b11bc9FAc17c058CAB6286b0c785bE6a65492EF",
"value": "0x0969bd34040ed40000",
"from": "0x0000000000000000000000000000000000000001",
"chainId": 1,
"gasPrice": "0x050f2d3399",
"gasLimit": "0x17f34c"
}
}
Last updated