OpenAPI(Suggested)

Base URLs:

Integrate our API directly into your dApp.

With our Orbiter REST API, you can easily find the best routes for cross-chain and on-chain swapping and bridging. Our comprehensive solutions enable you to seamlessly exchange or bridge assets between different blockchains.

Our API is free to use, but there are rate limits. If you need more requests per second, request an API key.

Precautions ⚠️

By default, there is a request frequency limit. If you want faster request response or better service, please apply to us to buy a free apikey and carry the api-key field in the request header. X-Channel-Identifier is used to distinguish organizations. You can choose to carry or not carry it in the request header.

Request supported chains

var myHeaders = new Headers();
myHeaders.append("X-Channel-Identifier", "");
myHeaders.append("api-key", "");
var requestOptions = {
     method: 'GET',
     headers: myHeaders,
     redirect: 'follow'
};

fetch("https://api.orbiter.finance/sdk/chains", requestOptions)
     .then(response => response.text())
     .then(result => console.log(result))
     .catch(error => console.log('error', error));

Return results

{
   "status": "success",
   "message": "success",
   "result": [
     {
       "chainId": "1",
       "networkId": "1",
       "internalId": 1, // internal ID
       "name": "Ethereum",
       "contract": { // Official contract
         "0xd9d74a29307cc6fc8bf424ee4217f1a587fbc8dc": "OBSource",
         "0x3be8b60ddf9feff6b2426e47a7619d7cbc786d97": "OrbiterRouterV1",
         "0xc741900276cd598060b0fe6594fbe977392928f4": "OrbiterRouterV3"
       },
       "nativeCurrency": {
         "name": "Ether",
         "symbol": "ETH",
         "decimals": 18,
         "coinKey": "ETH",
         "address": "0x0000000000000000000000000000000000000000"
       },
       "tokens": [
         {
           "name": "Ether",
           "symbol": "ETH",
           "decimals": 18,
           "coinKey": "ETH",
           "address": "0x0000000000000000000000000000000000000000",
           "isNative": true
         },
         {
           "name": "Dai Stablecoin",
           "symbol": "DAI",
           "decimals": 18,
           "coinKey": "DAI",
           "address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
           "isNative": false
         },
         {
           "name": "USD Coin",
           "symbol": "USDC",
           "coinKey": "USDC",
           "decimals": 6,
           "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
           "isNative": false
         },
         {
           "name": "Tether USD",
           "symbol": "USDT",
           "coinKey": "USDT",
           "decimals": 6,
           "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
           "isNative": false
         },
         {
           "name": "Wrapped BTC",
           "symbol": "BTC",
           "coinKey": "BTC",
           "decimals": 8,
           "address": "0x2260fac5e5542a773aa44fbcfedf7c193bc2c599",
           "isNative": false
         }
       ],
       "contracts": [ // Official and supported third-party contracts
         {
           "name": "OBSource",
           "address": "0xd9d74a29307cc6fc8bf424ee4217f1a587fbc8dc"
         },
         {
           "name": "OrbiterRouterV1",
           "address": "0x3be8b60ddf9feff6b2426e47a7619d7cbc786d97"
         },
         {
           "name": "OrbiterRouterV3",
           "address": "0xc741900276cd598060b0fe6594fbe977392928f4"
         },
         {
           "name": "TransitFinanceRouterV5",
           "address": "0x00000047bb99ea4d791bb749d970de71ee0b1a34"
         },
         {
           "name": "XBridge",
           "address": "0xfc99f58a8974a4bc36e60e2d490bb8d72899ee9f"
         },
         {
           "name": "Rubic",
           "address": "0x3335733c454805df6a77f825f266e136fb4a3333"
         }
       ]
     }
   ],
   ...........
}

Request all supported lines

var myHeaders = new Headers();
myHeaders.append("X-Channel-Identifier", "");
myHeaders.append("api-key", "");
var requestOptions = {
    method: 'GET',
    headers: myHeaders,
    redirect: 'follow'
};

fetch("https://api.orbiter.finance/sdk/routers", requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));

Return results

{
     "status": "success",
     "message": "success",
     "result": [
         {
             "line": "10/534352-ETH/ETH", // route identification
             "endpoint": "0x8086061cf07c03559fbb4aa58f191f9c4a5df2b2", // Maker endpoint address
             "endpointContract": null, // Endpoint contract, if this field exists, it is mandatory to transfer funds to the endpoint through this contract (⚠️such as To Starknet, To Solana, etc.)
             "srcChain": "10", // source chain
             "tgtChain": "534352", // target chain
             "srcToken": "0x0000000000000000000000000000000000000000", // source token
             "tgtToken": "0x0000000000000000000000000000000000000000", // target token
             "maxAmt": "5", // Maximum quantity for a single transaction
             "minAmt": "0.0062", // Minimum quantity for a single transaction
             "tradeFee": "0.000000", // Transaction fee, ⚠️unit is ppm
             "withholdingFee": "0.0012", // Network fee, fixed value
             "vc": "19105", // Security code: There are currently two ways to carry the security code, 1. Replace the sent mantissa with vc, 2. Carry the security code through the RouterV3 contract calldata (in addition to the security code, it can also be carried and received address)
             "state": "available", // available state available or disabled
             "compRatio": 300000,
             "spentTime": 86399
         },
         ,
         .........
     ]


}

