Giter Site home page Giter Site logo

roibal / cryptocurrency-trading-bots-python-beginner-advance Goto Github PK

View Code? Open in Web Editor NEW
1.2K 116.0 433.0 211 KB

Crypto Trading Bots in Python - Triangular Arbitrage, Beginner & Advanced Cryptocurrency Trading Bots Written in Python

Home Page: https://www.youtube.com/channel/UCVTnyT4fUxYkvawbggo8-AQ

License: MIT License

Python 100.00%
crypto-bot-trading cryptocurrency-trading-bots binance-trading-bot bitcoin-trading-bots python-binance algo trading-bot trading-strategies trading-algorithms cryptocurrency

cryptocurrency-trading-bots-python-beginner-advance's People

Contributors

penlo avatar roibal 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  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

cryptocurrency-trading-bots-python-beginner-advance's Issues

Error - FAILURE INITIALIZE

BinanceTriArbTrader.py
Everything installed.
Correct, working, new Binance API keys in BinanceKeys.py.

'\nExchange Status: ', {u'msg': u'normal', u'status': 0})
[]
LOADING BALANCES FROM BINANCE

FAILURE INITIALIZE

Restarting

binance key error???

Hi, i have this problem.
my api key and secret key is the true. not false. but the bot give error. why??
I change my api key and secret key that's doesnt work.
I have ccxt
I try with cmd same issue
soo why this problem???

https://prnt.sc/AjKUhgSWG2hC

live trade

i'm not python expert
i see the bot in BinanceTriArbTrader.py running paper trade not a real trade if not wrong.
so, how to run it in live ?

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

When you get this issue to download the Visual Studio Installer:
https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2017
If you are from the far away future and the above link doesn't work, just google Visual Studio Installer.

Under Workloads select Desktop development with C++:
image

Also, select python under Web&Cloud:
image

Lastly, I've installed Windows 10 SDK:
image

Don't forget to reboot and then you can install python-binance via pip

no module named 'samplekeys'

I renamed the Crypto_Triangular_Arbitrage_Bot.py just for simplicity when running but I am getting an error with what appears to be a non-existent library.

root@c3efcd8035e6:/app/python-binance# python examples/crypto-tri-arb-bot.py
Traceback (most recent call last):
  File "examples/crypto-tri-arb-bot.py", line 43, in <module>
    from samplekeys import keys, keys2, keys3, rkey
ModuleNotFoundError: No module named 'samplekeys'

I don't see the module in python-binance and it's not a standard python module installable via pip afaict.

Error - convert_time_binance / 'serverTime'

Traceback (most recent call last):
File "RBB.py", line 348, in
run()
File "RBB.py", line 104, in run
scalping_orders(coin, 1, 1)
File "RBB.py", line 194, in scalping_orders
ap, aq, bp, bq, place_ask_order, place_bid_order, spread, proj_spread, max_bid, min_ask = visualize_market_depth(wait, tot_time, coin)
File "RBB.py", line 225, in visualize_market_depth
ask_pri, ask_quan, bid_pri, bid_quan, ask_order, bid_order = market_depth(sym) File "RBB.py", line 146, in market_depth
print("Order Book: ", convert_time_binance(client.get_server_time()))
File "RBB.py", line 133, in convert_time_binance
gg=int(aa)
ValueError: invalid literal for int() with base 10: "{u'serverTime': 1546615734852"

Paper Trading

"LOADING BALANCES FROM BINANCE
Starting Portfolio (Paper)"

This "(Paper)" means paper trading? or the bot is trading in real time?

2 errors when i ran the script "could not convert string to float" and "'module' object is not callable"

Hi i have 2 issues when executing the script ๐Ÿ‘

"LOADING BALANCES FROM BINANCE
could not convert string to float: '[10.447733600487705'

FAILURE INITIALIZE

Restarting"

and before, when i can run the script and identidy potential arbitrage, i have this following error :

"PLACING ORDER

STARTING TRI ARB PAPER TRADING FUNCTION

'module' object is not callable

FAILURE INITIALIZE"

Can you please help me to resolve this 2 errors?

Thanks in advance.

Error: "No module named 'ccxt'"

I did all the steps to get the binance bot installed from your step by step Youtube video and went to run a bot and was given this at the bottom of Pycharm.

