Home

Awesome

Prop

Build Status hex.pm version

DeFi? CeFi? TradFi?

prop is an open and opinionated trading platform using productive & familiar open source libraries and tools for strategy research, execution and operation.

Install

  1. Install rust to build Rustler dependencies:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Add prop to your list of dependencies in mix.exs
def deps do
  [
    {:prop, "~> 0.0.5"}
  ]
end
  1. Copy .env.example -> .env to configure your application when running docker-compose

  2. Start the applications with docker make start

Usage

Starting the server with docker

$ make start

Which will start the services outlined in docker-compose.yml.

Visit prop.localhost.

When running the application with docker-compose you will need to enter the basic auth development credentials:

username: admin
password: password

See the Makefile for more details on the individual commands run.

Download your data with History

Before you can request to download candles you will need to import the products for a supported venue.

Navigate to history.localhost/products and click on Import then wait for History to finish adding products from supported venues.

Go to history.localhost/data/candles/jobs and input the products you would like to download data for. Click on Download and wait for the data to finish by watching the status column.

NOTE: Only FTX based products will currently download. You can check availability of platforms on the history README

Visualize your data with Grafana

Navigate to grafana.localhost/dashboards and select Candles from the General folder.

Set the period to min_1 or whatever timeframe you downloaded the candles to see them plotted on a chart.

Explore your data with Livebook

Navigate to livebook.localhost and open a notebook by clicking on New notebook at the top right.

You can pull in dependencies and explore the individual packages:

Mix.install([
  {:history, "~> 0.0.23"}
])

Or, more conveniently you can setup a runtime that uses the context of your current application. By using Runtime > Configure > Mix Standalone OR Attached Node.

Requirements

prop requires Elixir 1.13+, Erlang/OTP 22+ & Rust.

We recommend using asdf to manage the language requirements.

Prop - http://prop.localhost

home

beta

station

gainers-and-losers

Workbench - http://workbench.localhost

From idea to execution, manage your trading operation across a distributed cluster

stream-realtime-orders

History - http://history.localhost

Download and warehouse historical trading data

history-jobs

Rube - http://rube.localhost

A multi-chain DeFi development toolkit

rube-poc-overview

Slurpee - http://slurpee.locahost

A GUI frontend to manage blockchain ingestion with slurp

recent heads and blocks

Explore Data with LiveBook - http://livebook.localhost

livebook

Grafana - http://grafana.localhost

dashboard-beam-vm-health

Prometheus - http://prometheus.localhost

prometheus

Tools

Development

Initial setup:

$ make start_development

See the Makefile for more details.

Test

$ make test

See the Makefile for more details.

Ecto Database

Reset drops the db, creates a new db & runs the migrations

$ mix ecto.reset

Migrate up

$ mix ecto.migrate

Migrate down

# Last migration
$ mix ecto.rollback
# Last 3 migrations
$ mix ecto.rollback -n 3

Debugging

**could not compile dependency :ex_keccak**
nginx: [emerg] host not found in upstream grafana
**(DBConnection.ConnectionError)**
**(Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "prop_dev" does not exist**
** (Mix) Could not start application master_proxy: MasterProxy.Application.start(:normal, []) returned an error: shutdown: failed to start child: {:ranch_listener_sup, HTTP}
    ** (EXIT) shutdown: failed to start child: :ranch_acceptors_sup
        ** (EXIT) {:listen_error, HTTP, :eacces}

Authors

License

prop is released under the MIT license