Transit Finance(English)
  • πŸ₯°Introduction to Transit Finance
  • 🀩Quick Start Guide
    • About Token Swap
    • What is aggregate transaction
    • About slippage
    • About price impact
    • What is cross chain
    • Fee discounts
    • About receiving address
    • About Crosschain Router
    • About liquidity provider
    • About fees
  • πŸ’–FAQ
    • Which wallets does Transit Swap support?
    • How to connect Transit Swap to your wallet?
    • How to use Transit swap on mobile devices?
    • Why are my swaps not credited?
    • How to contact Transit Swap customer service?
    • The number of tokens obtained through aggregate swap is incorrect
    • What fees are there in the swap process?
    • Does aggregate swap support custom receiving addresses
    • Doesn't receive tokens using the exchange receiving address?
    • Why did my swap fail
    • Why can't I find my token in the Transit Swap listing
  • βœ…Tutorial
    • Save TRON Gas Costs with One Click!
    • Transit Swap aggregation swap tutorial
    • Transit Swap Cross-Chain Transfer Tutorial
    • How to check your order status through Transit explorer
    • Solutions for Cross-Chain Swap Failure
    • How to set custom slippage
    • How to set custom receiving address
    • How to swap/bridge $DOGE on Transit Swap?
  • πŸ₯°Campaign
    • How to gain Points Airdrop on Mint Blockchain?
    • How to Earn Double Owlto Cross-Chain Points and Exclusive Badge NFT
  • 🀝About channel
  • Reference
    • πŸŽƒAPI Reference
      • πŸ›‘οΈTransitSwap Contracts
      • 🍍Transit Swap TRON
      • πŸ‘»Transit Swap Aggregation
      • πŸ‘ΎTransit Swap Cross
      • πŸ₯‘Transaction Details
    • πŸ€—Smart Contracts
    • πŸ”ƒAbout channel partners
    • πŸ’‘Intergratation
  • πŸ””TRANSIT DAO
    • πŸ’²governance
    • βž•Donate
    • βœ”οΈrate
  • πŸ“©Contact us
  • πŸ“œAnnouncement
    • πŸ“Announcement
      • Oct 21st. Transit Swap is officially re-launch!
      • Oct 10th. Announcement on the suspension of TransitSwap service.
      • Sept 15th. The Merge is over!
      • Sept 12th. About the Ethereum Merge.
    • πŸ”ƒTransit Swap Bi-weekly Report
      • 2023/09/11 - 2023/09/25
      • 2023/08/28 - 2023/09/15
      • 2023/08/14 - 2023/08/28
      • 2023/07/31 - 2023/08/14
      • 2023/07/17 - 2023/07/31
      • 2023/07/03 - 2023/07/17
      • 2023/06/19 - 2023/07/03
      • 2023/06/05 - 2023/06/19
      • 2023/05/22 - 2023/06/05
      • 2023/05/08 - 2023/05/22
      • 2023/04/24 - 2023/05/08
      • 2023/04/10 - 2023/04/24
      • 2023/03/27 - 2023/04/10
      • 2023/03/13 - 2023/03/27
      • 2023/02/27 - 2023/03/13
      • 2023/02/13 - 2023/02/27
      • 2023/01/30 - 2023/02/13
      • 2023/01/16 - 2023/01/30
      • 2023/01/02 - 2023/01/16
      • 2022/12/19 - 2023/01/02
      • 2022/12/05 - 2022/12/19
      • 2022/11/21 - 2022/12/05
      • 2022/11/07 - 2022/11/21
      • 2022/10/24 - 2022/11/07
      • 2022/09/12 - 2022/09/26
      • 2022/08/29 - 2022/09/12
      • 2022/08/15 - 2022/08/29
      • 2022/08/01 - 2022/08/15
      • 2022/07/18 - 2022/07/31
      • 2022/07/04 - 2022/07/17
    • πŸ†•Weekly Token Listing
      • Token List Update (Sept 22nd, 2023)
      • Token List Update (Aug 25th, 2023)
      • Copy of Token List Update (Aug 25th, 2023)
      • Token List Update (Jul 27th, 2023)
      • Token List Update (Jul 13th, 2023)
      • Token List Update (Jun 29th, 2023)
      • Token List Update (Jun 16th, 2023)
      • Token List Update (Jun 1st, 2023)
      • Token List Update (Apr 28th, 2023)
      • Token List Update (Apr 7th, 2023)
      • Token List Update (Mar 22nd, 2023)
      • Token List Update (Mar 9th, 2023)
      • Token List Update (Feb 24th, 2023)
      • Token List Update (Feb 8th, 2023)
      • Token List Update (Jan 28th, 2023)
      • Token List Update (Jan 12th, 2023)
      • Token List Update (Dec 29th, 2022)
      • Token List Update (Dec 15th, 2022)
      • Token List Update (Dec 2nd, 2022)
      • Token List Update (Nov 18th 2022)
      • Token List Update (Nov 4th, 2022)
      • Token List Update (Sept 28th, 2022)
      • Token List Update (Sept 8th, 2022)
      • Token List Update (Aug 24th, 2022)
      • Token List Update (Aug 10th, 2022)
      • Token List Update (Aug 10th, 2022)
      • Token List Update (July 27th, 2022)
      • Token List Update (July 13th, 2022)
      • Token List Update (June 29th, 2022)
      • Token List Update (June 22nd, 2022)
      • Token List Update (June 16th, 2022)
      • Token List Update (June 8th, 2022)
      • Token List Update (June 2nd, 2022)
      • Token List Update (May 25th, 2022)
      • Token List Update (May 18th, 2022)
      • Token List Update (May 11th, 2022)
      • Token List Update (April 29th, 2022)
      • Token List Update (April 22nd, 2022)
      • Token List Update (April 15th, 2022)
    • ⏺️Public chain list update
      • Aptos(05/01/2023)
      • optimismPBC(06/01/2022)
      • Moonbeam(05/10/2022)
      • Conflux eSpace(05/09/2022)
    • πŸ“˜Version Update
