Next week, Version 2 of the 0x Exchange is scheduled to go to the Ethereum mainnet. We outlined the new supported features from 0x v2 a few posts ago, including the addition of support for ERC721 Tokens, which we announced earlier this week.

The new features of 0x v2 have necessitated some changes to the Standard Relayer API (SRA). Until now, OpenRelay’s support of 0x v2 was implemented with an early draft of the SRA, but today we are announcing full support for the finalized Version 2 of the HTTP SRA. This means that OpenRelay is compatible with the 0x v2 tools such as 0x.js and 0x Connect.

Our ingest process still follows the same flow as outlined in our post about Ingesting 27 million orders, but has been updated to support the new order format, as well as ERC721 tokens.

In Version 2 of the SRA, relayers are given a space to provide additional metadata with respect to orders. OpenRelay adds these additional, non-standard metadata fields:

We are working on updates to OpenRelay’s documentation, but as we currently compy with the Standard Relayer API, community-driven tools should work out of the box.

SRA Quirk

One behavior of the SRA that may seem strange for the next few days is that the search endpoints all take a networkId query parameter, which the SRA notes must default to 1. If the user specifies an unsupported network, the SRA prescribes an error to raise. Until Version 2 launches on mainnet, the SRA’s default network is also an unsupported network, and thus OpenRelay will return the prescribed error. To use the SRA on Kovan, add networkId=42 to your query string. We plan to add mainnet support as soon as the 0x project team publishes addresses for the mainnet contracts.

V0 Deprecation

The 0x Project team has indicated that they plan to disable the 0x v1 exchange contract in December. We intend to continue supporting the v0 API endpoints through that time. If the 0x Project team changes their plans with respect to disabling the v1 exchange, we will support the corresponding endpoints at least through the end of the year.

Note that even once 0x v2 is on mainnet, OpenRelay’s /v0/ endpoints and /v2/ endpoints will return separate sets of orders.

Future API Updates

Currently we only support the HTTP implementation of the Standard Relayer API. We hope to support the websockets implementation by the end of the year. We are also exploring ways to enhance our support for ERC721 tokens, to make the additional metadata about ERC721 tokens more accessible.