Bitcoin Forum
June 22, 2021, 09:11:31 AM *
News: Latest Bitcoin Core release: 0.21.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 [50] 51 52 53 54 55 56 57 58 59 60 »
  Print  
Author Topic: Whattomine - profitability website with basic json.  (Read 94002 times)
Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 16, 2018, 02:20:41 PM
Last edit: July 16, 2018, 02:35:42 PM by Mikanoshi
 #981

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?)

1624353091
Hero Member
*
Offline Offline

Posts: 1624353091

View Profile Personal Message (Offline)

Ignore
1624353091
Reply with quote  #2

1624353091
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1624353091
Hero Member
*
Offline Offline

Posts: 1624353091

View Profile Personal Message (Offline)

Ignore
1624353091
Reply with quote  #2

1624353091
Report to moderator
fredeq
Legendary
*
Offline Offline

Activity: 1520
Merit: 1005


View Profile WWW
July 16, 2018, 04:18:29 PM
 #982

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.

https://whattomine.com - Check what to mine Smiley
Raymond_B
Member
**
Offline Offline

Activity: 504
Merit: 69

Just Getting Started...


View Profile WWW
July 17, 2018, 06:48:29 AM
Last edit: July 17, 2018, 11:43:12 PM by Raymond_B
 #983

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

Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 18, 2018, 01:58:26 AM
Last edit: July 18, 2018, 02:22:40 AM by Mikanoshi
 #984

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.

Raymond_B
Member
**
Offline Offline

Activity: 504
Merit: 69

Just Getting Started...


View Profile WWW
July 18, 2018, 03:06:50 AM
 #985

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
    }

Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 18, 2018, 12:48:37 PM
Last edit: July 18, 2018, 02:35:01 PM by Mikanoshi
 #986

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;
}

Raymond_B
Member
**
Offline Offline

Activity: 504
Merit: 69

Just Getting Started...


View Profile WWW
July 18, 2018, 03:52:04 PM
 #987

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.

Raymond_B
Member
**
Offline Offline

Activity: 504
Merit: 69

Just Getting Started...


View Profile WWW
July 18, 2018, 11:12:22 PM
 #988

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

fredeq
Legendary
*
Offline Offline

Activity: 1520
Merit: 1005


View Profile WWW
July 24, 2018, 01:09:50 PM
 #989

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.

https://whattomine.com - Check what to mine Smiley
Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 24, 2018, 01:52:40 PM
 #990

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?

fredeq
Legendary
*
Offline Offline

Activity: 1520
Merit: 1005


View Profile WWW
July 24, 2018, 02:04:08 PM
 #991

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.

https://whattomine.com - Check what to mine Smiley
Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 24, 2018, 02:10:33 PM
 #992

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.

wh3n14mbo
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile WWW
July 25, 2018, 09:22:25 PM
Last edit: July 25, 2018, 09:51:25 PM by wh3n14mbo
 #993

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!
Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 25, 2018, 09:35:09 PM
 #994

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.

fredeq
Legendary
*
Offline Offline

Activity: 1520
Merit: 1005


View Profile WWW
July 25, 2018, 09:39:57 PM
 #995

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.

https://whattomine.com - Check what to mine Smiley
wh3n14mbo
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile WWW
July 25, 2018, 09:50:07 PM
 #996

Mikanoshi, fredeq, thanks!

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

Have a nice day!
Mikanoshi
Sr. Member
****
Offline Offline

Activity: 756
Merit: 252


Insane In The Blockchain ⚠


View Profile WWW
July 25, 2018, 11:14:16 PM
Last edit: July 25, 2018, 11:31:46 PM by Mikanoshi
 #997

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).

wh3n14mbo
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile WWW
July 25, 2018, 11:30:56 PM
 #998

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
whittle
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
August 02, 2018, 08:24:48 PM
 #999


@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
akroma_io
Jr. Member
*
Offline Offline

Activity: 32
Merit: 2


View Profile
August 10, 2018, 10:23:52 PM
 #1000

I believe this is the place to request a coin to be added. Please let me know if I am wrong or there is other information required:


Thanks,
Akroma Team.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 [50] 51 52 53 54 55 56 57 58 59 60 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!