Skip to main content

Rewards

Information on Filecoin block rewards received by the storage provider.

Request URL

GET: /storage_provider/rewards

Request Parameters

VariableTypeDescriptionExampleDefault
state_dateSTRINGSelected date (Optional).2022-10-01If no state_date is input, returns data for the most recent date available.
miner_idSTRINGSelected ID of the miner (Optional).f0110804Returns data for all miners if no miner_id is input.

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/storage_provider/rewards?state_date=2022-10-01&miner_id=f0110804"

payload={}
headers = {
  'authorization': 'Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

Response Schema

VariableTypeDescription
stat_dateDATERefers to the date the data was recorded.
miner_idSTRINGUnique ID of the storage provider.
blocks_minedBIGINTTotal number of blocks mined by the storage provider.
win_countBIGINTTotal number of reward units won by the storage provider.
rewardsNUMERICTotal block rewards in FIL received by the storage provider.

Response Example

Response
{
    "request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9376",
    "code": 0,
    "message": "success.",
    "data": [
        {
            "stat_date": "2022-10-01T00:00:00Z",
            "miner_id": "f0110804",
            "blocks_mined": 0,
            "win_count": 0,
            "rewards": 0
        }
    ]
}