Giter Site home page Giter Site logo

andrei-zgirvaci / arbitrage-bot Goto Github PK

View Code? Open in Web Editor NEW
231.0 13.0 63.0 3 KB

A bot that makes profit of the best crypto Arbitrage opportunities on the market

Python 100.00%
cryptocurrency bot arbitrage arbitrage-opportunity arbitrage-bot cryptocurrency-exchanges cryptocurrency-trading-bot

arbitrage-bot's Introduction

Crypto Market - Arbitrage Bot (Arbitrage-Bot)

Cryptocurrency is still a new and inefficient market. Several Cryptocurrency exchanges exist around the world and the bid/ask prices they propose can be briefly different from an exchange to another. The purpose of Arbitrage-Bot is to automatically profit from these temporary price differences while being market-neutral.

Arbitrage-Bot uses the most popular open-source trading library ccxt in order to find best price spread on the market.

WRITTEN BY: Andrei Zgirvaci

CONTRIBUTE: Contributions are always welcome!

If you can, please take a minute to star this repo and follow me, It will be much appreciated!!!


Requirements

  • python version 3.7.0 installed

Installation

git clone https://github.com/MD3XTER/Arbitrage-Bot.git

cd Arbitrage-Bot

pip install ccxt

python3 arbitrage_bot.py

Usage

First, you need to specify the markets you are going to target. Here is a list of supported markets by the ccxt library:

exchanges = [
    "binance",
    "bittrex",
    "hitbtc",
    "poloniex",
    "exmo",
    "bitmex",
    "huobi",
]

In order for the bot to be able to fetch market data, it needs an API Key and a Secret Token for each market you are going to target:

exchangesData = {
    "hitbtc": {
        "apiKey": "",
        "secret": "",
        "transactionFee": 0.001
    },
    "binance": {
        "apiKey": "",
        "secret": "",
        "transactionFee": 0.001
    },
    "bittrex": {
        "apiKey": "",
        "secret": "",
        "transactionFee": 0.0025
    },
    "poloniex": {
        "apiKey": "",
        "secret": "",
        "transactionFee": 0.0025
    },
    "exmo": {
        "apiKey": "",
        "secret": "",
        "transactionFee": 0.002
    },
}

Secondly, you need to specify for which symbols should the bot look, here is a list of the most common ones:

symbols = [
    "ETH/USDT",
    "XRP/USDT",
    "BTC/USDT",
    "BCH/USDT",
    "DASH/USDT",
    "XMR/USDT",
    "LTC/USDT",
]

You can also specify min spread and min profit that you are interested in:

min_spread = 1
min_profit = 0

Take in mind that there are two ways to create buy orders: create_market_buy_order and create_limit_buy_order. You should decide for yourself what method fits you better.

For more information on how each method works, take a look at the official ccxt documentation.

arbitrage-bot's People

Contributors

andrei-zgirvaci avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arbitrage-bot's Issues

Doubt in get_biggest_spread_by_symbol

Morning! Thanks for this contribution. I was taking a look and testing it, but I´ve a simple doubt. Why in line 199-200, in get_biggest_spread_by_symbol method are you doing this?

    min_ask_price += 0.235
    max_bid_price -= 0.235

And only if the if increase_percentage >= 1: is never fired?

Thanks!

Awesome work done.

Hi mate..

Awesome work done... Do you have an enhanced version of this script which you can share with us for pricing.

Regards
Krishna G

One question :)

Before anything, thank you so much to share it!

Can u teach me how do i change the amount of coins the bot exchange in each negociation?

Regards!

Where are you transferring from one exchange to another for the arbitrage?

Hi!

I had a question around the place_buy_sell_order() function. (Great code btw!). In order to profit from the arbitrage, where are you performing the transfer from one to the other. It seems like you are just placing a buy order on exchange1 and a sell order on exchange2. Does ccxt handle that behind the scenes? I'm just trying to understand where the profit is made because from reading it, it seems like this code does not actually make profit.

Thanks!

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.