Awesome video Larry - You have a real talent of explaining these concepts and getting people up and running quickly using your examples and tutorials. Keep it up.
@parttimelarry4 жыл бұрын
Thanks much more to come!
@mschuer1004 жыл бұрын
Fantastic video. Very educational. appreciate the time taken to make these videos and make the content easy to use. Just started working with the Alpaca API last week so having the Polygon data feeding into it will be a nice complement. Keep the videos coming please.
@jeroenvermunt33723 жыл бұрын
Only place where I could find how to properly communicate with a websocket. This is precisely what I needed to know! thank you very much.
@michaelswiercz33574 жыл бұрын
Great video! Simple and to the point in less than 15 minutes.
@thirdreplicator4 жыл бұрын
Great video. You're a good explainer/communicator. I recommend putting a light source in front of your face so that we can see you.
@parttimelarry4 жыл бұрын
Thanks, I have a much better setup in my more recent videos :). Tool me a while to get my resolution and recording/editing setup right.
@semeradstephan4 жыл бұрын
Awesome Video! I am amazed that at this point you only have 6K Views
@michaelbdd4 жыл бұрын
Hi Larry, thanks for the great video. Just one question, in the python example, you called ws.send() first for authentication then called ws.send() again for subscribing to quotes. I'm wondering if the ws.send() function async? Should we wait for the first ws.send() success then send the second one?
@tbjasun3 жыл бұрын
Is there an updated version of this video for Alpaca? Trying wscat with the provided wss feeds is not working now. It looks to me like Alpaca is doing something else, as their docs indicate use of https: addresses for websocket feeds, but that doesn't work using wscat. Something is missing the mark here! Thanks for the help.
@tokusukeutsugi42393 жыл бұрын
I encountered same problem. Are there any solution?
@danielnelson99964 жыл бұрын
Hey Larry, thanks for the amazing video. While running the script, I get a message, [{"ev":"status","status":"max_connections","message":"Maximum number of connections exceeded."}]. Is this because I'm using my Paper Trading API key? I have a funded alpaca account but am using the paper trading API key to test some algos first. Any suggestions? thanks
@Clockwise.004 жыл бұрын
Super interesting content, waiting for next.
@NicciXRP Жыл бұрын
You are part of the reason I’m becoming dev😅🤟🏼 I don’t know anything but you explain this stuff so professionally! Where’s the new content? Hope all is well❤️👊🏼
@parttimelarry Жыл бұрын
Thanks man! Hope you keep it up, love these kinds of comments. I've been busy with some projects lately, so have been on a pause. I still think about making new videos all the time though...hopefully soon.
@vicvol73602 жыл бұрын
Why aren't you using asyncio library in this video? Other vidoes explaining websockets on python are using asyncio but don't know why it is needed
@US1004 жыл бұрын
Awesome Tutorial this Series will be very nice
@parttimelarry4 жыл бұрын
Thanks!
@hsan01843 жыл бұрын
Larry, great explanation! A simple question, if you do not mind answering - would it be possible to live plot websocket stream within the same python code (same file that opens websocket), so it just pops up a simple dynamic plot while streaming (ie without saving to CSV, reading back etc)?
@AlexJaeger7164 жыл бұрын
but how do you put this live data into a dataframe so that you can place orders on the close or open of a candle? can you make a video on putting live websocket data into a pandas dataframe?
@parttimelarry4 жыл бұрын
Thanks, in more recent videos I do this, but only for crypto so far. Same concept though. I will do a version for stocks, I have quite a few videos to make in my queue, but will get to it.
@AlexJaeger7164 жыл бұрын
@@parttimelarry Thank you! but the run_forever() method is blocking all of my code after it from being executed.. How do I fix this?
@nicholasrotich42954 жыл бұрын
thank you for your wonderful tutorials. Any chance that the connection fails if you are using paper account?
@parttimelarry4 жыл бұрын
Hey, in this video I used an API key from my paper account. Did you give it a try and have issues? There is always a chance a connection can fail. If you are sure your code is correct, then you can just have the script wait a few seconds and retry the connection.
@adamsocki4 жыл бұрын
I was having an issue opening a connection to the Websocket....but I finally figured out what was wrong. What I first did was add an ,on_error=on_error, in the parenthasis of WebSocketApp(). Then I created an on_error function that would print out the error. def on_error(ws, error): print(error) This gave me the following error.... [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108) After some googling of this error, I found something that said I needed to run: Applications/Python\ 3.8/Install\ Certificates.command After I did this, I was able to open up a connection to a Websocket through python. Hope this helps! Adam.
@suleimana678 Жыл бұрын
Hi Larry, thanks for all of the information in this video. Do you have any suggestions for how i can extract what the *exact time* the "high tick" happened at, and the exact time of the low tick?
@bullet42552 жыл бұрын
Is it neccessary to use Kafka here and Spark for real-time data processing if we wanted to to some data visualization and processing? Let's say we wanted to have 10 different currency pairs and then monitor them, or I misunderstood their purpose and they are not needed here?
@Jatin199023 жыл бұрын
Thank god finally I found a tutorial about WebSocket streaming of data. I am trying to stream data through IBKR. After modifying the script I am getting the following error "ModuleNotFoundError: No module named 'websocket'' " Thanks a lot.
@ABGTronic_Inc4 жыл бұрын
Can you demonstrate how to put the live quote on a text box where the content is refreshed each time new message is received ?
@parttimelarry4 жыл бұрын
Do you mean on the web? Yeah I think it would be a cool tutorial to build a real time trading dashboard, so will put this on my list.
@jasonbourne58253 жыл бұрын
Your lecture helps me a lot, thank you.
@rakeshrakesh07294 жыл бұрын
Hi Larry, awesome video. Could you please make a video for the same through TD Ameritrade. As in I how to code in python to grab live streaming data through TDA API. Most people use TDA and that would be greatly helpful. Thanks for all your videos.
@utkarshs0603 жыл бұрын
I was wondering whether we can use this real-time tick-by-tick data to create a strategy and if yes then please make a video on this as to writing real-time data into a CSV or a DB then creating strategies with it.
@ricomajestic Жыл бұрын
Yea would love to see that too. How to write real time data to a database.
@MrBraianzzz3 жыл бұрын
Hi Larry, this is awesome. Do you know how can I send the message to render.template html in Flask? Thanks
@andrewenglish14184 жыл бұрын
Hi, thanks for the video, really helpful! is there a way to stream all tickers that are associated with alpaca instead of subscribing to specific stocks?
@parttimelarry4 жыл бұрын
Every ticker might be a bit much I think, but maybe. There is an API method in the alpaca docs that returns all the available tickers. I suppose you could create sockets to listen on all of them, but haven't tried.
@YannickvDijk4 жыл бұрын
They currently limit to 30 channels per API key I believe.
@AlexJaeger7164 жыл бұрын
Hey Larry, how can i access the keys within the dictionary if the dictionary is inside of a list? I've been trying to access the bid and ask prices to use them in my strategy but I just can't find a way to pull them from the dictionary..
@amanchaure5584 Жыл бұрын
Hey, can you suggest a method to share the websocket data feed from a single subscription to multiple python trading scripts? The broker that I am using is having a limitation of only 3 websocket connections at any given instant.
@PyMoondra3 жыл бұрын
Great channel. Been trading recently, and trying to build some Python apps to find setups.
@michaelscarn73754 жыл бұрын
But how can I actually use this data (not print it), but use in if/else statements?
@akramdahmani72143 жыл бұрын
if you can print it, it means that you have as you can see in his terminal it's a list, do whatever you want with it :)
@neurondeep3 жыл бұрын
Can you do a buffer to acumulate for example 15 candles and crete indicators with this buffer like RSI, MACD etc?
@fearvalue1441 Жыл бұрын
Hey Larry, I love your videos and had a specific question on this in particular. I am having the hardest time getting websocket data to run through a pandas dataframe. Any quick tips? (yes im an idiot)
@livedev3 жыл бұрын
Hello, first of all, tell you that your videos are very good and they have clarified me enough on the subject. Could you explain or point me to the video, if you have talked about the continuity of the data? It happens to me that I stop receiving on_message but the websocket is still connected, how do I resume the transmission? On the other hand, the websocket also closes if there is an internet cut, isn't it supposed that run_forever () should automatically reconnect? I am working with webscoketApp and binance. From already thank you very much.
@guguladitya2 жыл бұрын
Good. But if you want to get multiple stock data, then what to do
@kalyanstock80584 жыл бұрын
Nice video. If one needs data for multiple stocks, do you need to create multiple websockets?
@parttimelarry4 жыл бұрын
I believe you can do a comma separated list of tickers, will need to double check the docs.
@releveitcandol19953 жыл бұрын
@@parttimelarry can you show how to do that? please I will like to know that
@lykiamusic Жыл бұрын
I have an API endpoint that I want to setup a web socket for so i can stream the data live. any ideas?
@LucaSpinello3 жыл бұрын
Great video thank you! Can you do another one on how to handle websocket with a sync please
@peterluro86497 ай бұрын
Great video! what is the most accurate realtime stock data library for Python? (Ideally with the best price)
@jacobdietz4545 Жыл бұрын
I typed the same thing as you but for some reason my on_open function is getting called. Do you have any ideas why? I've been googling for the past hour and can't find shit
@alerto24513 жыл бұрын
Hey Larry how about some examples on python hyperthreading. Thanks!
@surajkhanra37674 жыл бұрын
Hi , can u make a video which can send and receive simultaneously without closing the socket ?
@Lorant19843 жыл бұрын
Where would you get data from non-US exchanges, please?
@vaibhavchogle23414 жыл бұрын
Hi , I am getting authentication failed message. i have tried generating keys from Alpaca but it is giving same message, what may be the issue ? C:\Users\Administrator\Desktop\Websocket>python app.py opened reaceived a message [{"ev":"status","status":"connected","message":"Connected Successfully"}] reaceived a message [{"ev":"status","status":"auth_failed","message":"authentication failed"}]
@akramdahmani72143 жыл бұрын
Great tutorial, thanks 👍
@mantisliving4 жыл бұрын
Will this end up costing $200/month? should i consider quandl or just use my ibkr api to get price data instead?
@kaleign4 жыл бұрын
If you put a few bucks in an Alpaca brokerage account, then you have a funded account with access to their market data.
@davidsilverberg83272 жыл бұрын
Thanks so much for this video man
@sanjeethnt56533 жыл бұрын
Great job@Part Time Larry can you create the same one for SSE
@ibn-nafis34344 жыл бұрын
Thanks Boss
@cunninghamb5054 жыл бұрын
What is I want to add TLS
@ywueeee Жыл бұрын
this is 3yrs old, what's the current best way to do this?
@swapnilpatil24454 жыл бұрын
Hello sir,will you please add more functionalities to create Stock Price Alert system with this data....Thanks in advance...
@parttimelarry4 жыл бұрын
That's a great idea. I just posted a newer streaming market data video, so I think alerting would be a perfect addition. Next video I will render a chart and implement alerting.
@swapnilpatil24454 жыл бұрын
@@parttimelarry Thanks a lot sir....Appreciate your work..
@arpitvijayvargiya13712 жыл бұрын
Thank you this.
@nikschuetz41122 жыл бұрын
hope you have refreshed your api key.. would blur some screens
@parttimelarry2 жыл бұрын
I delete them after every video
@CarlosRomeroconnect4 жыл бұрын
Amazing!
@margeausoboti88644 жыл бұрын
LOVE this tutorial. I am having an issue though, any suggestions? When I go to authenticate my API key I get a response: zsh: command not found: action:subscribe,params:MYAPIKEY
@nickmotor65010 ай бұрын
Anyone still using this? Does this still work? Trying to avoid unnecessary effort. Thanks in Advance!
@wtf96932 жыл бұрын
brother ! i need your help plss..
@abhay13023 жыл бұрын
hi larry, could you code me an app with streaming price distributed to multiple users at the same time, I will hire your services
@guillaumejames42224 жыл бұрын
Hi Larry, perhaps you have an answer, I cannot authenticate via the terminal. Thanks for your help. > (base) MacBook-Pro-GJ:~ gj$ wscat -c wss://alpaca.socket.polygon.io/stocks Connected (press CTRL+C to quit) < [{"ev":"status","status":"connected","message":"Connected Successfully"}] > {"action":"auth","params":"I use my key here"} < [{"ev":"status","status":"auth_failed","message":"authentication failed"}]
@rfyorfyo50223 жыл бұрын
you did not show how to unsubscribe
@icakinser4 жыл бұрын
Where can one download source code?
@parttimelarry4 жыл бұрын
GitHub.com/financehacks
@parttimelarry4 жыл бұрын
github.com/hackingthemarkets/alpaca-websockets
@k2icc2 жыл бұрын
My paper account with a new authentication fails. Do I need some funding even on paper account? Thanks. "" opened received a message [{"ev":"status","status":"connected","message":"Connected Successfully"}] received a message [{"ev":"status","status":"auth_failed","message":"authentication failed"}] "
@sergioametheone1 Жыл бұрын
Does anybody know what is this line ws = websocket.WebSocketApp(SOCKET...) etc? WebSocketApp is not defined in websocket!
@sergioametheone1 Жыл бұрын
Answering myself here: It is not defined in websocket but in websocket-client.