Pages:
Author

Topic: Whattomine - profitability website with basic json. - page 12. (Read 94774 times)

newbie
Activity: 49
Merit: 0

@whittle
Not sure if you are saying or asking, but yes the links in the api docs are not working. Still not working.
http://api.arabianchain.org/v1/dbix/main for example

https://api.arabianchain.org/v1/dbix/main/network - this works
newbie
Activity: 7
Merit: 0
Those people are stupid and doing things wrong Grin
Profit calc is for checking your rewards, not predicting future, because it's impossible.
Let's say I was mining with 50% of nethash for the last 24 hours and then went to WTM to check my rewards, WTM shows 1.5 times lower values. Encouraging, but totally incorrect.

From the other side, I would like to mine with my spare rigs which power amounts to +50% of nethash and WTM calculations are right for me Wink
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
Vast majority of people is using it as a way to predict the future. (attempt at least)
Without this default, every calculation for a coin you are not already mining would be bogus.
Those people are stupid and doing things wrong Grin
Profit calc is for checking your rewards, not predicting future, because it's impossible.
Let's say I was mining with 50% of nethash for the last 24 hours and then went to WTM to check my rewards, WTM shows 1.5 times lower values. Encouraging, but totally incorrect.
There should be at least an option to disable that.
How do you even calculate average nethash? Based on average diff you are calculating using questionable mathematically-unverified time-weighted method? Roll Eyes
Nethash should be based on simple average diff (or sum of avg hashrates of ALL pools and somehow solo miners).
newbie
Activity: 7
Merit: 0
Mikanoshi, fredeq, thanks!

Didn't read above, because just found this thread and it's huge.

Have a nice day!
legendary
Activity: 1536
Merit: 1005
I'm looking on DGB-Qubit (DGB) profitability calculator.

When I put 1000000.0 Mh/s (1Th/s), it shows daily reward as 0.086373 BTC ($710.65).
But when I put x10 = 10000000.0 Mh/s (10Th/s), it shows daily reward as 0.741514 BTC ($6,100.95).

I expect x10 power gives x10 reward, but it isn't the case.

Could someone explain those calculations?

Thank you and appreciate your feedback!

Same question as mikanoshi raised.
WTM treats the calculation as new hashrate added to the network.

@Mikanoshi
Vast majority of people is using it as a way to predict the future. (attempt at least)
Without this default, every calculation for a coin you are not already mining would be bogus.
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
Could someone explain those calculations?
Can you read just a couple of posts above yours? Lips sealed
I also agree it should be linear, adding your hashrate to nethash is a try to predict future, it's not what profit calcs are about.
newbie
Activity: 7
Merit: 0
I'm looking on profitability calculator.

When I put 1000000.0 Mh/s (1Th/s), it shows daily reward as 0.086373 BTC ($710.65).
But when I put x10 = 10000000.0 Mh/s (10Th/s), it shows daily reward as 0.741514 BTC ($6,100.95).

I expect x10 power gives x10 reward, but it isn't the case.

Could someone explain those calculations?

Thank you and appreciate your feedback!
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
Imagine a low nethash coin of 100Mh/s, where 1Mh/s could be produced by just one card.
You have 100 cards and throw all onto that coin.

Nethash has just doubled to 200Mh/s, diff raised. You now have 50% of nethash, but before you did that it was a 100% of nethash.
No, all profit calcs use history to calculate rewards. Your hashrate is a part of the nethash which is immutable, because it already happened.
You cannot have hashrate more than the entire network had for the past 24h (if you calc for 24h), because then nethash would've been higher.
legendary
Activity: 1536
Merit: 1005
Rewards increase differently from hashrate increase which is best observed on small nethash coins.
How do you calculate that? And why it should be different?

Imagine a low nethash coin of 100Mh/s, where 1Mh/s could be produced by just one card.
You have 100 cards and throw all onto that coin.

