Arb is a framework for creating trading algorithms and a standard set of algorithms to use. It also contains a set of exchange clients that are generally useful to communicate with exchanges. It offers the ability to make realtime decisions based on prices and also logs the market prices for all exchanges perodically for auditing purposes. Here are a few features of the framework:
- We minimize communication with the database as much as possible to increase speed of execution. Any communication with the database is done asynchronously.
- We offer a standard interface for all algorithms to be written. They are written as idempotent processes that are
backed by a
Transactionobject. EachTransactionobject has multiple states andConfirm()is run until the transaction reached a conclusion.
- Clone the repository into a Go environment and install Glide.
- Run
glide installin the directory. - To setup the database, run the following commands. A
latest.dumpfile is provided in the root of the project; however, we will need to update it over time to include more recent pricing and schemas.
psql template1
> CREATE DATABASE arb_test OWNER dev ENCODING 'UTF-8' LC_COLLATE 'en_US.UTF-8' LC_CTYPE 'en_US.UTF-8' TEMPLATE template0;
make migrate
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U dev -d arb_test latest.dump
- Run
make testto run the tests and see how the framework works.