tdickman / crypto51

https://www.crypto51.app/
GNU General Public License v3.0
77 stars 34 forks source link

Expose block_time in API #38

Closed lukechilds closed 5 years ago

lukechilds commented 5 years ago

Would be great to expose the block_time property via the API.

I'm building an app that would use this propery and it would be great to use this API rather than building my own from NiceHash/WhatToMine.

lukechilds commented 5 years ago

Gives the average block time in seconds:

{
  "last_updated": "2019-04-21T12:29:40.089144",
  "coins": [
    {
      "symbol": "BTC",
      "name": "Bitcoin",
      "minethecoin_link": "https://google.com",
      "algorithm": "SHA-256",
      "market_cap": 93085369595,
      "market_cap_pretty": "$93.09 B",
      "hash_rate": 50158195769302295000,
      "hash_rate_pretty": "50,158 PH/s",
      "rentable_capacity": 37169807006240020,
      "rentable_capacity_pretty": "37 PH/s",
      "nicehash_market_link": "https://www.nicehash.com/marketplace/sha256",
      "attack_hourly_cost": 424011.15847714385,
      "attack_hourly_cost_pretty": "$424,011",
      "network_vs_rentable_ratio": 0.0007410515158320068,
      "rentable_price_btc": 0.0385,
      "rentable_price_units": "PH",
      "rentable_price_usd_hour": "$8.45",
      "block_time": 544
    },
    {
      "symbol": "ETH",
      "name": "Ethereum",
      "minethecoin_link": "https://google.com",
      "algorithm": "Ethash",
      "market_cap": 17747890607,
      "market_cap_pretty": "$17.75 B",
      "hash_rate": 138149834631778,
      "hash_rate_pretty": "138 TH/s",
      "rentable_capacity": 6214896984780,
      "rentable_capacity_pretty": "6 TH/s",
      "nicehash_market_link": "https://www.nicehash.com/marketplace/ethash",
      "attack_hourly_cost": 90812.9541641323,
      "attack_hourly_cost_pretty": "$90,813",
      "network_vs_rentable_ratio": 0.04498664078277814,
      "rentable_price_btc": 2.9938,
      "rentable_price_units": "TH",
      "rentable_price_usd_hour": "$657.35",
      "block_time": 13.4949
    },
    {
      "symbol": "BCH",
      "name": "BitcoinCashABC",
      "minethecoin_link": "https://google.com",
      "algorithm": "SHA-256",
      "market_cap": 5050335943,
      "market_cap_pretty": "$5.05 B",
      "hash_rate": 2695485205436840000,
      "hash_rate_pretty": "2,695 PH/s",
      "rentable_capacity": 37169807006240020,
      "rentable_capacity_pretty": "37 PH/s",
      "nicehash_market_link": "https://www.nicehash.com/marketplace/sha256",
      "attack_hourly_cost": 22786.222412624367,
      "attack_hourly_cost_pretty": "$22,786",
      "network_vs_rentable_ratio": 0.013789653503297987,
      "rentable_price_btc": 0.0385,
      "rentable_price_units": "PH",
      "rentable_price_usd_hour": "$8.45",
      "block_time": 581
    },
    ...
  ]
}