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

<Price Inquiry> Interface

Obtain swap route information of select swap pair (route name, logo, swap pair information, etc.) : for users to choose a swap route

PreviousGet <The Token List> InterfaceNext<Swap> Interface

Last updated 10 months ago

Request Address: /api/multiQuote

API Address:

Request Method: POST

Request Parameters:

Field Name
Field Description
Type
Required or not
Notes

equipmentNo

Device ID

string

Y

fromTokenAddress

Original token contract address

string

Y

toTokenAddress

Target token contract address

string

Y

fromTokenAmount

Original token amount, times amount after decimal

integer

Y

fromTokenChain

Original token chain

string

Y

toTokenChain

Target token chain

string

Y

userAddr

Sender address

string

Y

toAddress

Receiver address

string

Y

slippage

Acceptable slippage %,only integer,like 1 is 1%

decimal

Y

source

Unique ID of the channel

string

Y

Output Parameter:

The whole is an array of multiple channel prices

Field Name
Field Description
Type

fromTokenAmount

Original token amount, times decimal

integer

fromTokenDecimal

Orginal token decimal

integer

toTokenAmount

Target token amount, divided by decimal

decimal

toTokenDecimal

Target token decimal

integer

dex

Swap platform

string

fee

Transaction fee, same as original token

decimal

feeToken

Transaction fee settlement token symbol

string

receiveTokenAmount

Estimate target token receiving amount, divided by decimal

decimal

logoUrl

Swap platform logo

string

depositMax

Max orginal token (only available for channels with deposit scope)

decimal

depositMin

Min orginal token (only available for channels with deposit scope)

decimal

kycInfo

Only available when there are channels related to KYC quota, including status of whether KYC is required, and Chinese and English link fields

object

isSupportNoGas

Only the SWFT channel will display, with the function of whether gas free or not

boolean

estimatedTime

Estimated time:1 (1-3 min), 2 (1-10 min), 3 (5-30 min)

decimal

path

swap path list

array

contractAddress

Only the Bridgers and Aggregator channel will display,swap address

string

approveAddress

Only the Glue channel will display,approve address

string

dexAddress

Only the Glue channel will display,swap address

string

Input example:

https://api-swap.paths.finance/api/multiQuote
{
    "sourceFlag":"path",
    "fromTokenAddress":"0x55d398326f99059ff775485246999027b3197955",
    "toTokenAddress":"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",
    "fromTokenAmount":"1000000000000000000",
    "fromTokenChain":"BSC",
    "toTokenChain":"POLYGON",
    "equipmentNo":"0x76336d2903e8f6d62cc3f5d0528310",
    "userAddr":"0x76336d2903e8f6d62cc3f5d05283108e3d2785e0",
    "toAddress":"0x76336d2903e8f6d62cc3f5d05283108e3d2785e0",
    "slippage": 1
}

Output:

{
  "data": {
    "txData": [
      {
        "receiveTokenAmount": "322.005045",
        "fee": 0.003,
        "fromChain": "BSC",
        "dexAddress": "0x6406df225a87d7ec187e11044257fec2ca0a354c",
        "path": [],
        "approveAddress": "0xA962FCA0Cd10a52c9D1Bc377a852bbF3230f4669",
        "dex": "Glue",
        "depositMin": "10.0",
        "bridgeFee": "0.19390214",
        "midDex": "Aggregator",
        "toChain": "POLYGON",
        "estimatedTime": 2,
        "gasFee": "0.001125",
        "fromTokenAmount": "1000000000000000000",
        "depositMax": "2731187",
        "midTokenCode": "USDT(BSC)",
        "gasFeeToken": "BNB",
        "toTokenDecimal": 6,
        "feeToken": "BNB",
        "logoUrl": "https://images.swft.pro/dex/glue.png",
        "bridgeFeeToken": "USDT",
        "toTokenAmount": "322.005045",
        "fromTokenDecimal": 18,
        "midDexLogo": "https://images.swft.pro/dex/path.png",
        "midTokenAmount": "323.16845238",
        "dexDisplayName": "Glue",
        "crossDetails": {
          "from": {
            "path": "",
            "dex": ""
          },
          "to": {
            "path": "",
            "dex": ""
          }
        }
      },
      {
        "estimatedTime": 1,
        "fromTokenAmount": "1000000000000000000",
        "amountOutMin": "321898947",
        "depositMax": 999999,
        "receiveTokenAmount": "321.898947",
        "fee": 0.003,
        "toTokenDecimal": 6,
        "feeToken": "",
        "contractAddress": "0x12179f77a02522c01f6d3a5d38a1a5d2b9834f19",
        "fromAmountOutMin": "323168452375783660000",
        "logoUrl": "https://images.swft.pro/dex/path.png",
        "toTokenAmount": "321.898947",
        "path": [],
        "fromTokenDecimal": 18,
        "dex": "Aggregator",
        "depositMin": 0,
        "chainFee": "0.3",
        "dexStatus": "",
        "crossDetails": {
          "from": {
            "path": [
              "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
              "0x55d398326f99059ff775485246999027b3197955",
              100
            ],
            "dex": "PancakeSwapV3"
          },
          "to": {}
        }
      },
      {
        "estimatedTime": 2,
        "fromTokenAmount": "1000000000000000000",
        "depositMax": "92.635479",
        "amountOutMin": "320488534",
        "receiveTokenAmount": "320.488534",
        "fee": 0.003,
        "toTokenDecimal": 6,
        "feeToken": "",
        "contractAddress": "0x1ed5685f345b2fa564ea4a670de1fde39e484751",
        "dexName": "Bridgers",
        "logoUrl": "https://images.swft.pro/dex/bridgers1.png",
        "toTokenAmount": "320.488534",
        "path": [],
        "fromTokenDecimal": 18,
        "dex": "Bridgers",
        "depositMin": "0.04675",
        "chainFee": "1",
        "dexStatus": ""
      },
      {
        "estimatedTime": 1,
        "fromTokenAmount": "1000000000000000000",
        "depositMax": "92.635479",
        "amountOutMin": "320488535",
        "noGasDepositMin": null,
        "receiveTokenAmount": 320.48853469318186,
        "fee": "0.003",
        "toTokenDecimal": 6,
        "kycInfo": {
          "cnUrl": "https://swap.swftcoin.com/swft-v3/swft-v3-m/kyc/kyc.html?lang=cn&equipmentNo=0xf5a4170c83d9267b9344eb284d3fc3",
          "enUrl": "https://swap.swftcoin.com/swft-v3/swft-v3-m/kyc/kyc.html?lang=en&equipmentNo=0xf5a4170c83d9267b9344eb284d3fc3",
          "isDapp": false,
          "status": false
        },
        "feeToken": "USDT(MATIC)",
        "contractAddress": "",
        "dexName": "SWFT",
        "isSupportNoGas": false,
        "logoUrl": "https://images.swft.pro/dex/SWFT.png",
        "toTokenAmount": 320.48853469318186,
        "path": [],
        "fromTokenDecimal": 18,
        "dex": "SWFT",
        "depositMin": "0.04675",
        "noGasDepositMax": null,
        "chainFee": "1",
        "dexStatus": ""
      }
    ]
  },
  "resCode": "100",
  "resMsg": "Success"
}

Postman Call Example

Referring to code in

Referring to

eferring to

https://api-swap.paths.finance
General Instruction
Major Blockchain Name Conventions
Major Blockchain Name Conventions