How To Build a Simple Cryptocurrency Live Trading Bot with Python using the Binance API
E conheça também sobre o Melhor Bot Para Opções Binárias 2022
Que tal um robo gratuito para IQ Option? Sistema Para IQ Option Grátis
This video is about getting live cryptocurrency data via the Binance Socket Manager and store them in a database followed by analyzing this data and build a simple trend following trading strategy with the live data.
Let me know if you find content like this valuable. I will continue to implement some technical indicators and Machine Learning on Cryptocurrencies. I personally think that is pretty interesting. Nevertheless don’t worry I am anyhow also covering stock trading topics 🙂
Disclaimer: This video is not an investment advice and is for educational and entertainment purposes only! Cryptocurrency and automated trading is bearing a high amount of risk which might result in a total loss of your invested capital.
If you want to support me you can register for Binance with this link, but don’t feel forced to:
More information on the Binance Socket Manager:
Alternatively you can use the websocket library and pick the stream provided in the official Binance API documentation:
Set up Binance API video:
Python & SQL:
Cumulating returns:
Video on Trendfollowing:
00:00 – 01:38 Introduction / Disclaimer
01:38 – 05:05 Requesting data using the Binance Socket Manager
05:05 – 08:28 Data Cleaning / Manipulation
08:28 – 11:31 Getting Live Data into a SQLite DataBase
11:31 – 14:30 Requesting Live Data from the SQL DB
14:30 – 16:22 Explanation of Trendfollowing strategy
16:22 – 26:25 Coding the Trading Bot (simplified)
26:25 – 29:41 Test the Bot with real money trade
#Python #Tradingbot #Crypto #Binance
Code source:
password: S58MYqi3Xw
Link do Vídeo
very interesting
Hats down, very useful content, thank you soo much !!
Hi I got an error like: None of the indexes are in column and even I added if msg: frame = createframe(msg)
Thanks for amazing content! You are really adding a lot of value!!!!
Binary Trading is very hard for me…too much sentiments to overcome.
I have been searching for an ideal bot, especially one I can tinker with code.
Great tutorial.
Is it Interesting???
I totally absorbed it. Great tutorial along with simple explanation.
Now I can start coding my own bot. Thank you very much. Any improvements you make, I would like to follow.
Hello, thank you for the video. When i run the code there are several errors and the code isn't running in pycharm or jupyter notebook. One of the major errors i get is that await is not in a function. Can you please help me with this?
the godam source code wont open
Question. The lookback function – How do you define a specific lookback period, say 2minutes. My dataframe pulls more than 1 msg per sond so 120 lookback steps would not be 2 minutes, would be more like 50 seconds. Struggling with this.
The await comment in Line 6 doesnt work. it stucks on loading and nothing happens just "In [*]" the whole time
Sir is it possible to place multiple orders for a same trade if yes plz tell how will it done in futures trading ???
Excellent video! I'll definitely look into this.
Hey man, I keep getting this error when I execute the trade APIError(code=-1022): Signature for this request is not valid, would you be able to guide me into a way of fixing this issue
Will this bot auto trade(I mean buy crypto)even when my computer if switched off (means after closing python file)
Thank you for the tutorial and knowledge sir !
Hey, this video made me start coding back 🙂 Thank you for it! Just a request: Your code source link is broken, could you refresh it please?
This is a fair bit older by this point but if you are still watching the comments – I am in favor of crypto currency videos!
how to set sl and tp when create order?
Thanks for these videos.
Waiting the next ones will be so useful for me as well.
Hello professor, another question, can you download the information from binance in longer periods, for example every 1 min? what would be the change in the code? if it works, how can it be stoppep manually?
And professor, reading one of the previous questions about the repetition of records that occurs in the "while" loop in the database, you said that we could use an "if", could you kindly write the syntax of this "if"? Thank you!
Really loved this simple explanation .. would cover how we can create flash loan transactions
Hello professor, when I execute the "while True:
await socket .__ aenter __ () "
the loop saves me approximately 100 records and then routine collapses and gives an error. Why is this?
(For now I am using SQLITE). if it works, how can it be stoppep manually?
Will this be able to run 24/7? Without the websocket being disconnected (provided you don't break Binance API's hard limits)?
Hello – I have really been enjoying your videos!!! I have a quick question for you, when I run the program, everything runs fine and I am able to buy the crypto, but for some reason it doesn't sell, it prints out the buy option again on the terminal, it doesn't sell. Is there anything I can do to implement this ?