Giter VIP home page Giter VIP logo

sobot2's Introduction

Sobot

A trading bot built in Elixir. Based on frathon/hedgehog.

Install deps

Run mix deps.get to install the project dependencies.

Troubleshooting

If you see the following error: (CaseClauseError) no case clause matching ... then it could mean that you are possibly using an outdated library. Try removing the _build directory, reinstalling dependencies, recompiling the app and then trying again:

rm -rf _build
mix deps.get
iex -S mix
# now run the app again!

Running the app (with the live Binance client)

First add your Binance API keys to the app config file.

Also, in the same config file, set binance_client: Binance (so that it uses the live client for trading and not the mock). If you want to use mock client then keep the config set to binance_client: BinanceMock (so that real trades will not be placed in Binance).

Start the Postgress database running via Docker Compose:

docker-compose up

If you have not done so already, seed the database with the default config for all the symbols:

cd apps/naive
mix run priv/seed_settings.exs

You can check directly in the database using (at the password prompt its postgress)

psql -Upostgres -hlocalhost
\c naive
\d settings
select id, symbol, budget, status from settings;

Now, start the interactive Elixir REPL:

cd apps/naive
iex -S mix

If you are using the BinanceMock you can check its running.

Process.whereis(BinanceMock)

Now start the trader and then start streaming trade events for a symbol to the trader like so:

Streamer.start_streaming("NEOUSDT")
Naive.start_trading("NEOUSDT")

You can also start an Elixir observer like so (from within the iex session):

:observer.start()

NOTE If you have added your Binance API keys and you have USDT in your account (and you are using the live Binance app - not the BinanceMock) this process will BUY XRP and SELL the position immediately and then the bot will stop. Its just a test and not ment to make any money at all! :)

sobot2's People

Contributors

jensendarren avatar

Stargazers

Kamil Skowron avatar

Watchers

 avatar James Cloos avatar

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.