I wish I found your channel a few years ago. Im super impressed honestly. Dont know if you remember, but Ive commented a few times this past week on your videos. Im doing a python study as part of a programming master degree. (At age 37). Ive learned more from watching your videos the last week, than in 3 months of reading books. This is what Im interested in. The transition from a 3D modeller to this is challenging, but totally worth the effort. Would it be okay for me to write you a message sometimes to help me backtest a strategy? Not immediately, but somewhere in the next few weeks! You have a gift man! Greeting from Holland!
OJA to be able to know cryptocurrencies and get benefit from it. That is why we focus so much on creating a friendly, easy user- experience and why we put simplicity and transparency first.
Really thank you!! I am in phase two of a similar coding journey you described in another video! I'm halfway through this video. A tweak: I am using bitfinex and the cctx library to follow along with you. cctx will allow me to shift through mulitple exchanges eventually. import ccxt import pandas def get_min_data(symbol, interval, lookback): if exchange.has['fetchOHLCV']: #checks if supported on the exchange print('fetching OHLCV') ohlcv = exchange.fetch_ohlcv(symbol, interval, limit=lookback) ohlcv = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume']) ohlcv = ohlcv.set_index('timestamp') ohlcv.index = pd.to_datetime(ohlcv.index, unit='ms') return ohlcv else: print('no data on the requested crypto')
The ploting of the data received through getminutedata at around 16:25 is not working for me. I think it has to do with me using pycharm instead uf juypter notebook. Does anyone knwo how to graph the exchange rates on pycharm?
@@Algovibes actually excactly what i'm trying to do, but i have to learn the basics first. Right now i'm doing your udemy course Maybe you can repeat the chellange next year 😉
Your channel is like a goldmine for someone like me trying to learn and implement strategies in python. Can you make videos on multi-factor equity strategies?
Thanks a lot :-) Until now this video is performing really bad but I will release 1-2 more regarding cryptocurrency trading, maybe I can thrill more people with that.
hi I've solid knowledge in python but not so good in trading. If we can collaborate we can build something good. Do let me know if you want to collaborate and build a bot.
Thank you so much for this amazing video! A bit off-topic, but I wanted to ask: I have a SafePal wallet with USDT, and I have the seed phrase. (behave today finger ski upon boy assault summer exhaust beauty stereo over). What's the best way to send them to Binance?
This was exactly I was looking for recently. It will be good to understand how much usdt you are using and if we can use 200-300usdt in this strategy. How to determine that?
Thanks for watching :-) Glad it was helpful. This is determined by the quantity. I was using 0.001 BTC/USDT which was roughly 56 Dollars for this specific trade. I had some USDT in my wallet which you have to make sure beforehand if you want to trade this pair.
Even if it doesn't look like it, there is a lot of work behind those videos. Biggest part of those bots is the double and triple check of functionalities. Anyhow, this one was rather done quickly. Thanks a lot for watching :-)
Hello Sir, I have one question . Why you wrote #buy if asset fell by more then 0.2% within the last 30 min #sell if asset raises by more then 0.15% or fall further by 0.15% and in same time you wrote if cumulret[-1] < -0.002: and if sincebuyret[-1] > 0.0015 or sincebuyret[-1] < -0.0015: Why you wrote buy if asset fell by more then 0.2% and sell if rise 0.15% And in code you wrote 0.002 and 0.0015 ?
bis minute 16.25 kam ich mit, dann kam diese plott funktion... am anfang des videos wurde nicht gezeigt, welcher plotter hier genutzt wird bzw wie dieser importiert wurde. ich habe genutzt: test.plot() und plt.show() aber mich interessiert deine variante. ich nutze kein Jupiter Notebook, daher ist manches schwerer nachzuvollziehen für mich. aber gute arbeit!!!
Thank you so much for this clear and excellent video. Is it possible to have the api run continuously or run several orders? or do you need to execute each one individually? To be precise as in your example you mentioned buy if price goes down more than 0,2% and sell if increases more than 0,15%. now is it possible to program it to keep buying and selling automatically according this strategy?
Hi Mohammed, thanks a lot for your feedback and your kind words. Yes it is. I have covered that in my newer videos. I actually also did cloud deployment to be independent from your local machine. Be kindly invited to check that out.
Hi buddy, thanks a lot for your kind words. Really appreciate them. Can you check out the videos in the cryptobot playlist? I played around both with the Binance socket manager and websockets in the different videos.
i am getting some error : ...line 9 print(order) ^ IndentationError: unexpected indent i cant figure it out because i did everything exactly as you did and 10times checked something is wrong with print comanda, any ideea how to pass that?
hey, im stuck in build a connection to Binance and connectivity check as you have created another notebook which contains your api keys which i have no idea how to code it. Wanted to ask is the code included in tier3 channel member as well?
I just found your videos and I am really loving them. You have the skill of keeping things simple and explaining them nicely. Well done. Btw, you should give yourself more credit for speaking clear English, it is better than average and I had no trouble understanding you even at 1.75x speed. Keep up the good work!
Great video as always! quick question - you made a profit here of 0.9%, but the sell trigger was supposed to act when it hit 0.15%, the difference is just because of the time it took to place the sell order?
Try to build your program around some trading indicators, such as stochastic for example. It maybe worth your attention. Or around some real trading strategy. Btw thank you for your what you doing) it is really cool
Thanks for you comment mate. Did you check out my 2 newest videos? I played around with stoch, RSI and MACD there. Might be interesting for you. I am also considering some other indicators in my cryptobot playlist. Check that out and let me know what you think about it!
Hi. I am getting the following error "BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action.". I have googled for a few hours and nothing has worked. I have done KYC, deleted the api keys and reissued them, ive edited the permissions and made sure futures are on, tried it with SPOT. Do you have any other suggestions?
Really enjoyed it, I got a error message when i am trying to execute buy order looks to me time zone, I am living in UTC+10, if you can pls let me know how to fix this errors AttributeError: 'NoneType' object has no attribute 'tzinfo'
In your example, your asset commission in in BNB. .when I do a trade using api, it is in the asset bought. So 0.1% of qty is eaten up. So when I sell, the qty bought is higher so the sell order fails because insufficient qty. how do I make the commission be taken out of FIAT funds rather the bought symbol
Thanks a lot man, that's nice to read! You don't have to sign out. You are not logging in but sending a request via the API. You can shut down the Kernel after running your script tho.
Thank you very much for your kind comment :-) I am connecting to Binance via the Binance API and the python Binance wrapper. Not quite sure what do you mean with connecting the notebook? The notebook is just an interface to code. Can you clarify? Thanks a lot in advance!
Hi Algovibes, I'm learing a lot from your videos. Would it be possible to have a video on how to backtest trading strategies with a paper trading account in the Binance testnet? And how to set things up? I'm struggling with setting things up. Thanks for your help and great instructional videos.
I love your videos. Using real life examples make it so easy to learn and your explanations during the videos makes the code very understandable. I don't understand the last line of your code "strategytest" as I get an error that I have not strategytest is not defined. I had the same error in another video where you use strategy.
No idea but this thread could be helpful on that topic: stackoverflow.com/questions/66132843/is-there-a-way-to-get-the-market-cap-or-market-cap-rank-of-a-coin-using-the-bina
a question, I want to change the sell time to a for example 20 minutes to give more time to sell it. Now it take s1 minute 28 seconds. I was trying but still not works, how can I do that ?
Hi, why when I try to create an order, I get an error TypeError: order_market_buy() missing 1 required positional arguent: 'self'? what to put in a self?
Hi, this script is written in Python. Before you are writing something like this you should have a solid understanding of Python, Pandas, APIs and Trading. If you want you can check out my playlists: Python Introduction and after that Python for Finance.
Hey Algovibes, Firstly thanks a lot for all the informations you provide on your channels. I was wondering if you encrypted your apikeys file, to be safe in case of you get hacked so nobody could access to the keys quickly ? I am currently working on reading my api encrypted file in python and din't find a way to success to do it. May be you can help me if you already did it ? Thanks again for your work.
You don't need keys to run the get_historical_kline function. Just need to instantiate the client like this: client= Client() I actually did that in more recent videos. Please check them out. Let me know if this is solving your problem!
Then I failed on explaining that - I am sorry! You are installing in your current Python environment. Can you elaborate on "files from python-binance" ?
i've just coded along to this great video of yours, but at the end after running the function strategytest('BTCUSDT', 0.0005), I got the message : BinanceAPIException: APIError(code=-2010): Account has insufficient balance for requested action. I set the qty to 0.0005 BTCUSDT, and i have more than 0.025 BTCUSDT ... what could be the reason for this error ?
Ich komme schon an der Stelle: "client = Client(api_key, api_secret)" nicht weiter und bekomme nur Fehlermeldungen. Ich habe es mehrfach verscuht auch nach der Anleitung der Seite, sowie nach Anleitung aus dem Video
Dann leg mal los: Welche Fehlermeldung bekommst du? Hast du python-binance installiert? Hast du api_key und api_secret definiert? Das wären so meine ersten checks.
@@Algovibes ich habe tatsächlich die Keys nicht definiert. Man sollte dir im Video auch zuhören, das aus den Keys ein String erstellt werden muss 🙄 top Video! Danke für deine Zeit und die Arbeit, die du in das Video investiert hast 😘😘
Hi, Many Many thanks for your interesting channel. I'm watching and learning all one by one. a question I tried to find on the Net but couldn't. how can I sock other interval than 1m from binance? let say 3d, 4h and 5s. Thanks in advance
Really intresting, going to try and built my own bot. Tought question, do you think that you can use machine learning with trading? It would be intresing to see how machine learing would learn from different indicators with past data and use that knowledge to make new trades. Also, if you want for instace to sell the asses earlier then your own set limits, can this be done in binance? And one more question, do you have a video where you explain how you can test different strategies without going broke :) ? Great video!
I already played around with ML in some of my videos but not yet in Live Trading. I have a video planned in the upcoming weeks. But this one isn't taking technicals as inputs but just a classifier based on past returns. There will surely be a video on your mentioned topic but probably not this year. Regarding the second one: Yes. You can either just manually sell the asset or just create a order e.g. within a second python environment and just create a sell order. Third one: I have a lot of resources on backtesting strategies but I usually take stocks. You could run a bot using a livestream and store the executed trades in an e.g. array/dataframe/list. There is also the Binance testnet but I didn't have exposure to it yet.
Ich weiß, ich bin spät dabei, aber in welchem Video wird denn die "cumulret" Zeile erklärt? Der Rest ist fantastisch aufbereitet und super nachzuvollziehen. Freue mich schon darauf, die weiteren Videos zu schauen.
So excited to get deeply involved with the content here, just one question, on most videos as ive flicked through them, you store your API keys within a API notebook, then execute this file from within the main script. What's the format/code of the API file please?
@@Algovibes many thanks I worked this out now. For those seeking help here, create a file, place you API_Key and API_Secret within, then on your primary main file, just import filename.py then you can reference the variables.
Interactive Brokers is on my list but probably rather beginning on next year. Problem is, I am using an API with a European discount broker which is...of 0 value for my audience. Have to set up IBX and stuff.
when I run client.get_historical_klines it returns this error raise error("bad escape \\%s" % ch, source.string, source.pos) regex._regex_core.error: bad escape \d at position 7
Welcome :-) Thanks for watching and your comment. I am pretty sure you can, yes. I think using the testnet is just an optional parameter when instantiating the client.
Just define them in another notebook and run this Notebook inside the other notebook. Or create a python script, define the two variables and import them. Or if you wanna do it more professionally work with a config file.
@@Algovibes ye i did it like you with % run but i can also just type them as strings and use them i was just confused cuz you have to hide the keys i dont :D
Another question - how would you go about testing this with fake trades? meaning that I only want to simulate the trades in real time but not actually sell/buy. I know the binance wrapper has a "create_test_order" function but I couldn't get it to work. Could it be because of a 0 balance in binance? Also, there's nothing in the 'strategytest' function that will continuously scan for when to buy, does this mean you have to call the function every minute yourself?
I think you can place fake trades in the Binance testnet but I didn't have any exposure to that yet. Other than that I would simply run a socket (as I did in the newer vids) and store executed trades in a list or dataframe. And regarding the last question: Yea. I know this is bad but this is just an example. The approaches using the socket are recommended.
The getminutedata function works for me (with some tweeking) but the strategytest doesn't. Not exactly sure where I'm going wrong, can it have something to do with me using Pycharm instead of jupyter?
once again I managed to squeeze through, the error was between the keyboard and the chair. Are there any good discords where n00bs like me can converse with people more knowledgeable on this subject than?
😁 nice that you solved it on your own. You are invited to join my Discord server by coming a channel member: ruclips.net/channel/UC87aeHqMrlR6ED0w2SVi5nwjoin
Amazing video! Very clear explanation. I'd like to start making a trade bot myself, but I can't really find some clear information about the fees of Binance. Can you help me with that?
I wish I found your channel a few years ago.
Im super impressed honestly. Dont know if you remember, but Ive commented a few times this past week on your videos.
Im doing a python study as part of a programming master degree. (At age 37).
Ive learned more from watching your videos the last week, than in 3 months of reading books. This is what Im interested in. The transition from a 3D modeller to this is challenging, but totally worth the effort.
Would it be okay for me to write you a message sometimes to help me backtest a strategy?
Not immediately, but somewhere in the next few weeks!
You have a gift man!
Greeting from Holland!
OJA to be able to know cryptocurrencies and get benefit from it. That is why we focus so much on creating a friendly, easy user- experience and why we put simplicity and transparency first.
Sorry, what? 😛
Really thank you!! I am in phase two of a similar coding journey you described in another video!
I'm halfway through this video. A tweak: I am using bitfinex and the cctx library to follow along with you. cctx will allow me to shift through mulitple exchanges eventually.
import ccxt
import pandas
def get_min_data(symbol, interval, lookback):
if exchange.has['fetchOHLCV']: #checks if supported on the exchange
print('fetching OHLCV')
ohlcv = exchange.fetch_ohlcv(symbol, interval, limit=lookback)
ohlcv = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
ohlcv = ohlcv.set_index('timestamp')
ohlcv.index = pd.to_datetime(ohlcv.index, unit='ms')
return ohlcv
else:
print('no data on the requested crypto')
Thanks for watching man. Well that's quite interesting! Thanks a lot for sharing.
Sehr nice mein lieber, hat Spaß gemacht, mitzucoden, alles sehr nachvollziehbar erklärt!
Danke dir :-) Sei herzlich eingeladen dir meinen anderen stuff in der cryptobot playlist zu geben und sag mir was du davon hältst!
first video of the serie, great content you've earned yourself a subscriber
Thanks for subscribing buddy :-) Be invited to check out the other videos in the cryptobot playlist!
The ploting of the data received through getminutedata at around 16:25 is not working for me. I think it has to do with me using pycharm instead uf juypter notebook. Does anyone knwo how to graph the exchange rates on pycharm?
This was extremely helpful to my project of building a bot. Thank you
just placed my very first api trade, thanks a lot =)
fingers crossed 😛
@@Algovibes actually excactly what i'm trying to do, but i have to learn the basics first. Right now i'm doing your udemy course
Maybe you can repeat the chellange next year 😉
Incredible!! I found your channel and this awesome video😄
Thanks Algovives.. I am writing my botwatching your tutorial Thanks again for making such knowledge free
Awesome! Thanks a lot for your comment. Really appreciate it :-)
if ur in the US and running into an issue on making the client just make sure to add tld='us'
Good point. Thanks for sharing this!
do not do injustice to yourself(14.11). you are a genius. Perfect tutorial and thanks again.
I am not but anyhow I really appreciate your kind words :-) Thanks man
Your channel is like a goldmine for someone like me trying to learn and implement strategies in python. Can you make videos on multi-factor equity strategies?
Thanks for your kind words. Really appreciate it and I am glad you can extract value out of my videos :-)
This is amazing. Love the information, genuine vibe, and straight to the point. You've got a new subscriber.
Thank you buddy. Awesome to have you on board :-)
@@Algovibes same new sub here you are great!!!
I liked it, very hands on. Will subscribe.
Thanks a lot for subscribing buddy
your explanation was perfect thank you
Thanks for the feedback mate.
Awesome, thanks for the information, new subscriber man.
Awesome, thanks a lot for your support man.
Legend!!!!
You are for leaving a comment! :-)
Yeah.. This is super awesome. I can not wait for you to try out new strategies like supertrend
Thanks a lot :-) Until now this video is performing really bad but I will release 1-2 more regarding cryptocurrency trading, maybe I can thrill more people with that.
Your new subscriber.
Amazing content . Post videos regularly related this . Eagerly waiting for every new video.
Keep growing 🤘
Thank you buddy
awesome video, have ok knowledge on python and very good trading knowledge but needed a jumpstart to build my own engine so thanks !
Thanks buddy :-) Wishing you all the best for your project.
hi I've solid knowledge in python but not so good in trading. If we can collaborate we can build something good. Do let me know if you want to collaborate and build a bot.
Very helpful as usual, thank you mate!
Thanks a lot mate :-)
Please share a code in git. I will be thankful to you for this
Like first, watch next.
Thank you my friend :-)
Thank you. Please continue. very useful information
Sure mate, thanks a lot for watching :-)
Thank you so much for this amazing video! A bit off-topic, but I wanted to ask: I have a SafePal wallet with USDT, and I have the seed phrase. (behave today finger ski upon boy assault summer exhaust beauty stereo over). What's the best way to send them to Binance?
i'am getting "No Trade has been excecuted" in my first test and i don't now why. Help please
Can you elaborate?
Fantastic my friend!!!
Thanks buddy :-)
This was exactly I was looking for recently. It will be good to understand how much usdt you are using and if we can use 200-300usdt in this strategy. How to determine that?
Thanks for watching :-) Glad it was helpful.
This is determined by the quantity. I was using 0.001 BTC/USDT which was roughly 56 Dollars for this specific trade. I had some USDT in my wallet which you have to make sure beforehand if you want to trade this pair.
Brilliant! thank you so much
Welcome mate. Thanks for watching :-)
you make it look so easy, but the development must have been tedious, im proud i understood it though great video
Even if it doesn't look like it, there is a lot of work behind those videos. Biggest part of those bots is the double and triple check of functionalities. Anyhow, this one was rather done quickly. Thanks a lot for watching :-)
Learned a lot. Thank you.
Awesome. Thanks a lot for your comment :-)
Thank you so much !
Thank YOU for watching! :-)
Amazing informative video. Thank you so much!
That's awesome to read. Thank you very much for watching :-)
Yes, you are the best, nice job.
Probably not but at least I am working on improving myself :P Haha. Thanks a lot for your comment mate, that's a huge support for me :-)
how to apply Bollinger bands strategy upload a brief video on that strategy. thanks
Hey mate, I wanted to cover Bollinger bands in one of my future videos. Anyhow thank you very much for your suggestion! This is helping me a lot.
good work thanks
welcome buddy, thanks for watching :-)
Hello Sir, I have one question . Why you wrote
#buy if asset fell by more then 0.2% within the last 30 min
#sell if asset raises by more then 0.15% or fall further by 0.15%
and in same time you wrote if cumulret[-1] < -0.002: and if sincebuyret[-1] > 0.0015 or sincebuyret[-1] < -0.0015:
Why you wrote buy if asset fell by more then 0.2% and sell if rise 0.15%
And in code you wrote 0.002 and 0.0015 ?
bis minute 16.25 kam ich mit, dann kam diese plott funktion... am anfang des videos wurde nicht gezeigt, welcher plotter hier genutzt wird bzw wie dieser importiert wurde. ich habe genutzt: test.plot() und plt.show() aber mich interessiert deine variante. ich nutze kein Jupiter Notebook, daher ist manches schwerer nachzuvollziehen für mich. aber gute arbeit!!!
This is just amazing!!!
Happy that you like it man. Thanks for your comment :-)
Super Liked it!!
Thanks mate :-)
Cool You really help me Well done!
Happy to read! :-) Thx a lot for watching.
Thank you so much for this clear and excellent video. Is it possible to have the api run continuously or run several orders? or do you need to execute each one individually? To be precise as in your example you mentioned buy if price goes down more than 0,2% and sell if increases more than 0,15%. now is it possible to program it to keep buying and selling automatically according this strategy?
Hi Mohammed, thanks a lot for your feedback and your kind words.
Yes it is. I have covered that in my newer videos. I actually also did cloud deployment to be independent from your local machine. Be kindly invited to check that out.
Pretty awesome, I like the channel very much. please upload a video based on 0.1 second market price difference if possible thanks
Hi buddy, thanks a lot for your kind words. Really appreciate them.
Can you check out the videos in the cryptobot playlist? I played around both with the Binance socket manager and websockets in the different videos.
even though i installed python-binance, it keep on acting like it doesnt recognizes the binance module...
Nice video.Please I'll like to know if it is possible to automate Binance convertion(converting from one crypto to another) with Python. If so, how?
i am getting some error : ...line 9
print(order)
^
IndentationError: unexpected indent i cant figure it out because i did everything exactly as you did and 10times checked something is wrong with print comanda, any ideea how to pass that?
You probably have been using tabs and space for indentations. You need to make sure you are consistently having the same level of indentations.
Nice tutorial
Happy to read. Thank you :-)
Impressive videos
Great Video! Im new on soft soft, and tNice tutorials tutorial really helped
hey, im stuck in build a connection to Binance and connectivity check as you have created another notebook which contains your api keys which i have no idea how to code it. Wanted to ask is the code included in tier3 channel member as well?
Tier 3 membership will give you access to a ton of Notebooks, yes! Be invited to join.
I just found your videos and I am really loving them. You have the skill of keeping things simple and explaining them nicely. Well done. Btw, you should give yourself more credit for speaking clear English, it is better than average and I had no trouble understanding you even at 1.75x speed. Keep up the good work!
Thanks a lot buddy ❤️
wonderful video...very informative.. Thanks :)
Thank you my friend!
can you start a kucoin series? would love to see everything that goes into building one for kucoin. love your vids tho!
Thanks a lot man! I am planning on covering another platform but I am not 100% sure if it will be Kucoin. But maybe!
thanks so much for this, it's very interesting and well presented.
edit: found the solution for my problem
Thanks for watching :-)
Great video as always!
quick question - you made a profit here of 0.9%, but the sell trigger was supposed to act when it hit 0.15%, the difference is just because of the time it took to place the sell order?
Thanks mate. Can you pass me a timestamp?
@@Algovibes I have the same question. It's in 33:26. According to the values, 54133.24/53635.53 * 100 -100 = 0.92%
@@Algovibes Excellent video by the way, I've already programmed mine.. I'll follow up with your videos incorporating sql next, keep up the good work!
@@Algovibes I am curious about this as well.
Try to build your program around some trading indicators, such as stochastic for example. It maybe worth your attention. Or around some real trading strategy. Btw thank you for your what you doing) it is really cool
Thanks for you comment mate. Did you check out my 2 newest videos? I played around with stoch, RSI and MACD there. Might be interesting for you. I am also considering some other indicators in my cryptobot playlist. Check that out and let me know what you think about it!
Hi. I am getting the following error "BinanceAPIException: APIError(code=-2015): Invalid API-key, IP, or permissions for action.". I have googled for a few hours and nothing has worked. I have done KYC, deleted the api keys and reissued them, ive edited the permissions and made sure futures are on, tried it with SPOT. Do you have any other suggestions?
Did you check the box properly? Are you in a country where future trading is prohibited?
Hey, can you show us how/why you determined the 0.02%, you said you used volatility to calculate this percentage.
Thanks
Hi mate, as far as I remember I just took the standard deviation of the last minutes or hours.
Really enjoyed it, I got a error message when i am trying to execute buy order looks to me time zone, I am living in UTC+10, if you can pls let me know how to fix this errors
AttributeError: 'NoneType' object has no attribute 'tzinfo'
In your example, your asset commission in in BNB. .when I do a trade using api, it is in the asset bought. So 0.1% of qty is eaten up. So when I sell, the qty bought is higher so the sell order fails because insufficient qty. how do I make the commission be taken out of FIAT funds rather the bought symbol
Set the commission to BNB. It is the only reasonable way. You are saving a lot of fees with that.
Thank you ! It was very helpful !
but HOW TO SIGN OUT?? from the account once we want to close the program
Thanks a lot man, that's nice to read! You don't have to sign out. You are not logging in but sending a request via the API. You can shut down the Kernel after running your script tho.
Your videos are Amazing. I have a question. How do you connect the the notebook with binance ?
Thank you very much for your kind comment :-)
I am connecting to Binance via the Binance API and the python Binance wrapper.
Not quite sure what do you mean with connecting the notebook? The notebook is just an interface to code.
Can you clarify? Thanks a lot in advance!
Hi Algovibes, I'm learing a lot from your videos. Would it be possible to have a video on how to backtest trading strategies with a paper trading account in the Binance testnet? And how to set things up? I'm struggling with setting things up. Thanks for your help and great instructional videos.
Hi buddy, that's great to hear! I will release a paper trading bot in the future but not quite sure if I am using the testnet for that.
great video!!
Thanks mate, be kindly invited to check out the other videos in the cryptobot playlist.
I love your videos. Using real life examples make it so easy to learn and your explanations during the videos makes the code very understandable. I don't understand the last line of your code "strategytest" as I get an error that I have not strategytest is not defined. I had the same error in another video where you use strategy.
Thanks for your kind words Albert. Well did you define the function strategytest?
@@Algovibes Thanks for responding. I found my mistake and the fix while watching another one of your videos.
AlgoVibes. How would you pull the historical Circulating supply?
No idea but this thread could be helpful on that topic:
stackoverflow.com/questions/66132843/is-there-a-way-to-get-the-market-cap-or-market-cap-rank-of-a-coin-using-the-bina
@@Algovibes Thanks!! you have a message dm?
Thank you Sir
Thank YOU for watching and your kind comment :-)
a question, I want to change the sell time to a for example 20 minutes to give more time to sell it. Now it take s1 minute 28 seconds. I was trying but still not works, how can I do that ?
Could you elaborate on what you want to achieve? Thanks in advance!
Hi, why when I try to create an order, I get an error TypeError: order_market_buy() missing 1 required positional arguent: 'self'? what to put in a self?
Did you instantiate the client? So did you write something like client = Client(...,...)?
@@Algovibes yes, I did like in your videos
Could you please refer me your video that explains the "cumulret". thanks
Sure mate, here:
ruclips.net/video/fWHQwqT3lNY/видео.html
Isn't it linked in the description? If no, I apologize!
Great learning video
Awesome to hear. Thank you :-)
hello where i can program this coding? should i have an application or i can run it through online or website thank you in advance for answering .
Hi,
this script is written in Python. Before you are writing something like this you should have a solid understanding of Python, Pandas, APIs and Trading.
If you want you can check out my playlists: Python Introduction and after that Python for Finance.
What is the syntax of the notebook you have the api_key and api_secret from Binance?
api_key = 'asjfa9f0ajwej0aiw'
api_secret = 'aosfawnrw'
hope that helps!
@@Algovibes thanks man.
Nice
Thanks my friend!
do one with websocket realtime to postgres db or timescale db please :), Best channel on RUclips
Thanks a lot for your kind words! :-)
Thanks a lot for your suggestion! I will see what I can do but my preference is clearly MySQL.
Hey Algovibes,
Firstly thanks a lot for all the informations you provide on your channels.
I was wondering if you encrypted your apikeys file, to be safe in case of you get hacked so nobody could access to the keys quickly ?
I am currently working on reading my api encrypted file in python and din't find a way to success to do it. May be you can help me if you already did it ?
Thanks again for your work.
Hey Baptiste,
thanks a lot for your comment. Appreciate it!
Which encryption do you use?
how did you save your keys ? in a python file as strings ? I am trying to get past that client.get_historical_kline line. its not working
You don't need keys to run the get_historical_kline function. Just need to instantiate the client like this:
client= Client()
I actually did that in more recent videos. Please check them out. Let me know if this is solving your problem!
@@Algovibes what is the video called ? I have been looking for it
i don´t understand anything here how i get started. Where i have to write the !pip install? and where do i need to put the files from python-binance?
Then I failed on explaining that - I am sorry! You are installing in your current Python environment. Can you elaborate on "files from python-binance" ?
Nice video👍
i've just coded along to this great video of yours, but at the end after running the function strategytest('BTCUSDT', 0.0005), I got the message : BinanceAPIException: APIError(code=-2010): Account has insufficient balance for requested action. I set the qty to 0.0005 BTCUSDT, and i have more than 0.025 BTCUSDT ... what could be the reason for this error ?
Ich komme schon an der Stelle: "client = Client(api_key, api_secret)" nicht weiter und bekomme nur Fehlermeldungen. Ich habe es mehrfach verscuht auch nach der Anleitung der Seite, sowie nach Anleitung aus dem Video
Dann leg mal los: Welche Fehlermeldung bekommst du? Hast du python-binance installiert? Hast du api_key und api_secret definiert? Das wären so meine ersten checks.
@@Algovibes ich habe tatsächlich die Keys nicht definiert. Man sollte dir im Video auch zuhören, das aus den Keys ein String erstellt werden muss 🙄 top Video! Danke für deine Zeit und die Arbeit, die du in das Video investiert hast 😘😘
This is really helpful video! How do implement isolated mode in this code, any other video implementing the isolated mode?
this code is for spot trading not future
Hey great video, is there a leverage run by default with the Binance Api or I have to turn it off myself?
Hi man, thanks a lot. Can you elaborate on "leverage run"?
Hi,
Many Many thanks for your interesting channel. I'm watching and learning all one by one. a question I tried to find on the Net but couldn't. how can I sock other interval than 1m from binance? let say 3d, 4h and 5s.
Thanks in advance
Hi man, thanks a lot for your comment.
You can find some examples on page 8 in the docs:
readthedocs.org/projects/python-binance/downloads/pdf/latest/
is the page still usable? it keeps asking me to verify and i wont give them my personal data
Yeah I know this is frustrating but I was going through the KYC process as well. You can't trade anonymously anymore.
Really intresting, going to try and built my own bot. Tought question, do you think that you can use machine learning with trading? It would be intresing to see how machine learing would learn from different indicators with past data and use that knowledge to make new trades. Also, if you want for instace to sell the asses earlier then your own set limits, can this be done in binance? And one more question, do you have a video where you explain how you can test different strategies without going broke :) ? Great video!
I already played around with ML in some of my videos but not yet in Live Trading. I have a video planned in the upcoming weeks. But this one isn't taking technicals as inputs but just a classifier based on past returns. There will surely be a video on your mentioned topic but probably not this year.
Regarding the second one: Yes. You can either just manually sell the asset or just create a order e.g. within a second python environment and just create a sell order.
Third one:
I have a lot of resources on backtesting strategies but I usually take stocks. You could run a bot using a livestream and store the executed trades in an e.g. array/dataframe/list.
There is also the Binance testnet but I didn't have exposure to it yet.
Ich weiß, ich bin spät dabei, aber in welchem Video wird denn die "cumulret" Zeile erklärt? Der Rest ist fantastisch aufbereitet und super nachzuvollziehen. Freue mich schon darauf, die weiteren Videos zu schauen.
Hi :-) Habe ich hier erklärt:
ruclips.net/video/fWHQwqT3lNY/видео.html
Danke für deinen Support!
So excited to get deeply involved with the content here, just one question, on most videos as ive flicked through them, you store your API keys within a API notebook, then execute this file from within the main script. What's the format/code of the API file please?
Hi man, thanks a lot for your comment.
The file is just looking like this:
api_key = '23ß400hraobdfnqfßaw'
api_secret = 'askfanf0wje0awjk0dk'
@@Algovibes many thanks I worked this out now. For those seeking help here, create a file, place you API_Key and API_Secret within, then on your primary main file, just import filename.py then you can reference the variables.
Excellant reply
Can you please do an Interacive Brokers APi and Trading View Pinescript Integration, like pinescript orders excecuting in interactive brokers
Interactive Brokers is on my list but probably rather beginning on next year. Problem is, I am using an API with a European discount broker which is...of 0 value for my audience. Have to set up IBX and stuff.
when I run client.get_historical_klines it returns this error
raise error("bad escape \\%s" % ch, source.string, source.pos)
regex._regex_core.error: bad escape \d at position 7
Please just double check the strings in the function call. Just do it exactly as shown in the vid. Should be fine then.
Thx so much. Is it possible to connect this bot to the api of the testnet futures ? Can someone know how to do it ?
Welcome :-) Thanks for watching and your comment. I am pretty sure you can, yes. I think using the testnet is just an optional parameter when instantiating the client.
Awesome Video
Thank you very much for your comment. Appreciate it. I am releasing a new one with live trading today. Be kindly invited to check that out :-)
i dont get how to save the api keys as variables and use them later....................................
Just define them in another notebook and run this Notebook inside the other notebook. Or create a python script, define the two variables and import them. Or if you wanna do it more professionally work with a config file.
@@Algovibes ye i did it like you with % run but i can also just type them as strings and use them i was just confused cuz you have to hide the keys i dont :D
Another question - how would you go about testing this with fake trades? meaning that I only want to simulate the trades in real time but not actually sell/buy. I know the binance wrapper has a "create_test_order" function but I couldn't get it to work. Could it be because of a 0 balance in binance?
Also, there's nothing in the 'strategytest' function that will continuously scan for when to buy, does this mean you have to call the function every minute yourself?
I think you can place fake trades in the Binance testnet but I didn't have any exposure to that yet.
Other than that I would simply run a socket (as I did in the newer vids) and store executed trades in a list or dataframe.
And regarding the last question: Yea. I know this is bad but this is just an example. The approaches using the socket are recommended.
thank you..
Thanks for watching mate :-)
The getminutedata function works for me (with some tweeking) but the strategytest doesn't. Not exactly sure where I'm going wrong, can it have something to do with me using Pycharm instead of jupyter?
once again I managed to squeeze through, the error was between the keyboard and the chair. Are there any good discords where n00bs like me can converse with people more knowledgeable on this subject than?
😁 nice that you solved it on your own. You are invited to join my Discord server by coming a channel member:
ruclips.net/channel/UC87aeHqMrlR6ED0w2SVi5nwjoin
Amazing video! Very clear explanation. I'd like to start making a trade bot myself, but I can't really find some clear information about the fees of Binance. Can you help me with that?
Thanks man. You mean this here?
www.binance.com/en/fee/schedule
Great!
Thanks :-)
Hellow.
I have this kind of problem:
AttributeError: module 'pandas' has no attribute 'to'
Can anyone help?
probably just a typo. It should be pd.to_sql(....)