Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

API: rfqPrice

POST https://cbridge-prod2.celer.app/v1/rfqPrice

Request Body

NameTypeDescription
srcToken*JSONsource token description
dstToken*JSONdestination receive token description
srcAmount*Stringinput amount with source token decimal
dstNative*Booltrue when destination receive token is a native token
// quote reponse example
{
    "price": {
        "srcToken": {
            "chainId": 5,
            "symbol": "USDC",
            "address": "0xCbE56b00d173A26a5978cE90Db2E33622fD95A28",
            "decimals": 0,
            "name": "",
            "logoUri": ""
        },
        "srcAmount": "100000000",
        "dstToken": {
            "chainId": 97,
            "symbol": "USDC",
            "address": "0x855fC87f7F14Db747ef27603b02bAe579ba947B6",
            "decimals": 0,
            "name": "",
            "logoUri": ""
        },
        "srcReleaseAmount": "99900000",
        "dstAmount": "99700000",
        "feeAmount": "200000",
        "validThru": 1665553346,
        "mmAddr": "0x58b529F9084D7eAA598EB3477Fe36064C5B7bbC1",
        "sig": "286bc92a206d79c936897a386f0a8cd1486c5f9b2cf6205ca31c7f11634029d507e681cb4a12a41f121b9d4c7bea98631cda34eeb81ae5d982a462c96d315e6100",
        "srcDepositPeriod": 250,
        "dstTransferPeriod": 720
    },
    "fee": "300000",
    "mmId": "mm003",
    "txMsgFee": "132000000000000"
}

Request Parameters

NameTypeDescription
srcTokenTokenInfosource token
dstTokenTokenInforeceiving token on destination chain
srcAmountStringInput amount with token decimal
dstNativeBoolreceiving token is native token on destination chain

Response Parameters

Response Body

pricePricerfq price for this quote
feestringProtocol fee + market maker charged fee
mmIdstringThe uniq id of market marker
txMsgFeestringSGN charges fees to sync, store, and sign messages

Price

NametypeDescription
src tokenTokenInfoSource token information
dst tokenTokenInfoDestination receive token information
srcAmountstringInput amount with src token decimal
dstAmountstringEstimated received amount on destination chain
feeAmountstringmarket maker fee + msg fee + src tx gas cost + dst tx gas cost
validThrutimestampUnix epoch milliseconds. the time before which the price response is valid for Quote
mmAddrstringMarket maker address
sigstringMarket marker uses this signature to verify the price content is agreed by them previously
srcDepositPeriodnumberUnit second. The maximum src deposit period that is expected by market maker, will be started from the time when mm receives the quote request.
dstTransferPeriodnumberUnit second. The minimum destination transfer period that is expected by market maker, will be started from the time when mm receives the quote request.

TokenInfo

NameTypeDescription
chain_idnumberChain id
symbolstringToken Symbol
addressstringToken address