File "C:/Users/davey/Desktop/python-binance-master/python-binance-master/examples/Cryptocurrency-Trading-Bots-Python-Beginner-Advance-master/Crypto-Trading-Bots/Advanced_Cryptocurrency_Trading_Bot.py", line 27, in
import ccxt
ModuleNotFoundError: No module named 'ccxt'

Process finished with exit code 1

'module' object is not callable FAILURE INITIALIZE

Hello, I get the following when I get an attempt to placing an ARB order:

Binance Arbitrage Function Data Collection - Running

List of Arbitrage Symbols: ['ETHBTC', 'EOSETH', 'EOSBTC']
Currency Pair: ETHBTC Exchange Rate: 0.03565200
Currency Pair: EOSETH Exchange Rate: 0.02635400
Currency Pair: EOSBTC Exchange Rate: 0.00094040
[0.035652, 0.026354, 0.0009404, datetime.datetime(2019, 3, 1, 10, 45, 5, 350313)]
Buy: 0.035652
Sell: 0.03568338772102907
Arbitrage Possibility - Potential Profit (Percentage): 0.0879617184176885%

Potential Fees (Percentage): 0.30000000000000004
Adjusted Profit (Percentage): -0.21203828158231153
PLACING ORDER

STARTING TRI ARB PAPER TRADING FUNCTION

'module' object is not callable

FAILURE INITIALIZE

Restarting

Error?

Traceback (most recent call last):
File "CryptoTriangularArbitrageBinanceBot.py", line 24, in
from binance.client import Client
ImportError: No module named binance.client

Supported platform?

Hi,

I assume python-binance needs to be installed after git clone, right? I was not shocked when the installation on Mac failed with some compilation error, but it also failed me on several Ubuntu's, once with a weird message and a couple of times with

The 'pyasn1' distribution was not found and is required by service-identity

It looks like a few people are running it, maybe we could get some more insight on compatibility? Funny that python can fail so portably :)

Private_TriArbBot.py TypeError: 'module' object is not callable

Hello, can you help me?? i have error when run Private_TriArbBot.py.... i don't know how to fix. My second question is about CryptoTriangularArbitrageBinanceBot.py, bot work correctly, no errors but dont live trade...I changed the variable "place_order='Yes')" but still no live trade...thank you in advance for your help

-114
<main.Binance object at 0x000000C71ABC5080>

Hello and Welcome to the Binance Arbitrage Crypto Trader Bot Python Script
Created 2018 by Joaquin Roibal (@BlockchainEng)A quick 'run-through' will be performed to introduce you to the functionality of this bot
To learn more visit medium.com/@BlockchainEng or watch introductory Youtube Videos
Copyright 2018 by Joaquin Roibal

Bot Start Time: 2019-05-29 19:31:25.667518

Traceback (most recent call last):
File "E:/crypto/trading arbitrage etc/python-binance-master/python-binance-master/examples/Private_TriArbBot.py", line 555, in
run()
File "E:/crypto/trading arbitrage etc/python-binance-master/python-binance-master/examples/Private_TriArbBot.py", line 71, in run
initialize_arb()
File "E:/crypto/trading arbitrage etc/python-binance-master/python-binance-master/examples/Private_TriArbBot.py", line 93, in initialize_arb
pprint(balance)
TypeError: 'module' object is not callable

Process finished with exit code 1

Autotrading to excel of successful and unsuccessful trades?

I am currently on chapter 5.10 how would one interreact excel with this program? making a spreadsheet that's basically two versions a grand view and a detailed view. Grand view meaning total started with this each month in a year amounts in on each crypto and out and include losses in each pair? and then the detailed view of every trade whether or not it was successful? I havent looked into much about the ccxt dashboard on their website but this information would be useful inside the bot in my opinion. Also I'm very impressed at the quality of the straight forwardness and use of python integration keep it up.

Python 2.7 ending 2020

Hey mate I tried to run the bot but when I tried to install Project interpreter and it says that the software will end in Jan 2020 and wont be maintained. It says to upgrade package.

Please help.

Luke

Crypto_Triangular_Arbitrage_Bot.py not properly trading

I have worked on the crypto triangular arbitrage bot many times and documented entire development process of python based crypto triangular arbitrage bot on Youtube Videos.

