MetaPath API
  • API Introduction
    • General Instruction
    • Major Blockchain Name Conventions
  • Cross-platform Aggregator Interface
    • Token Swap Flow
    • Get <The Token List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <BlackList> Interface
  • Upload gas free orders
  • Aggregate NFTs Interface V1.0
    • Get <Basic Information> Interface
    • Get <NFT List> Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • Get <NFT List Held by User> Interface
  • Aggregate NFTs Interface V2.0
    • Get <Latest Collections> Interface
    • Get <Top NFT Collections> Interface
    • <List Page> Interface
    • Get <NFT Details> Interface
    • Get <NFT Details> Other Related Interface
    • <Price Inquiry> Interface
    • <Swap> Interface
    • <Batch Purchase> Interface
  • List Related Interface
    • Get <User's NFT> Interface
    • Get <Listed NFT List (My List)> Interface
    • <Create/Update Listing> Interface
    • <Create/Update Listing in the Backend> Interface
    • <Cancel Listing> Interface
    • <Change Listing> Interface
  • Swap Information Related Interface
    • <Add Swap Information> Interface
    • <Get Swap Information List> Interface
    • <Get Detailed Transation Infromation > Interface
Powered by GitBook
On this page
  1. Cross-platform Aggregator Interface

Get <The Token List> Interface

Get information of the supported chains, and the corresponding tokens: for users to choose a swap pair

PreviousToken Swap FlowNext<Price Inquiry> Interface

Last updated 1 year ago

Request Address: /api/getBaseInfo

API Address:

Request Method: POST

Request Parameters:

Field Name
Field Description
Type
Required or not
Notes

chain

Blockchain Name

string

No

Output Parameters:

Field Name
Field Description
Type

tokens

Token Info List

Return to Object while no chain parameter;

Return to Array when there is a chain parameter

quoteSwitch

The price inquiry Switch currently set True

bool

Input Example:

Output Example:

// no chain parameter Return
{
    "resCode": "100",
    "resMsg": "Success",
    "data": {
        "tokens": {
            "ETH": [
                {
                    "symbol": "ETH",
                    "name": "Ethereum Token",
                    "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                    "decimals": 18,
                    "logoURI": "https://swap.swftcoin.com/swft-v3/images/coins/ETH.png",
                    "isCrossEnable": true
                },
                {
                    "symbol": "WETH",
                    "name": "Wrapped Ether",
                    "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "decimals": 18,
                    "logoURI": "https://images.swft.pro/inch1/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.png",
                    "isCrossEnable": true
                },
                {
                    "symbol": "LINK",
                    "name": "ChainLink Token",
                    "address": "0x514910771af9ca656af840dff83e8264ecf986ca",
                    "decimals": 18,
                    "logoURI": "https://images.swft.pro/inch1/0x514910771af9ca656af840dff83e8264ecf986ca.png",
                    "isCrossEnable": false
                }
            ]
        },
        "quoteSwitch": true
    }
}
// has a chain parameter Return
{
    "resCode": "100",
    "resMsg": "Success",
    "data": {
        "tokens": [
            {
                "symbol": "BNB",
                "name": "BNB",
                "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
                "decimals": 18,
                "logoURI": "https://images.swft.pro/inch1/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c.png",
                "isCrossEnable": false
            },
            {
                "symbol": "USDT",
                "name": "Tether USD",
                "address": "0x55d398326f99059ff775485246999027b3197955",
                "decimals": 18,
                "logoURI": "https://images.swft.pro/inch1/0xdac17f958d2ee523a2206206994597c13d831ec7.png",
                "isCrossEnable": false
            },
            {
                "symbol": "WBNB",
                "name": "Wrapped BNB",
                "address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
                "decimals": 18,
                "logoURI": "https://images.swft.pro/inch1/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c.png",
                "isCrossEnable": false
            }
        ],
        "quoteSwitch": true
    }
}

Postman Call Example

Referring to

https://api-swap.paths.finance
https://api-swap.paths.finance/api/getBaseInfo
<Major Blockchain Name Conventions>