API: rfqPrice

Get Peti system order fee and amount out

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

Request Body

NameTypeDescription

srcToken*

JSON

source token description

dstToken*

JSON

destination receive token description

srcAmount*

String

input amount with source token decimal

dstNative*

Bool

true 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

srcToken

source token

dstToken

receiving token on destination chain

srcAmount

String

Input amount with token decimal

dstNative

Bool

receiving token is native token on destination chain

Response Parameters

Response Body

price

rfq price for this quote

fee

string

Protocol fee + market maker charged fee

mmId

string

The uniq id of market marker

txMsgFee

string

SGN charges fees to sync, store, and sign messages

Price

NametypeDescription

src token

Source token information

dst token

Destination receive token information

srcAmount

string

Input amount with src token decimal

dstAmount

string

Estimated received amount on destination chain

feeAmount

string

market maker fee + msg fee + src tx gas cost + dst tx gas cost

validThru

timestamp

Unix epoch milliseconds. the time before which the price response is valid for Quote

mmAddr

string

Market maker address

sig

string

Market marker uses this signature to verify the price content is agreed by them previously

srcDepositPeriod

number

Unit second. The maximum src deposit period that is expected by market maker, will be started from the time when mm receives the quote request.

dstTransferPeriod

number

Unit 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_id

number

Chain id

symbol

string

Token Symbol

address

string

Token address

Last updated