Firm-Quote

Based on the order book you provide, our router will determine the optimal liquidity source to offer the best price. If your pricing is selected, Native will request a firm quote from you.

The firm quote endpoint must adhere to the following format:

Endpoint

GET <market_maker_base_url>/firm-quote

Params

Name
Description

sellerTokenAmount

The token input amount of the order, in wei

chainId

Chain ID of the network (e.g., 1 for Ethereum, 56 for BSC)

sellerToken

The ERC20 token address that will be sent to the market maker

buyerToken

The ERC20 token address that will be received from the market maker

pool

Native pool contract address that will execute this order.

nativePool

The Native Rfq Pool address that execute the trade.

quoteId

Unique ID for this order request

deadlineTimestamp

Deadline UNIX timestamp specified by the user. You may double-check if the number is acceptable. And choose to reject any quotes with invalid numbers. However, if a Market Maker wishes to set a maximum allowed expiry, please include that in the orderbook endpoint.

feeBps

Fee that Native will charge market makers, factored into their quote. Native collaborates with market makers to track and pay fees off-chain. Contracts with market makers will specify how fees are set and paid, and data sources will be provided for monitoring fee obligations.

availableBorrowBalance

The amount of buyer token Market Makers can borrow from Native Inventory at the moment, in wei

Example

<market_maker_base_url>/firm-quote?sellerTokenAmount=10000000000000000000000&chainId=97&sellerToken=0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d&buyerToken=0x55d398326f99059ff775485246999027b3197955&nativePool=0xaaE854bdd940cf402d79e8051DC7E3390e32A3ac&quoteId=62716-206e-41cb-8559-013f1ed1a65a&deadlineTimestamp=1671086729&feeBps=12&availableBorrowBalance=10000000000000000000000

In this example, a user sells 10,000 USDC to the market maker in exchange for USDT on Binance Smart Chain (BSC).

Response

You must provide a response in the following format:

Name
Description

success

Indicates whether you can provide a firm quote for this order flow (true/false)

buyerTokenAmount

The amount of tokens you are exchanging with the seller

deadlineTimestamp

The timestamp when this order will expire, typically 20-30 seconds for execution

errorMessage

Include the reason for the error if success is false.

Example

{
  "success": true,
  "buyerTokenAmount": "10100000000000000000000",
  "deadlineTimestamp": 1671086729, // Will be passed to sign-quote
  "errorMessage": ""
}

In the response above, the market maker returns 10,100 USDT for the order sent in the example.

Last updated