Comments (30)
Let me know if you are looking for contributions .
from py5paisa.
I found out that we need to query https://www.5paisa.com/developerapi/websocketformarketfeeds for live market feeds by accessing the APIs. How do we do it via sdk ?
I don't think there is any code written to do it via Python SDK, I think each one will have to code it normally through Python code using websockets. Have you written any code and would like to share here? Thanks.
from py5paisa.
Well, their websocket feed API seems to be broken at the moment. A month ago I put together some code and managed to connect and receive stock ticker data and it worked, however the index ticker wasn't working so I raised a support request for the same. They assured me to address the "issue" on "priority" but on the contrary a few days later websocket connection stopped working altogether. If I receive a positive response from them I'll post it here.
from py5paisa.
Well, their websocket feed API seems to be broken at the moment. A month ago I put together some code and managed to connect and receive stock ticker data and it worked, however the index ticker wasn't working so I raised a support request for the same. They assured me to address the "issue" on "priority" but on the contrary a few days later websocket connection stopped working altogether. If I receive a positive response from them I'll post it here.
LIVE NEWS: NSE has stopped that trading system. BSE is working fine. Maybe that's why it's not working?
from py5paisa.
This is not about today. It hasn't been working for a while. Specifically, the LoginCheck API mentioned at [https://www.5paisa.com/developerapi/websocketformarketfeeds] now returns either
{"Message":"An error has occurred."}
or
{"body":{"Message":"Incorect Credentials","Status":1},"head":{"responseCode":"5PLoginCheck","status":0,"statusDescription":"Success"}}
from py5paisa.
This is not about today. It hasn't been working for a while. [...]
Hmm... well, then I think you should raise support request via email referencing this issue. I'll try this tomorrow morning, currently there's no data that's possible to stream! Hopefully it works and they get a function to us, so we stop re-inventing the wheel again and again... 😞
from py5paisa.
Nah, it's not working. When they mean "Pass the SessionID", what do they mean exactly? Pass what? Or login first, obtain a session id and then pass that? @anilgupta83 what had you passed when it was working?
from py5paisa.
The documentation on websocket is kind of sketchy. By session id they mean the cookie named '5paisacookie', this cookie is emitted on login and must be available on py5paisa client as something like client.session.cookies['5paisacookie']. My code is in golang which won't help much if I shared it here.
from py5paisa.
Yes, client.session.cookies["5paisacookie"]
gives me the cookie name, but it still doesn't work with that...
So what are you doing now after it's stopped working? You tried something else or the task is still on hold? @anilgupta83
from py5paisa.
Well, as I have mentioned earlier I have a ticket open with them for about a month. I keep pinging them in between, that's all we can do if the provider API is broken, no? :-)
3 days ago they told me that the concerned team is looking into the issue. If they provide a solution I'll post the detail here.
from py5paisa.
I just contacted them via support ticket, hopefully they'll help...
from py5paisa.
I just contacted them via support ticket, hopefully they'll help...
Still no help.
from py5paisa.
And now they aren't even replying to the follow-up emails! 🤣
It's been more than 25 days I'm struggling to deal with getting real-time data with websocket.
Firstly they have the Python SDK, but don't have any websocket classes created in it. And secondly now the login API doesn't work. Thirdly it is impossible to contact them (after the initial message).
Great! What should we do now? 😞
from py5paisa.
Hey @coder-amogh Trying to get that started soon. There was some issue which is now being solved. Soon will add it to the SDK as well
from py5paisa.
Hey @coder-amogh Trying to get that started soon. There was some issue which is now being solved. Soon will add it to the SDK as well
I don't mind if it's added to SDK few months later. For now, I need to get the websocket working... There are bunch of projects I want to do with this APIs and I won't be able to do any of them because the websocket is not working.
Can't something be done to this that the websocket APIs are started first and then the SDKs are been focused? To me, the API uptime is more important than the SDK.
from py5paisa.
Hey @coder-amogh ,
I got it!
It's highly prioritised even from our end web socket issue is being solved.
Check it next Friday hopefully you see changes done!
from py5paisa.
from py5paisa.
5Paisa support replied that the issue is resolved, but it's not. Also a sample code is really appreciated. I cannot find literally, literally any single working piece of code of this websocket.
It's not Friday yet, so I'm waiting. Hopefully it gets resolved by Friday.
Excited!
from py5paisa.
Hey @coder-amogh ,
I have checked for web socket update but I guess there is still some issue with the connection.
I will have to update by timeline shared to next week sadly.
For the code in python I can suggest going through - https://pypi.org/project/websocket-client/
Soon after sharing web socket on developer page. I will be pushing web socket functionality into our sdk as well.
Sorry for the delay!
Regards.
from py5paisa.
How many number of scrips you can request the LTP and Volume for? I tried a bunch of data today and it failed. When I tried just 10, it worked perfectly. What's the maximum number of scrips? Please mention it in the documentation: https://www.5paisa.com/developerapi/currentmarketdata
Also, just now (when the market is open), how to get the opening price of any stock? I can only get the last closing price (of the previous trading day), today's high and low, LTP and volume. I cannot get the opening price, although in the documentation OpenRate
key is mentioned. Please fix it!
Also, just had a query, what happens when there's dividend distribution or when the stock's split, is the closing price adjusted according to it?
from py5paisa.
Hey @coder-amogh ,
It works fine for about 50 request as per our API limit, anyways if you want to have more requests made anyway looping could help if evenly timed.
I also checked the data and found it is perfect and has no issues in there.
Open Rate is not coming in response that is true will get that checked again.
from py5paisa.
So they have closed my ticket as "resolved" and now https://www.5paisa.com/developerapi/websocketformarketfeeds page is gone. It appears they have withdrawn support for websocket feed.
from py5paisa.
So they have closed my ticket as "resolved" and now https://www.5paisa.com/developerapi/websocketformarketfeeds page is gone. It appears they have withdrawn support for websocket feed.
Same here. I'm in touch with them, they're saying its taking time. My project is stuck and I'm checking it almost everyday, but it's not working anyway. You can open another support ticket though.
from py5paisa.
Hey guys,
Sorry for long time getting response to web socket issue.
We are making some fundamental changes to the web sockets so that this change stays and is useful.
You all can check Python sdk which is upgraded completely.
Do share feedback
from py5paisa.
@coder-amogh
Naah not going to follow up with support anymore, all they have is canned responses. I am using ticker data from another broker. https://developers.stocknote.com/api/#streaming-market-data
Occasionally it lags by 10-15 seconds that is why I was interested in 5paisa implementation. It is getting the job done though, for now.
@rishabhmaniyar
Thanks, hope that the new version would work well. Also, if possible please provide an API to retrieve option chain along with the OI data.
from py5paisa.
Naah not going to follow up with support anymore, all they have is canned responses. I am using ticker data from another broker. https://developers.stocknote.com/api/#streaming-market-data
Occasionally it lags by 10-15 seconds that is why I was interested in 5paisa implementation. It is getting the job done though, for now.
Yeah, 5paisa's response is really really fast, almost equal to the one which were on localhost. I guess I'll have to too set a deadline for myself. If the API doesn't get back within next week or something, I should be switching to a different broker. I can't just keep waiting for the 5paisa's API to be up. They might just keep waiting for the next few weeks or month, we don't know.
from py5paisa.
It has started working as expected!
This issue can be closed now.
from py5paisa.
Hey @coder-amogh is python WebSocket API working as of now? I keep getting bad handshake
from py5paisa.
Hey @coder-amogh is python WebSocket API working as of now?
Yes, it's working. You can share the code, so the team can help find the issue you are facing.
from py5paisa.
@coder-amogh I have shared, link below. Its Go lang
I have got all API working except for websocket in Go
https://github.com/5paisa/go5paisa/issues/8#issue-913559231
from py5paisa.
Related Issues (20)
- TOTP login is not working HOT 1
- Close websocket connection HOT 1
- issue with the same script price HOT 2
- How to get Response Token using code for Login? HOT 2
- getting wrong status for mcx in Market status API
- order updated through websocket HOT 1
- How to reuse the session? HOT 2
- Live feed is not working
- Unable to establish web socket connection for market feed HOT 2
- Automatic authentication HOT 5
- Couldn't read data anymore from the API's
- not able to install liberary on google collab
- not able to install the py5paisa on google collab and AWS sagemaker
- Error while installing latest version using pip HOT 1
- Invalid syntax and deprecated readme
- RemoteOrderID is not being used while placing order on MCX
- Inconsistent behaviour between Tradestation website and API - Cash Orders on NSE generate errors like 'Scrip Not Available for Trading" - but can place order for same scrip on Tradestation website
- Incorrect response for Futures data
- Major Bug: self.payload not being reset
- Lack of Clear API Responses for User Actions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from py5paisa.