Currently the triangular arbitrage bot is not working, it will purchase coin 1 and 2, but won't purchase original coin to complete the triangular arbitrage.

The issue with bids/asks was fixed, currently the issue is getting caught on the requirement of purchasing whole binance coins, due to exchange rate fluctuations etc--although this issue may have been fixed when binance celebrated 1 year anniversary and modified fees.

Additionally, code will need to be modified for new fee schedule.

In conclusion, the crypto triangular arbitrage bot is 99.9% functionally, just needs a final polishing to get it to work 100% correctly.

Cannot run Triangle Arb Bot

I've setup my server like this
yum install python-pip
git clone https://github.com/Roibal/Cryptocurrency-Trading-Bots-Python-Beginner-Advance.git
git clone https://github.com/Roibal/python-binance.git
pip install ccxt

copied BinanceTriArbTrader.py to the examples folder
ran 'python BinanceTriArbTrader.py'

got:

Traceback (most recent call last):
File "BinanceTriArbTrader.py", line 31, in
from binance.client import Client
File "/home/triangle/python-binance/examples/binance/client.py", line 8, in
from .helpers import date_to_milliseconds, interval_to_milliseconds
File "/home/triangle/python-binance/examples/binance/helpers.py", line 3, in
import dateparser
ImportError: No module named dateparser

save_historic_klines_csv files with wrong time information

The save files wich are saved by save_historic_klines_csv have a wrong time format in the files.

The file contains the following line(s):
<module 'time' (built-in)>, 2e-05, 2e-05, 2e-05, 2e-05, 53.0

The line 262 in save_historical_data_Roibal.py :
format_kline = "{}, {}, {}, {}, {}, {}\n".format(time, open1, High, Low, Close, Volume)
has to be:
format_kline = "{}, {}, {}, {}, {}, {}\n".format(time1, open1, High, Low, Close, Volume)

Failure Initialize

Binance Arbitrage Function Data Collection - Running

('List of Arbitrage Symbols:', ['BNBBTC', 'BCCBNB', 'BCCBTC'])
Currency Pair: BNBBTC Exchange Rate: 0.00399410
list index out of range

FAILURE INITIALIZE

Restarting
I try to run the Bot on Ubuntu, kinda hard to "develope"

Fee Percentage Wrong

Regarding TriArb
TriArbTrader

The fee calculation is incorrect it appears.

line 573 ---- fee_percentage = 0.1*3 #divided by 100
pseudo -> fee_percentage = 10%*3 = 30%
Shouldn't the fee percentage be 0.001 * 3 not 0.1 * 3 ?

Which Crypto Trading Bot Codes are Trading?

Hello again. The only one bot that I was able to run was this one CryptoTriangularArbitrageBinanceBot.py but which is not trading in reality. I would suggest to make only one version of the bot and fix all these issues.

config file needed

This bot could do with a config file, so people can actually use it. someone make 1 please.

AttributeError: type object 'Client' has no attribute 'synced'

FAILURE INITIALIZE
Traceback (most recent call last):

File "C:\Users\izzy\Documents\arbitrage project\Private_TriArbBot.py", line 555, in
run()
File "C:\Users\izzy\Documents\arbitrage project\Private_TriArbBot.py", line 71, in run
initialize_arb()
File "C:\Users\izzy\Documents\arbitrage project\Private_TriArbBot.py", line 100, in initialize_arb
status = Client.synced('get_system_status()')
AttributeError: type object 'Client' has no attribute 'synced'

RUNNING ERROR

=== RESTART: C:\CryptoStuffPy\python-binance\examples\Private_TriArbBot.py ===
1361
<main.Binance object at 0x00000267FDBE9A90>


Hello and Welcome to the Binance Arbitrage Crypto Trader Bot Python Script
Created 2018 by Joaquin Roibal (@BlockchainEng)A quick 'run-through' will be performed to introduce you to the functionality of this bot
To learn more visit medium.com/@BlockchainEng or watch introductory Youtube Videos
Copyright 2018 by Joaquin Roibal

Bot Start Time: 2018-08-25 16:09:46.777794