Powered by GitBook
On this page
  • Tokens API
  • Cross Tokens List
  • Swap API
  • Transit Swap API for Cross
  • Cross Order Callback API
  • Order Callback
  1. Reference
  2. API Reference

Transit Swap Cross

Transit cross-chain swap api

chains supported (fromChainID & toChainID):

  • Ethereum: 1

  • BSC: 56

  • OkExchain: 66

  • HECO: 128

  • Matic: 137

  • Fantom: 250

  • KCC: 321

  • AVAX: 43114

  • TRON: 95500

bridge supported:

  • ANYSWAP

  • METAPATH

  • CBRIDGE

Tokens API

Cross Tokens List

GET https://aggserver.transit.finance/v3/cross/common/list

{
    "result": 0,
    "message": "success",
    "data": {
        "bridgers": [
            "ISWAP",
            "METAPATH"
        ],
        "chains": {
            "ISWAP":[],
            "METAPATH":[]
        },
        "tokens":{
            "ISWAP":[],
            "METAPATH":[]
        }
    }
}

Swap API

Transit Swap API for Cross

GET https://aggserver.transit.finance/v3/cross/swap

Query Parameters

Name
Type
Description

toChainID*

integer

chainID for cross to chain

decimal0

integer

Decimals of the token0

token0*

string

Contract address of a token on fromChain

fromChainID*

integer

chainID for cross from chain

to

string

Recipient token1 on toChain

amountIn

integer

Amount of a token to cross swap

bridge*

string

Use bridge of cross

token1*

string

Contract address of a token on toChain

decimal1

integer

Decimals of the token1

channel

string

"default"、"web"、"android"、"ios"、"extension"

issuer

string

Sender of transaction push

{
    "result": 0,
    "message": "success",
    "data": {
        "token0": "",
        "token1": "",
        "chainID": "",
        "destChainID": "",
        "amountIn": "",
        "to": "",
        "price": ,
        "fee": "",
        "relayerFee":"",
        "feeRate": "",
        "amountOut": "",
        "crossPool": "",
        "router": "",
        "exchange": "",
        "data": ""
    }
    
}
{
    "result": 0,
    "message": "success",
    "data": {
        "token0": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
        "token1": "0x55d398326f99059ff775485246999027b3197955",
        "chainID": "95500",
        "destChainID": "56",
        "amountIn": "31000000",
        "to": "",
        "price": "-",
        "fee": "0.44252000",
        "relayerFee":"",
        "feeRate": "-",
        "amountOut": "30557480427023319814",
        "crossPool": "-",
        "router": "TFHc9qsQCiepyyUQynnVVrQwMxZ37Fi15N",
        "exchange": "iswap",
        "data": {
            "contract": "TFHc9qsQCiepyyUQynnVVrQwMxZ37Fi15N",
            "fun": "otherswap(uint256,(address,address,address,uint256,uint256,uint256,bool,string,uint256),bytes)",
            "options": {
                "callValue": "0",
                "feeLimit": 100000000
            },
            "parameter": [
                {
                    "type": "uint256",
                    "value": "1"
                },
                {
                    "type": "tuple(address,address,address,uint256,uint256,uint256,bool,string,uint256)",
                    "value": [
                        "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
                        "0x55d398326f99059ff775485246999027b3197955",
                        "",
                        "31000000",
                        1,
                        4,
                        true,
                        "ios",
                        "56"
                    ]
                },
                {
                    "type": "bytes",
                    "value": "0x00...00"
                }
            ],
            "issuer": ""
        }
    }
}

Responses Details

  • amountOut: cross-swap amountOut on toChain for token1

  • router: Transit swap Router v3

  • exchange: use bridge (anySwap or MetaPath)

  • data: ABI data can be sent directly to router contract

  • about 'relayerFee': if exchange is MetaPath, it'll be the number of token1

Cross Order Callback API

If use 'MetaPath' to cross swap, it's better to request this api to speed up transactions.

Order Callback

GET https://aggserver.transit.finance/v3/cross/order

Query Parameters

Name
Type
Description

bridge*

String

fromChainID*

String

toChainID*

String

token0*

String

token1*

String

to*

String

amountIn*

String

channel*

String

hash*

String

the hash of from chain's transaction

amountOutMin*

String

use the result data 'amountOut' of swap api

{
    "result": 0,
    "message": "success",
    "data": "" //order id
}
PreviousTransit Swap AggregationNextTransaction Details

Last updated 2 years ago

πŸŽƒ
πŸ‘Ύ