API Endpoints
API examples
This API is a simple wrapper around the SDK offered for convenience on getting estimated bonder fee and transfer status.
Although this API is offered as a free service, it's recommended to host your own API server (see docs here) to not have any rate limit restrictions.
Endpoints
GET /v1/quote
Get estimated bonder fee to use for transfers
Input query parameters:
Parameters | Description |
---|---|
| (required) Amount in smallest use (eg. |
| (required) Token symbol (eg. |
| (required) From chain slug (eg. |
| (required) To chain slug (eg. |
| (required) Slippage percentage (eg. |
| (optional) Ethereum network to use. Options are |
Chain options are: ethereum
, optimism
, arbitrum
, polygon
, gnosis
, nova
, base
Example request
Example response
Output response:
Parameters | Description |
---|---|
| Specified amount in. |
| Specified slippage. |
| The minimum amount out to receive from AMM at origin chain (or destination chain if sending from L1), taking account AMM fees, slippage, and total bonder fee. |
| The minimum amount out to receive from AMM at destination chain, taking account, AMM fees, slippage, and total bonder fee. Note: There is no AMM on L1, so this should be 0 when sending to L1. |
| The suggested bonder fee for the amount in. The bonder fee also includes the cost of the destination transaction fee. |
| The estimated amount you'll receive at the destination taking account all fees and slippage. |
| A default deadline of 7 days to perform swap at origin AMM (or destination AMM if sending from L1). |
| A default deadline of 7 days to perform swap at destination AMM. Note: There is no AMM on L1, so this should be 0 when sending to L1. |
GET /v1/transfer-status
Get transfer status for tx
Input query parameters:
Parameters | Description |
---|---|
| (optional*) Origin transfer transaction hash |
| (optional*) Transfer ID |
| (optional) Ethereum network to use. Options are |
* Must use at lease one option, either transactionHash
or transferId
.
Example request
Example response
Output response:
Parameters | Description |
---|---|
| Transfer ID |
| Origin transaction hash |
| Chain ID of origin chain |
| Chain slug of origin chain |
| Chain ID of destination chain |
| Chain slug of destination chain |
| Address of transfer originator |
| Original amount transferred in smallest unit (eg. wei) |
| Original amount transferred in human readable format |
| Original amount transferred in USD |
| The minimum amount out specified for AMM swap |
| Deadline timestamp specified in transfer |
| Address of recipient set for transfer |
| The bonder fee amount specified in transfer in smallest unit in terms of token transferred (eg. wei) |
| The bonder fee amount specified in transfer in human readable format |
| True if this transfer has been bonded (received) at the destination. Will be false if the transfer is still pending or is unbondable |
| Bond (received) destination transaction hash |
| Address of bonder for this transfer |
| Token symbol of asset bridged |
| Unix timestamp of origin transfer transaction |
GET /v1/available-routes
Get available routes
Input query parameters:
Parameters | Description |
---|---|
| (optional) Ethereum network to use. Options are |
Example request
Example response
Output response:
Parameters | Description |
---|---|
| Token Symbol |
| Source chain slug |
| Source chain ID |
| Destination chain slug |
| Destination chain ID |
Using custom RPC providers
You can set query parameter to specify what RPC url to use for a chain.
By default, public RPC urls are used, which are subject to rate limits. You can get better performance by specifying your own custom provider instead.
Input query parameters:
Parameters | Description |
---|---|
| (optional) Ethereum RPC url (eg. rpcUrl[ethereum]=https://mainnet.infura.io/v3/84842078b09946638c03157f83405213) |
| (optional) Optimism RPC url (eg. rpcUrl[optimism]=https://mainnet.optimism.io) |
| (optional) Arbitrum RPC url (eg. rpcUrl[arbitrum]=https://arb1.arbitrum.io/rpc) |
| (optional) Polygon RPC url (eg. rpcUrl[polygon]=https://polygon-rpc.com) |
| (optional) Gnosis Chain RPC url (eg. rpcUrl[gnosis]=https://rpc.gnosischain.com) |
| (optional) Nova RPC url (eg. rpcUrl[nova]=https://nova.arbitrum.io/rpc) |
| (optional) Base RPC url (eg. rpcUrl[base]=https://goerli.base.org) |
Example request
Source code
The API server source code is available on github.
Additional endpoints
If you're looking for a complete API to compose bridge transfer transactions, checking approvals, and more; check out this self hosted server example on github.
Last updated