Git Product home page Git Product logo

barter's Introduction

Barter

A trading system for setting up generic, automated (but not real-time), trades. Right now, this system is built for dydx.

NOTE: This is a work in progress. It is not ready for production use.

Setting Up VM

# Assumes that we're installing as root

git clone ...
cd barter

# Install poetry
curl -sSL https://install.python-poetry.org | python3 -
# Add the following to /root/.bashrc
export PATH="/root/.local/bin:$PATH"
source /root/.bashrc

# Install dependencies
apt install libpq-dev
poetry install

# Setup .env

# Get it running
python manage.py collectstatic
python manage.py migrate
python manage.py runserver 0.0.0.0:80

Starting it with screen

# initial
screen -S app
./run.sh
ctrl-a d to leave

# later
screen -ls
screen -r app

Setting up crontab

Set up a crontab that runs cron.py, a copy of scripts/cron.py in the root of the repository.

barter's People

Contributors

aled1027 avatar

Watchers

 avatar  avatar

barter's Issues

Support 90 or 180 day

ideally, we should be looking t longer-running corrleations, like 90 or 180 day and then probably 7 days for the disconnect lag window

Close positions automatically

let's do something like if our net loss or gain is 10% of the total notional of the trade, we close it

So in a $200 Initial position, so for this one, our notional is 200 total, so if we're either up in aggregate by 20 or down by 20 it would close both sides.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.