Query transaction status

var myHeaders = new Headers();
myHeaders.append("X-Channel-Identifier", "");
myHeaders.append("api-key", "");

var requestOptions = {
    method: 'GET',
    headers: myHeaders,
    redirect: 'follow'
};
const hash = '0x1ee8b17a41a44872fb38f7708a44f37d96cb82b2ce3e160fdd2602298e88ba8e' // Initiate transaction hash
fetch(`https://api.orbiter.finance/sdk/transaction/status/${hash}`, requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));

Return results

{
     "status": "success",
     "message": "success",
     "result": {
         "chainId": "10", // source chain
         "hash": "0x1ee8b17a41a44872fb38f7708a44f37d96cb82b2ce3e160fdd2602298e88ba8e",
         "sender": "0x8f69a8fc152a50ff575ee8676cd5ce685c56af0c", // Initiating address
         "receiver": "0x80c67432656d59144ceff962e8faf8926599bcf8", // Maker address
         "amount": "0.019050000000009019", // quantity
         "symbol": "ETH", // symbol
         "timestamp": "2024-04-08T16:01:31.000Z", // Source transaction time
         "status": 2, // On-chain transaction status, 2 = success, 3 = failure
         "opStatus": 99, // Cross-chain interaction status: 0 = Waiting for payment, SOURCE_CHAIN_OR_TOKEN_NOT_FOUND = 2, TARGET_CHAIN_OR_TOKEN_NOT_FOUND = 3, RULE_NOT_FOUND = 4, NONCE_EXCEED_MAXIMUM = 5, AMOUNT_TOO_SMALL = 6, BALANCED_LIQUIDITY = 10, REFUND = 80, REFUND_TOCHECK = 81 , 96 = Entering payment, 97 = Return waiting for recovery, 98 = Payment successful, pending confirmation, 99 = Payment confirmation successful.
         "targetId": "0x9a8a8f4ea12dc03e5838d4d1a53329b47167bd51558d716f2bb97a8ddcdc5314", // Target chain payment Hash
         "targetAmount": "0.017850000000000132", // Target link collection amount
         "targetSymbol": "ETH", // target chain symbol
         "targetChain": "534352" // target chain
     }
}

Query Cross Bridge History

var myHeaders = new Headers();
myHeaders.append("X-Channel-Identifier", "");
myHeaders.append("api-key", "");

var requestOptions = {
   method: 'GET',
   headers: myHeaders,
   redirect: 'follow'
};

fetch("https://api.orbiter.finance/sdk/transaction/history?address=${Your address}&offset=${offset count}&limit=${pageSize max 100}", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));

Return results

{
    "status": "success",
    "message": "success",
    "result": {
        "count": 0,
        "rows": [],
        "offset": 0,
        "limit": 20
    }
}

Simulate calculation of target chain amount

var myHeaders = new Headers();
myHeaders.append("X-Channel-Identifier", "");
myHeaders.append("api-key", "");

var requestOptions = {
    method: 'GET',
    headers: myHeaders,
    redirect: 'follow'
};
const line = 1/42161-ETH/ETH;// route identification
const nonce = 5000; // The source chain initiates the transaction nonce, which can be empty
const value = 45120000000009002; // Cross-chain amount

fetch(`https://api.orbiter.finance/sdk/routers/simulation/receiveAmount?line=${line}&value=${value}&nonce=${nonce}`, requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log('error', error));

Return results

{
     "status": "success",
     "message": "success",
     "result": {
         "receiveAmount": "43910000000005000", // The amount received by the target link
         "router": { // Rules in cross-chain matching
             "line": "1/42161-ETH/ETH",
             "endpoint": "0x80C67432656d59144cEFf962E8fAF8926599bCF8",
             "endpointContract": null,
             "srcChain": "1",
             "tgtChain": "42161",
             "srcToken": "0x0000000000000000000000000000000000000000",
             "tgtToken": "0x0000000000000000000000000000000000000000",
             "maxAmt": "10",
             "minAmt": "0.00125",
             "tradeFee": "150",
             "withholdingFee": "0.0012",
             "vc": "9002",
             "state": "available",
             "compRatio": 1,
             "spentTime": 60
         }
     }
}

Last updated