curl -L \
"https://api.fibrous.finance/hyperevm/route?amount=1000000000000000000&tokenInAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&tokenOutAddress=0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb" \
--header "Accept: */*"
import requests
url = "https://api.fibrous.finance/hyperevm/route"
params = {
"amount": "1000000000000000000", # 1 HYPE
"tokenInAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"tokenOutAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
}
response = requests.get(url, params=params)
print(response.json())
const axios = require('axios');
const params = {
amount: '1000000000000000000', // 1 HYPE
tokenInAddress: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
tokenOutAddress: '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb'
};
axios.get('https://api.fibrous.finance/hyperevm/route', { params })
.then(response => console.log(response.data))
.catch(error => console.error(error));
{
"success": true,
"routeSwapType": 0,
"inputToken": {
"name": "Wrapped HYPE",
"address": "0x5555555555555555555555555555555555555555",
"decimals": 18,
"price": "55.19"
},
"inputAmount": "10000000000000000000",
"outputToken": {
"name": "USD₮0",
"address": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"decimals": 6,
"price": "1.001"
},
"outputAmount": "551482197",
"time": 0.257,
"estimatedGasUsed": "50659003741392",
"estimatedGasUsedInUsd": 0.005660637078063142,
"route": [
{
"percent": "100%",
"swaps": [
[
{
"protocol": 13,
"poolName": "hybraFinanceV3",
"poolAddress": "0x5a716e045421b0977ca5bfb4f3394139c6a069bc",
"fromTokenAddress": "0x5555555555555555555555555555555555555555",
"toTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"percent": "100.00%",
"extraData": {
"fee": 25
}
}
],
[
{
"protocol": 18,
"poolName": "kittenSwapAlgebraV4",
"poolAddress": "0x3cf44ef1500c1d559c8e81dffd6baeb0966b2712",
"fromTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"toTokenAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"percent": "98.00%",
"extraData": null
},
{
"protocol": 15,
"poolName": "gLiquidV3",
"poolAddress": "0x5e43a757ba769d4cd5fe568ae2429d4ae69e0ecf",
"fromTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"toTokenAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"percent": "2.00%",
"extraData": null
}
]
]
}
],
"bestQuotesByProtocols": [],
"initial": false
}
Route
Find the optimal trading route through Fibrous liquidity pools
GET
/
hyperevm
/
route
curl -L \
"https://api.fibrous.finance/hyperevm/route?amount=1000000000000000000&tokenInAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&tokenOutAddress=0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb" \
--header "Accept: */*"
import requests
url = "https://api.fibrous.finance/hyperevm/route"
params = {
"amount": "1000000000000000000", # 1 HYPE
"tokenInAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"tokenOutAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
}
response = requests.get(url, params=params)
print(response.json())
const axios = require('axios');
const params = {
amount: '1000000000000000000', // 1 HYPE
tokenInAddress: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
tokenOutAddress: '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb'
};
axios.get('https://api.fibrous.finance/hyperevm/route', { params })
.then(response => console.log(response.data))
.catch(error => console.error(error));
{
"success": true,
"routeSwapType": 0,
"inputToken": {
"name": "Wrapped HYPE",
"address": "0x5555555555555555555555555555555555555555",
"decimals": 18,
"price": "55.19"
},
"inputAmount": "10000000000000000000",
"outputToken": {
"name": "USD₮0",
"address": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"decimals": 6,
"price": "1.001"
},
"outputAmount": "551482197",
"time": 0.257,
"estimatedGasUsed": "50659003741392",
"estimatedGasUsedInUsd": 0.005660637078063142,
"route": [
{
"percent": "100%",
"swaps": [
[
{
"protocol": 13,
"poolName": "hybraFinanceV3",
"poolAddress": "0x5a716e045421b0977ca5bfb4f3394139c6a069bc",
"fromTokenAddress": "0x5555555555555555555555555555555555555555",
"toTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"percent": "100.00%",
"extraData": {
"fee": 25
}
}
],
[
{
"protocol": 18,
"poolName": "kittenSwapAlgebraV4",
"poolAddress": "0x3cf44ef1500c1d559c8e81dffd6baeb0966b2712",
"fromTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"toTokenAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"percent": "98.00%",
"extraData": null
},
{
"protocol": 15,
"poolName": "gLiquidV3",
"poolAddress": "0x5e43a757ba769d4cd5fe568ae2429d4ae69e0ecf",
"fromTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"toTokenAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"percent": "2.00%",
"extraData": null
}
]
]
}
],
"bestQuotesByProtocols": [],
"initial": false
}
Endpoint
https://api.fibrous.finance/hyperevm/route
Query Parameters
string
required
The amount of input tokens in wei format. For tokens with 18 decimals, multiply the amount by 10^18.Example:
"1000000000000000000" for 1 HYPEstring
required
The address of the input token.Example:
"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" for HYPEstring
required
The address of the output token.Example:
"0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb" for USDCboolean
If true, the amount parameter represents the desired output amount instead of input amount.
Default:
falseboolean
If true, only direct swaps between the input and output tokens will be considered.
Default:
falsearray[string]
Array of protocol names to exclude from routing.
Default:
[]Response
boolean
Indicates if the request was successful.
number
Type of swap route
object
object
string
The estimated amount of output tokens in wei format.
string
Estimated gas cost for the swap in wei.
number
Estimated gas cost in USD.
array
Array of route segments with detailed swap information.
Show child attributes
Show child attributes
string
Percentage of input amount going through this route
curl -L \
"https://api.fibrous.finance/hyperevm/route?amount=1000000000000000000&tokenInAddress=0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee&tokenOutAddress=0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb" \
--header "Accept: */*"
import requests
url = "https://api.fibrous.finance/hyperevm/route"
params = {
"amount": "1000000000000000000", # 1 HYPE
"tokenInAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"tokenOutAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb"
}
response = requests.get(url, params=params)
print(response.json())
const axios = require('axios');
const params = {
amount: '1000000000000000000', // 1 HYPE
tokenInAddress: '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee',
tokenOutAddress: '0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb'
};
axios.get('https://api.fibrous.finance/hyperevm/route', { params })
.then(response => console.log(response.data))
.catch(error => console.error(error));
{
"success": true,
"routeSwapType": 0,
"inputToken": {
"name": "Wrapped HYPE",
"address": "0x5555555555555555555555555555555555555555",
"decimals": 18,
"price": "55.19"
},
"inputAmount": "10000000000000000000",
"outputToken": {
"name": "USD₮0",
"address": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"decimals": 6,
"price": "1.001"
},
"outputAmount": "551482197",
"time": 0.257,
"estimatedGasUsed": "50659003741392",
"estimatedGasUsedInUsd": 0.005660637078063142,
"route": [
{
"percent": "100%",
"swaps": [
[
{
"protocol": 13,
"poolName": "hybraFinanceV3",
"poolAddress": "0x5a716e045421b0977ca5bfb4f3394139c6a069bc",
"fromTokenAddress": "0x5555555555555555555555555555555555555555",
"toTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"percent": "100.00%",
"extraData": {
"fee": 25
}
}
],
[
{
"protocol": 18,
"poolName": "kittenSwapAlgebraV4",
"poolAddress": "0x3cf44ef1500c1d559c8e81dffd6baeb0966b2712",
"fromTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"toTokenAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"percent": "98.00%",
"extraData": null
},
{
"protocol": 15,
"poolName": "gLiquidV3",
"poolAddress": "0x5e43a757ba769d4cd5fe568ae2429d4ae69e0ecf",
"fromTokenAddress": "0xfd739d4e423301ce9385c1fb8850539d657c296d",
"toTokenAddress": "0xb8ce59fc3717ada4c02eadf9682a9e934f625ebb",
"percent": "2.00%",
"extraData": null
}
]
]
}
],
"bestQuotesByProtocols": [],
"initial": false
}
⌘I