Nethash has just doubled to 200Mh/s, diff raised. You now have 50% of nethash, but before you did that it was a 100% of nethash.
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
Rewards increase differently from hashrate increase which is best observed on small nethash coins.
How do you calculate that? And why it should be different?
legendary
Activity: 1536
Merit: 1005
Hello, super noob SQL import question. I'd like to import the JSON output in to SQL, but I am struggling with the structure. I can select "coins", but none of the other headers seems available. Anyone done this that might have tips or pointers?  

Edit to be a bit more clear.

I am struggling with the structure of the JSON output. Coins is declared as the top level, but then it gets tough to find the fields and headers so I can properly import them in to columns. Coinwarz is easy to import, but your data and site is MUCH better Smiley Is this just the state of things or am I not referencing the JSON correctly?

As a reference https://www.coinwarz.com/content/images/profitability-api-output.png

Hey, this is based on ruby where you can have any json structure you want, cause its getting parsed as a simple nested hash with key => value pairs.
Unfortunately its not possible to change the json structure now, hope you are good with your workaround Smiley

@Mikanoshi
All json calls without params will use the same defaults as seen in the UI.
For coins and asic you can check those by pressing defaults and for single calcs - reset.

Rewards increase differently from hashrate increase which is best observed on small nethash coins.
"BTC", "LTC", "SC", "BCH" will use current diff for single calcs and the rest uses 24h average.
member
Activity: 504
Merit: 71
Just Getting Started...
Well it took a while, but I now have what I wanted working. Hourly (so it goes easy on the WTM website) updates to my phone for SHA-256 profitability. I stood up a small MS SQL VM at home, use it pull down JSON with PowerShell and then use SQL to manipulate it and send me the update. Not pretty, but it gets the job done as all I wanted to know is what comes up as more profitable than BTC Smiley I can add more, but I think it's all I need for now.

https://imgur.com/a/dvoy2FT
member
Activity: 504
Merit: 71
Just Getting Started...
It's just how results are presented. At least there is a coin name Smiley Most services just return an array of objects (like coinwarz), because there are coins that have same names or same tickers, so you cannot use that as an unique field. You have to iterate through all the objects of an array (or in this case another object), no idea how it's done in PS. Example in PHP:
Code:
$wtms = json_decode($api_response);
if ($wtms !== NULL)
foreach ($wtms->coins as $coin_name => $wtm)
if ($coin_name == 'Cannabiscoin') {
$reward = 86400 * $wtm->block_reward24 * 1000000 / $wtm->difficulty24 / 4294967296;
break;
}

Thanks for the idea, yeah for now I am going to narrow my scope in filter like you said. Maybe in future updates the JSON will be changed up a bit, but no big deal. Still an awesome resource.
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
It's just how results are presented. At least there is a coin name Smiley Most services just return an array of objects (like coinwarz), because there are coins that have same names or same tickers, so you cannot use that as an unique field. You have to iterate through all the objects of an array (or in this case another object), no idea how it's done in PS. Example in PHP:
Code:
$wtms = json_decode($api_response);
if ($wtms !== NULL)
foreach ($wtms->coins as $coin_name => $wtm)
if ($coin_name == 'Cannabiscoin') {
$reward = 86400 * $wtm->block_reward24 * 1000000 / $wtm->difficulty24 / 4294967296;
break;
}
member
Activity: 504
Merit: 71
Just Getting Started...
How do you import to SQL? What's the problem in iterating through JSON and adding fields that you need? Unless you are not writing a code yourself and using some tool that does it for you.

P.S. I also have some questions then Cheesy
In global JSON https://whattomine.com/coins.json, what hashrate is used for estimated_rewards/estimated_rewards24 (I assume these are based on current/24 diff)?
And also why changing hr param in API call for particular coin is not changing estimated_rewards accordingly?
E.g. for 10 MH/s it's 636 coins, but for 1000 MH/s it's 62102? 2.35% seems to be a huge rounding error.
I hope estimated_rewards there is based on 24h average diff? Inconsistent field names Smiley

