GithubHelp home page GithubHelp logo

punnkam / auto-arb Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 2.0 20 KB

Cryptocurrency trading bot that arbitrages perpetual futures based on funding rates.

License: MIT License

Makefile 0.32% Python 99.68%

auto-arb's Introduction

auto-arb

Cryptocurrency trading bot that employs a delta-neutral strategy.

The trading bot arbitrages the contango between a crypto-asset's spot price and futures product. Specifically, this bot was implemented to arbitrage the premium between spot and perpetual futures. Instead of contango, the perpetual swaps enforce a premium using funding rates. When there exists a price where funding rates exceed a pretermined configuration of the bot, the bot automatically purchases a crypto asset on spot and simultaneously sells the respective perpetual swaps. The converse trade is not implemented as futures backwardation, or sufficiently negative funding, is often quickly self-correcting.

After installing CCXT (venv/no venv) with

pip install ccxt

Run the script using

python app.py

Funding Rate

The funding rates were calculated using Binance's supported documentation which can be found here

https://www.binance.com/en/support/faq/360033525031

Price Index

The price index, a component of the funding calculation, were calculated using Binance's supported documentation which can be found here

https://www.binance.com/en/support/faq/547ba48141474ab3bddc5d7898f97928

Margin and Leverage

For more information about margin and leverage

https://www.binance.com/en/support/faq/360033162192

  • Some parameters are fixed for the specific neutral-risk profile.

auto-arb's People

Contributors

punnkam avatar

Stargazers

Alex Silachev avatar  avatar  avatar Basstorm avatar jickva avatar  avatar Wilson Wang avatar

Watchers

Wilson Wang avatar  avatar

Forkers

lijiadong

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.