Skip to main content

Token Balance

Information on token balance of the storage provider.

Request URL

GET: /storage_provider/token_balance

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/token_balance?state_date=2022-10-01&miner_id=f0110804"

payload={}
headers = {
'authorization': 'Bearer <--Please replace your API key here-->'
}

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.
balanceNUMERICThe storage provider’s latest actor balance (including initial pledge, locked funds, precommit deposits, deal collateral) in FIL.
initial_pledgeNUMERICThe storage provider’s amount of FIL locked as initial pledge.
locked_fundsNUMERICThe storage provider’s amount of FIL locked due to the vesting schedule (when a storage provider receives block rewards, the tokens are locked and will be unlocked linearly over some future epochs. The unvested portion is considered as locked funds).
pre_commit_depositsNUMERICThe storage provider’s amount of FIL locked due to it being used as a PreCommit deposit.
provider_collateralNUMERICThe storage provider’s amount of FIL the provider has pledged as collateral for the deals.
fee_debtNUMERICAbsolute value of debt this storage provider owes from unpaid fees in FIL.

Response Example

Response
{
"request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9377",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-10-01T00:00:00Z",
"miner_id": "f0110804",
"balance": 130.570992419809,
"initial_pledge": 130.570992419809,
"locked_funds": 0,
"pre_commit_deposits": 0,
"provider_collateral": 0.117471202123958,
"fee_debt": 0
}
]
}