Accessing RFQ liquidity on 0x API
This guide discusses what RFQ liquidity is, how it works, and how your project can apply to access it
RFQ liquidity is currently available on Mainnet & Polygon.
In its role as a DEX aggregator, the 0x API integrates both on- and off-chain liquidity. On-chain liquidity is sourced by sampling smart contract liquidity pools, such as Uniswap and Curve. Off-chain liquidity is sourced from professional market makers via the 0x Request-for-Quote (“RFQ”) System.
If integrators request a standard quote from the 0x API, part or all of their quote may be sourced via the RFQ system. In this system, the 0x API aggregates quotes from professional market makers, alongside quotes from AMMs. If the market-maker quotes are more competitive than AMM quotes, they may be included in the final price shown to the end-user. The end-user’s liquidity is ultimately provided by a combination of AMMs and professional market makers. Everything happens under-the-hood!
RFQ orders contain a
takerAddressquery parameter. When an order containing this parameter gets hashed and signed by two counterparties, it is exclusive to those two counterparties.
In addition to the 0x API configuration identifying trusted takers, it also contains a list of specific market makers that participate in the RFQ system. Each maker is identified by an HTTP endpoint URL, and each endpoint has an associated list of asset pairs for which that endpoint will provide quotes. For the instance at
api.0x.org, the 0x team is maintaining a list of trusted market makers.
If you represent a trading firm that would like to add liquidity to the 0x ecosystem via the RFQ system, please get in touch here: 0x RFQ Interest Form
The firm quote resource is hosted at
/swap/v1/quoteand responds with a full 0x order, which can be submitted to an Ethereum node by the client. Therefore it is expected that the maker has reserved the maker assets required to settle the trade, leaving the order unlikely to revert. In order to qualify for RFQ liquidity, the request to
/swap/v1/quotemust include the query parameter
intentOnFilling=true(in addition to the aforementioned
The indicative pricing resource is hosted at
/swap/v1/priceand responds with pricing information, but that response does not contain a full 0x order, so it does not constitute a legitimate transaction that can be submitted to the Ethereum network. This resource can be used by price feeds and other applications that do not intend to submit an actual transaction.
Whenever a 0x API client specifies a
/quoterequest, the API will validate the quote before returning it to the client, avoiding a number of possible causes for transaction reverts. (For more details, see "How does
takerAddresshelp with catching issues?".) However, given that a
takerAddressis required in order to obtain RFQ liquidity, and given that this requirement subverts the optionality of the quote validation feature, the implementation of RFQ introduced a new query parameter to the
skipValidation. When this parameter is set to
true, quote validation will be skipped. While validating even RFQ quotes is a best-practice recommended default, skipping validation can be useful in certain circumstances, such as when experimenting with a new maker integration deployment.
When requesting a quote from the 0x API, clients can choose to have the API exclude specific liquidity sources. (For more details, see the API specification.) At this time, RFQ liquidity is considered by the 0x API to be included within the
Nativeliquidity group. (In the API's interface, it's referred to as
0x, but in the underlying routing logic it's referred to as
Native.) Therefore, if a 0x API client intends to access RFQ liquidity, it's important that they not exclude the
Checkout our Guides for RFQT and RFQM Market Makers on how to create, hash, sign, fill, get state, and cancel 0x V4 RFQ orders
Last modified 16d ago