SiaMining


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:

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: 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
            }
        ]
    }
]

Address: Recent Payouts

GET https://siamining.com/api/v1/addresses/:address/payouts
Sample Response
[
    {
        "time": 1470414317,
        "amount": "2062.912422526560652140000000",
        "txid": "4ab9f415f7a67cfc9fa3c0b93867f458fb826fa690e3b9b90bf69949f03c3222"
    }
]

Address

This endpoint makes it possible to fetch the same information provided by the three endpoints above with a single call.

GET https://siamining.com/api/v1/addresses/:address
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
        }
    ],
    "workers": [
        {
            "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
                }
            ]
        }
    ],
    "payouts": [
        {
            "time": 1470414317,
            "amount": "2062.912422526560652140000000",
            "txid": "4ab9f415f7a67cfc9fa3c0b93867f458fb826fa690e3b9b90bf69949f03c3222"
        }
    ]
}