Skip to main content

0x Cheat Sheet

0x Protocol Version​

We are currently on v4 of the 0x protocol

0x API Endpoints​

Exchange Proxy Addresses​

This is the primary contract for all interactions with the protocol. It is also the allowance-target/spender/operator for any ERC20, ERC721, and ERC1155 assets being traded. For most networks the address is identical, but be aware that a small number (marked with a *) are slightly different. The ABI can be found in the protocol repo's IZeroEx.json file. All 0x contract addresses can be found in the protocol repo's addresses.json file.

  • Ethereum (Mainnet): 0xdef1c0ded9bec7f1a1670819833240f027b25eff
  • Ethereum (Goerli): 0xf91bb752490473b8342a3e964e855b9f9a2a668e*
  • Polygon: 0xdef1c0ded9bec7f1a1670819833240f027b25eff
  • Polygon (Mumbai): 0xf471d32cb40837bf24529fcf17418fc1a4807626*
  • Binance Smart Chain: 0xdef1c0ded9bec7f1a1670819833240f027b25eff
  • Optimism: 0xdef1abe32c034e558cdd535791643c58a13acc10*
  • Fantom: 0xdef189deaef76e379df891899eb5a00a94cbc250*
  • Celo: 0xdef1c0ded9bec7f1a1670819833240f027b25eff
  • Avalanche: 0xdef1c0ded9bec7f1a1670819833240f027b25eff
  • Arbitrum: 0xdef1c0ded9bec7f1a1670819833240f027b25eff

Ancillary Contract Addresses​

These contracts are used within the 0x ecosystem but are not intended for direct interaction with users except in rare circumstances. They are less likely to remain fixed (compared to the Exchange Proxy Address). The latest addresses can be found in the protocol repo's addresses.json file. A subset of commonly used addresses can be found in contract-addresses.md.

0x Order Types​

An order is a message passed into the 0x Protocol to facilitate a trade (see How does 0x work?). The order types that we support include:

Order TypeSummaryOrder StructureSupported Token Trade Types
Limit OrdersThese are the standard 0x Order, which encodes a possible trade between a maker and taker at a fixed price.Limit Order StructureERC20 <-> ERC20 trade
RFQ OrdersThese are a stripped down version of standard limit orders, supporting fewer fields and a leaner settlement process. These orders are fielded just-in-time, directly from market makers, during the construction of a swap quote on 0x API, and can be filled through the fillRfqOrder() function on the Exchange Proxy.RFQ Order StructureERC20 <-> ERC20 trade
NFT OrdersNFT Order in 0x V4 are optimized for specific use case of exchanging ERC20s for either ERC721 or ERC1155. Using NFT Orders on v4 is up to 54% cheaper than alternatives currently on Ethereum. Unlike 0x Limit orders, there is a direction of the trade, either buy or sell.

NFT Property-based orders can also be created by specifying the properties field in the respective order.

NOTE: This order type is only supported by the 0x Protocol, see the protocol docs for more details.
ERC721 Order Structure

ERC1155 Order Structure
ERC20 <-> ERC721 trade

ERC20 <-> ERC1155 trade