New projects are being built on top of the 0x protocol everyday. As the 0x ecosystem grows and more dApps are built on top of the protocol, there will need to be a simple way to interact with relayers. Today we are pleased to release the first version of the 0x standard relayer API, a specification that grants programs frictionless access to liquidity across a global network of relayers.

What is an API?

An API (application program interface) is a set of clearly defined methods of communication between two programs. Many services provide APIs so that developers can easily write software that correctly communicates with that service. For example, the Twitter API makes it easy to write a program that retrieves a user’s latest tweets or today’s trends. Most major centralized exchanges such as GDAX and Bitfinex also provide APIs for retrieving trading data and executing trades. A developer can use one of these APIs to write a program that trades on their behalf, based on any arbitrary algorithm. Although the GDAX and Bitfinex APIs provide similar information and functionality, they are different specifications and therefore, one program that can trade on GDAX cannot be used to trade on Bitfinex. A well written program may be able to interface with both exchanges through clever code reuse, but every time a new exchange needs to be supported, the developer will need to update and redeploy the program. This problem is one of many that the standard relayer API aims to solve.

What is the standard relayer API?

The standard relayer API is a set of clearly defined methods of communication between a program and a 0x relayer. The interface is comprised of a set of HTTP and WebSocket endpoints. Relayers can opt-in to implementing this standard API, allowing programs to easily access and trade across multiple sources of liquidity at the same time. Programs that are written to communicate with the standard relayer API are also immediately compatible with all new relayers entering the 0x ecosystem. The resulting benefits for relayers, traders, businesses and dApps built on top of the 0x protocol are numerous.



For example:

Relayers can pull orders from the orderbooks of other relayers in order to bootstrap liquidity on their own platform and attract traders.

Traders can easily make markets and trade across multiple relayers at the same time.

As new relayers enter the market, traders can immediately interact with them without changing their existing software or tools.

If one relayer shuts down, dApps that rely on liquidity can easily talk to a different relayer or set of relayers so that operations run uninterrupted.

Applications can reliably pull data from multiple relayers.

Strengthening the ecosystem through common protocols

We have already observed the powerful network effects that can be generated by providing an open protocol such as 0x. The number of projects and developers building on 0x today is a testament to that. We are focused on strengthening this network by making it as easy as possible to join and interoperate with others in the network. The standard relayer API is another step in that direction. Relayers that choose to adopt the standard relayer API not only make it easier for market makers to implement automated trading strategies that work on and across 0x-based exchanges, but they also allow relayers to bridge their liquidity leading to deeper order books and tighter spreads.

The standard relayer API today and near future

OpenRelay is working towards implementing the standard relayer API, stay up to date here. We are also developing a Javascript library that makes it extremely easy to interact with any relayer that implements the standard relayer API. Watch all of our normal communication channels for more information on that! The first version of the standard relayer API was written with feedback from the community of relayers. Collaborate with us by providing any feedback or comments here.

Join the 0x team

We have ambitious goals to transform how value in the world is exchanged. Our team is growing and we’re hiring for talented developers in San Francisco.