Profitability API
Forum rules
Welcome to the System Support forum! Encounter a problem related to the pool? Post your issue here and we will help you out.
Keep in mind that the forums are monitored by PROHASHING less closely than the official support channels, so if you have a pressing issue, please submit an official support ticket so that our Support Analyst can look into your issue in a timely manner.
We cannot answer financial questions related to your account on a public forum, so those questions should always be submitted through the orange Support button on prohashing.com/about.
For the full list of PROHASHING forums rules, please visit https://prohashing.com/help/prohashing- ... rms-forums.
Welcome to the System Support forum! Encounter a problem related to the pool? Post your issue here and we will help you out.
Keep in mind that the forums are monitored by PROHASHING less closely than the official support channels, so if you have a pressing issue, please submit an official support ticket so that our Support Analyst can look into your issue in a timely manner.
We cannot answer financial questions related to your account on a public forum, so those questions should always be submitted through the orange Support button on prohashing.com/about.
For the full list of PROHASHING forums rules, please visit https://prohashing.com/help/prohashing- ... rms-forums.
Profitability API
Hi,
is there currently a working API to get (near) real-time or aggregated over some period of time (15m to 1 hour) profitability information?
The old endpoint (https://prohashing.com/exchange/instantProfitability) has been returning null for a while. The new live stats on the charts page seem interesting, is there a way to connect to the websocket API?
If you want to prevent public access it could be an option to protect the API with a token (JWT) associated to a user account.
Best,
Maznoz
is there currently a working API to get (near) real-time or aggregated over some period of time (15m to 1 hour) profitability information?
The old endpoint (https://prohashing.com/exchange/instantProfitability) has been returning null for a while. The new live stats on the charts page seem interesting, is there a way to connect to the websocket API?
If you want to prevent public access it could be an option to protect the API with a token (JWT) associated to a user account.
Best,
Maznoz
- Steve Sokolowski
- Posts: 4585
- Joined: Wed Aug 27, 2014 3:27 pm
- Location: State College, PA
Re: Profitability API
Thanks for the report. I will fix that as soon as possible. However, there is a better way to get profitability that provides more accurate and up-to-date data.
There is a WAMP endpoint that will give the same live profitability that is visible in the bar chart. It is undocumented, but you can use it until we do document it next week. The WAMP server is wss://prohashing.com:444/ws with username web and password web. Subscribe to channel "profitability_updates." The profitability is the average of the past 250 shares, which right now are being inserted every 5 seconds or so.
The URL will be changed in about two weeks to https://live.prohashing.com:443/ws and we'll update you on that when it happens, but the JSON returned on the channel will be the same. The reason for that change is that some people have port 444 blocked, and it's also why we haven't documented this feature until we get it changed.
Please offer comments and suggestions.
There is a WAMP endpoint that will give the same live profitability that is visible in the bar chart. It is undocumented, but you can use it until we do document it next week. The WAMP server is wss://prohashing.com:444/ws with username web and password web. Subscribe to channel "profitability_updates." The profitability is the average of the past 250 shares, which right now are being inserted every 5 seconds or so.
The URL will be changed in about two weeks to https://live.prohashing.com:443/ws and we'll update you on that when it happens, but the JSON returned on the channel will be the same. The reason for that change is that some people have port 444 blocked, and it's also why we haven't documented this feature until we get it changed.
Please offer comments and suggestions.
Re: Profitability API
Hi Steve,
thanks alot for this information. Using the WAMP endpoint is exactly the solution I was looking for but I couldn't find the username/password. I expect to have a go at using this endpoint over the weekend.
Best,
Maznoz
thanks alot for this information. Using the WAMP endpoint is exactly the solution I was looking for but I couldn't find the username/password. I expect to have a go at using this endpoint over the weekend.
Best,
Maznoz
- Steve Sokolowski
- Posts: 4585
- Joined: Wed Aug 27, 2014 3:27 pm
- Location: State College, PA
Re: Profitability API
Keep in mind that the endpoint's address will change sometime next week when it is formally released.
If you want to make sure you are protected, add an "if" statement to your code to connect to live.prohashing.com:443 when you are disconnected.
If you want to make sure you are protected, add an "if" statement to your code to connect to live.prohashing.com:443 when you are disconnected.
- Steve Sokolowski
- Posts: 4585
- Joined: Wed Aug 27, 2014 3:27 pm
- Location: State College, PA
Re: Profitability API
Hi Maznoz,
Thanks for the report. The REST API has now been fixed and the changes are available immediately.
Thanks again,
-Steve
Thanks for the report. The REST API has now been fixed and the changes are available immediately.
Thanks again,
-Steve
-
- Posts: 7
- Joined: Mon Apr 17, 2017 6:39 pm
Re: Profitability API
the REST api seems to return data about 1 in 10 times.
- Steve Sokolowski
- Posts: 4585
- Joined: Wed Aug 27, 2014 3:27 pm
- Location: State College, PA
Re: Profitability API
We announced last month that we were considering deprecating the REST API in favor of WAMP, which provides much more accurate and instant updates with less bandwidth. The documentation (search for "WAMP") provides more information on that. Nobody said they were using it, so we went ahead.kaptainkrayola wrote:the REST api seems to return data about 1 in 10 times.
Is it possible for you to convert to the new API?
-
- Posts: 7
- Joined: Mon Apr 17, 2017 6:39 pm
Re: Profitability API
I tried to do it server side with node.js and couldn't get it to talk to me. I'm going to implement it client side and see if i can get the JS to work. If it does then there's no need for the REST interface so we might be good anyway. I'll post back here once I have something working.
Thanks!
Thanks!