Traceback (most recent call last):
File "C:\CryptoStuffPy\python-binance\examples\Private_TriArbBot.py", line 555, in
run()
File "C:\CryptoStuffPy\python-binance\examples\Private_TriArbBot.py", line 71, in run
initialize_arb()
File "C:\CryptoStuffPy\python-binance\examples\Private_TriArbBot.py", line 93, in initialize_arb
pprint(balance)
TypeError: 'module' object is not callable

Cant understand how to make it real trade

So, finally I got over all the erros but still cant get running :). Please. I just would like to put there my API keys and start it. Why cant it be so simple? What should I edit in the CryptoTriangularArbitrageBinanceBot.py to make it really trade?

bittrex

hi... can run for bittrex exchange? i saw ccxt need to be install... thank you

Installation

Can you give me any complete guide with the installation?

Undefined name 'client' in Advanced_Cryptocurrency_Trading_Bot.py

flake8 testing of https://github.com/Roibal/Cryptocurrency-Trading-Bots-Python-Beginner-Advance on Python 3.7.1

$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

./Historic-Legacy/TriArbBot_Paper_and_Tweet.py:50:14: E999 SyntaxError: invalid syntax
consumer_key =
             ^
./Historic-Legacy/Sentiment_Analysis_Crypto_Historic.py:73:65: E999 SyntaxError: EOL while scanning string literal
        return ' '.join(re.sub("(@[A-Za-z0-9]+)|([^0-9A-Za-z \t])
                                                                ^
./Crypto-Trading-Bots/Advanced_Cryptocurrency_Trading_Bot.py:471:14: F821 undefined name 'client'
    prices = client.get_all_tickers()           #Trans CCXT
             ^
./Crypto-Trading-Bots/Advanced_Cryptocurrency_Trading_Bot.py:482:15: F821 undefined name 'client'
    tickers = client.get_orderbook_tickers()            #Trans CCXT
              ^
2     E999 SyntaxError: EOL while scanning string literal
2     F821 undefined name 'client'
4

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. These 5 are different from most other flake8 issues which are merely "style violations" -- useful for readability but they do not effect runtime safety.

  • F821: undefined name name
  • F822: undefined name name in __all__
  • F823: local variable name referenced before assignment
  • E901: SyntaxError or IndentationError
  • E999: SyntaxError -- failed to compile a file into an Abstract Syntax Tree

Filter failure: PRICE_FILTER

While executing (Ubuntu 18.04 VM) Private_TriArbBot.py i get:

raise BinanceAPIException(response) binance.exceptions.BinanceAPIException: APIError(code=-1013): Filter failure: PRICE_FILTER

It seems, that the currencies are mixed up and the price is ist not correct.
The bot want to buy BNBBTC @ 640.984552 insted of 0.00158 as of today
640.984552 is the price of ETH/USDT

Does anyone else have this problem?

initialize issue - import save_historical_data_Roibal

Struggling to initialize getting the following error: Traceback (most recent call last):
File "/Users/genson/PycharmProjects/python-binance-master/examples/Crypto-Trading-Bots/Roibal_BinanceBot.py", line 29, in
import save_historical_data_Roibal
ImportError: No module named save_historical_data_Roibal

Roibal Bot get_historic_klines function doesn't work, or does it?

Hi,

I am new to programming and Python. I was reading and checking your code piece by piece.
At save_historical_data_Roibal.py get_historic_klines function, I added a print(output_data) line at the bottom and ran the code with get_historical_klines('BTCUSDT', Client.KLINE_INTERVAL_30MINUTE, "1 Aug, 2018", "5 Aug, 2018"). Well all the parameters look fine. I was expecting to see all the klines between that period but instead nothing happens. Am I interpreting the code wrong? How should I change the code to see the klines at this period?

Thank you in advance for your assistance.

Limbat

Tried New Installation With This Error

Went 100 % through the installation guide in README. Keys in BinanceKeys.py. File - Roibal_BinanceBot.py

root@vultr:/python-binance/examples# python Roibal_BinanceBot.py
Traceback (most recent call last):
File "Roibal_BinanceBot.py", line 23, in
from binance.client import Client
ImportError: No module named binance.client
root@vultr:
/python-binance/examples# python3 Roibal_BinanceBot.py
Traceback (most recent call last):
File "Roibal_BinanceBot.py", line 23, in
from binance.client import Client
ImportError: No module named 'binance'

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.