🧑💻API Specification
We do not offer API key to individual users at this time, if you are a project please contact mobbie#3450 on Discord
Parameters, input/output format
Basic GET API: https://router.firebird.finance/aggregator/v1/route?chainId=250&from=?&to=&receiver=&source=
Curl sample
curl --location --request GET 'https://router.firebird.finance/aggregator/v1/route?chainId=250&from=0x04068da6c83afcfa0e13ba15a6696662335d5b75&to=0xf24bcf4d1e507740041c9cfd2dddb29585adce1e&amount=10000000&receiver=0x3FD5e7C6A2950691ffbf9358d0C093de30f54432&source=discord_swap_bot'
Request query parameters
GET
URL: https://router.firebird.finance/aggregator/v1/route
Query Parameters
chainId*
integer
Currently, we support Fantom ( 250) and Cronos (25) The list with expand as usage increase
from*
string
ERC20 token contract address to sell
to*
string
ERC20 token contract address to buy
amount*
integer
buy amount of ERC20 tokens in wei
slippage
float
Default = 0.005 (equal 0.5%)
deadline
integer
Unix timestamp, transaction will fail if it's not executed before this deadline
receiver
string
Destination receiver wallet address !Important: it's allowed to be empty for quote-query only .
Receiver can't be empty if you intent to use encoded data to perform swap.
source*
string
Referrer , this is to attribute volume to traffic source. We use this info to build up referral program at later stages.
Response payload
Field
Sub field
Type
Description
encodedData
json object
router
string
Firebird Router smart contract address The address is returned here because it's frequently updated
data
string
Data encoded for given quote. Client just need to submit this data to given provided contract address returned at "router"
maxReturn
json object
from
string
ERC20 token contract address to sell
to
string
ERC20 token contract address to buy
totalFrom
string
buy amount of ERC20 tokens in wei
totalTo
numeric string
best sell amount of ERC20 tokens in wei
totalGas
number
gasPrice
numeric string
paths
array of object
swap paths, for display purpose
Example API Code
https://github.com/firebird-prod/firebird_api_examples
Integration example
Last updated