OrderStream -> Standard Relayer API
Although this software has been run and tested, assume this package is unstable until a
v0.1.0 tag is published.
An implementation of the 0x Standard Relayer API for the OrderStream relay network.
orderstream-sra software provides a simple way to build a 0x limit order book from the OrderStream. It is also intended to be an example of how to use the OrderStream network to derive and construct order books.
orderstream-sra package is a 2nd-layer database and API middleware package intended to be deployed with a connection to an OrderStream full node, or one of Paradigm's public endpoints –– and a MongoDB backend.
It connects to an OS node's order event-stream, filters/parses/validates 0x orders, inserts them into a MongoDB collection, and then provides access via a simple set of API endpoints defined by the 0x Standard Relayer API (v2) spec.
Try It Out
A live (development) version of the software is deployed on Zaidan, Paradigm's primary API server for hosted access to the OS network.
You can try it out at:
orderstream-sra package is intended to be run using Docker compose. Doing so creates/pulls images for the Node.JS runtime supporting the main API implementation, as well as a MongoDB daemon service on a separate container.
All necessary configuration is defined in
./docker.env, and you should be able to deploy a working setup (using docker) with minimal modifications. You simply need to set a
WEB3_URL provider variable. The supplied docker environment file is pre-configured for a local Ethereum HTTP JSONRPC endpoint. You can use any HTTP web3 provider.
Build and run the docker images with:
cd orderstream-sra docker-compose up --build -d
(More instructions coming soon.)
If you want to help develop
orderstream-sra, or wish to make/test modifications of your own, you will need to configure your development environment.
You must run a MongoDB server (
mongod) either remotely or on your machine, and then configure the provided
.env file template with your database URL, as well as the endpoint of an OrderStream node.
.env template will work out-of-the box if you use the default
mongod binding of