API
We provide a simple but extensive API that gives you easy access to information about your miners, the pool, and the Sia network in general.
The API is REST-like; all data is served as JSON. The following conventions have been adopted:
- All hash rates are expressed in hashes per second.
- All intervals are expressed in seconds.
- All times are expressed as Unix times.
Only the fields that are present in the sample responses below are officially supported. Actual responses may contain additional fields, but such fields are not guaranteed to be always present, and may be removed at any time.
Endpoints
Sia Network Information
GET https://siamining.com/api/v1/network
Sample Response
{ "block_height": 63530, "block_reward": 236469, "hash_rate": 14122541938687, "difficulty": "8080167148533014", "next_difficulty": 8.8479801164007e+15, "blocks_to_retarget": 470, "time_to_retarget": 268909 }
Market Prices
GET https://siamining.com/api/v1/market
Sample Response
{ "btc_price": 0.00000096, "usd_price": 0.000551 }
Pool Information
GET https://siamining.com/api/v1/pool
Sample Response
{ "hash_rate": 5613303033583, "active_addresses": 988, "hashes": 1.1229951969152e+19, "blocks_found": 1650, "pps_fee": 0.03, "hash_price": 2.8387399144539e-11 }
Address: Summary
GET https://siamining.com/api/v1/addresses/:address/summary
Sample Response
{ "address": "00091d9619f1e697ddf80e751b68baffc444e7b59eeb54e131f136711d84aebf3bc6e0b820af", "hashes": 1.9618752941261e+14, "valid_shares": 11693688, "stale_shares": 13912, "invalid_shares": 107348, "blocks_found": 1, "balance": "189.416961314711681210000000", "paid": "6214.094623445710594630000000", "last_share_time": 1470419569, "intervals": [ { "interval": 300, "hash_rate": 1309965025, "valid_shares": 23424, "stale_shares": 0, "invalid_shares": 0, "rewards": 11.155950011433 } ] }
Address: Hashrate History
This endpoint returns timestamp-hashrate pairs.
GET https://siamining.com/api/v1/addresses/:address/hashrate-history
Sample Response
[ [ 1510498802, 40447843000 ], [ 1510499700, 44483590000 ], [ 1510500601, 45280275000 ] ]
Address: Recent Payouts
GET https://siamining.com/api/v1/addresses/:address/payouts
Sample Response
[ { "time": 1470414317, "amount": "2062.912422526560652140000000", "txid": "4ab9f415f7a67cfc9fa3c0b93867f458fb826fa690e3b9b90bf69949f03c3222" } ]
Address: Workers
GET https://siamining.com/api/v1/addresses/:address/workers
Sample Response
[ { "name": "my_worker", "last_share_time": 1470419569, "intervals": [ { "interval": 300, "hash_rate": 901943132, "valid_shares": 16128, "stale_shares": 0, "invalid_shares": 0, "rewards": 7.6811459095115 } ] } ]