P.P.S. ?eth=true&factor[eth_hr]=50 works with global API, default hr must be from some presets... At least write an API docs with all the available params Cheesy or using it is trial and error.

At the moment I am using PowerShell to grab the JSON, works perfect. Where I run in to trouble is the SQL query to import the JSON file. Coins is the first property name, good,  but there is no Coin Name property (the coin names are just listed), so the query blows up. Like I said I am a noob at this and possibly I need to manipulate the JSON and add the coin name property, but I am not sure how.

Below is an example of the JSON, see how the coin name is not under a property?

Code:
{
  "coins": {
    "Cannabiscoin": {
      "id": 188,
      "tag": "CANN",
      "algorithm": "X11",
      "block_time": "44.0",
      "block_reward": 70,
      "block_reward24": 70,
      "last_block": 3030623,
      "difficulty": 159943.13453935,
      "difficulty24": 160679.297308647,
      "nethash": 15612512092414,
      "exchange_rate": 0.00000265,
      "exchange_rate24": 0.00000240881924198251,
      "exchange_rate_vol": 1.78501334098998,
      "exchange_rate_curr": "BTC",
      "market_cap": "$2,845,033.74",
      "estimated_rewards": "298.68986",
      "estimated_rewards24": "297.32436",
      "btc_revenue": "0.00079153",
      "btc_revenue24": "0.00078791",
      "profitability": 115,
      "profitability24": 114,
      "lagging": false,
      "timestamp": 1531882963
    }
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
How do you import to SQL? What's the problem in iterating through JSON and adding fields that you need? Unless you are not writing a code yourself and using some tool that does it for you.

P.S. I also have some questions then Cheesy
In global JSON https://whattomine.com/coins.json, what hashrate is used for estimated_rewards/estimated_rewards24 (I assume these are based on current/24 diff)?
And also why changing hr param in API call for particular coin is not changing estimated_rewards accordingly?
E.g. for 10 MH/s it's 636 coins, but for 1000 MH/s it's 62102? 2.35% seems to be a huge rounding error.
I hope estimated_rewards there is based on 24h average diff? Inconsistent field names Smiley

P.P.S. ?eth=true&factor[eth_hr]=50 works with global API, default hr must be from some presets... At least write an API docs with all the available params Cheesy or using it is trial and error.
member
Activity: 504
Merit: 71
Just Getting Started...
Hello, super noob SQL import question. I'd like to import the JSON output in to SQL, but I am struggling with the structure. I can select "coins", but none of the other headers seems available. Anyone done this that might have tips or pointers?  

Edit to be a bit more clear.

I am struggling with the structure of the JSON output. Coins is declared as the top level, but then it gets tough to find the fields and headers so I can properly import them in to columns. Coinwarz is easy to import, but your data and site is MUCH better Smiley Is this just the state of things or am I not referencing the JSON correctly?

As a reference https://www.coinwarz.com/content/images/profitability-api-output.png
legendary
Activity: 1536
Merit: 1005
It should mirror the difficulty and slowly go down with block reward.
estimated_rewards is just using current block reward instead of 24h average, isn't it?)

By default yes. That would explain the spikes.
Need to rethink which coins need to stay on current and which ones to switch to 24h average.
Will tweak this for sure.
sr. member
Activity: 798
Merit: 252
Insane In The Blockchain ⚠
Spikes appear all the time, every single mini jump on that chart is wrong Smiley
Average diff does not spike like that, average block reward changes smoothly, so mining reward should too.
This is how chart looks for coin with constant block reward (GINcoin):
 

And this is Loki:


It should mirror the difficulty and slowly go down with block reward.
estimated_rewards is just using current block reward instead of 24h average, isn't it?)
legendary
Activity: 1536
Merit: 1005
Chart is a mining reward in Aeon coins per day, based on estimated_rewards from API.
2.5% is a lot if only average values are used, especially when it just goes back to normal 15 minutes later.

We could check the data when the next spike appears, but please put the timestamp in utc onto the chart.
Pages:
Jump to: