💲Get Price Quote API
Here is a detailed explanation of the parameters for the quote API:
Cross-chain Quote
GET https://api2.chainge.finance/v1/getBridgeQuote
Query
Fields | Description |
---|---|
amount | Amount paid by the user |
symbol | From Token symbol |
fromChain | From Chain nickName |
toChain | To Chain nickName |
example:
To provide higher flexibility, our return results need to be processed before displaying on the interface:
price: The current price of the cross-chain currency for calculating its value.
outAmount: The total amount received across chains, including gasFee and serviceFee. You need to subtract gasFee and serviceFee to get the actual amount received by the user.
outAmountUsd: Estimated value in USDT.
serviceFee: Official service fee, five per ten thousand (0.05%).
gasFee: Gas fee for cross-chain transfers.
Cross-chain Aggregate Quote API
GET https://api2.chainge.finance/v1/getAggregateQuote
Fields | Description |
---|---|
fromAmount | Amount paid by the user |
fromTokenAddress | From token contract address |
fromDecimal | From token decimal |
fromChain | From chain nickName |
toTokenAddress | To token contract address |
toDecimal | To token decimal |
toChain | To chain nickName |
example:
These are all results returned by the "Supported Chains & Tokens" interface.s
To provide greater flexibility, our return results need to be processed again before they can be displayed on the interface:
chain: The chain ID on which the transaction is executed.
chainDecimal: The decimal of the current currency on the chain where the transaction is executed.
aggregator: The intermediary responsible for executing the transaction.
outAmount: The total amount received after cross-chain transfer, including gasFee and serviceFee. Therefore, you need to deduct gasFee and serviceFee to get the actual amount received by the user.
outAmountUsd: The estimated value in USDT.
minOutAmount: Reserved field.
serviceFee: More detailed documentation will be provided.
gasFee: The gas fee for cross-chain transfer.
priceImpact: Price impact.
routeSummary: Transaction routing information.
Last updated