Skip to main content

Deals

Information on the deal statistics of the storage provider.

Deal Count

Description

The number of storage deals of the storage providers.

Request URL

GET: /storage_provider/deals/deal_count

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/deals/deal_count?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.
total_regular_deal_countBIGINTCumulative count of regular deals of the storage provider, including active, expired, and terminated ones.
total_verified_deal_countBIGINTCumulative count of verified deals of the storage provider, including active, expired, and terminated ones.
daily_new_regular_deal_countBIGINTThe count of regular deals of the storage provider that are newly proposed (may not be activated yet), calculated in the last 24 hours.
daily_new_verified_deal_countBIGINTThe count of verified deals of the storage provider that are newly proposed (may not be activated yet), calculated in the last 24 hours.
active_regular_deal_countBIGINTThe count of active regular deals of the storage provider.
active_verified_deal_countBIGINTThe count of active verified deals of the storage provider.
total_regular_deal_free_countBIGINTCumulative count of regular deals of the storage provider with no storage fee, including active, expired, and terminated ones.
total_verified_deal_free_countBIGINTCumulative count of verified deals of the storage provider with no storage fee, including active, expired, and terminated ones.

Response Example

Response
{
"request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9380",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-10-01T00:00:00Z",
"miner_id": "f0110804",
"total_regular_deal_count": 28,
"total_verified_deal_count": 0,
"total_regular_deal_free_count": 0,
"total_verified_deal_free_count": 0,
"active_regular_deal_count": 1,
"active_verified_deal_count": 0,
"daily_new_regular_deal_count": 0,
"daily_new_verified_deal_count": 0
}
]
}

Client Count

Description

The number of clients to whom the storage provider provides the services.

Request URL

GET: /storage_provider/deals/client_count

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/deals/client_count?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.
total_regular_deal_client_countBIGINTCumulative count of the clients that the storage provider has had at least one regular deal with, including active, expired, and terminated ones.
total_verified_deal_client_countBIGINTCumulative count of the clients that the storage provider has had at least one verified deal with, including active, expired, and terminated ones.
daily_new_regular_deal_client_countBIGINTThe count of the clients that the storage provider had the first regular deal with in the past 24 hours.
daily_new_verified_deal_client_countBIGINTThe count of the clients that the storage provider had the first verified deal with in the past 24 hours.
active_regular_deal_client_countBIGINTThe count of the clients that are having active regular deals with the miner.
active_verified_deal_client_countBIGINTThe count of the clients that are having active verified deals with the miner.

Response Example

Response
{
"request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9381",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-10-01T00:00:00Z",
"miner_id": "f0110804",
"total_regular_deal_client_count": 3,
"total_verified_deal_client_count": 0,
"active_regular_deal_client_count": 1,
"active_verified_deal_client_count": 0,
"daily_new_regular_deal_client_count": 0,
"daily_new_verified_deal_client_count": 0
}
]
}

Deal Size

Description

The byte size of storage deals of the storage providers.

Request URL

GET: /storage_provider/deals/deal_size

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/deals/deal_size?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.
total_regular_deal_bytesNUMERICCumulative deal size for regular deals (in byte) of the storage provider, including active, expired, and terminated ones.
total_verified_deal_bytesNUMERICCumulative deal size for verified deals (in byte) of the storage provider, including active, expired, and terminated ones.
active_regular_deal_bytesNUMERICThe active regular deals (in byte) of the storage provider.
active_verified_deal_bytesNUMERICThe active verified deals (in byte) of the storage provider.
daily_new_regular_deal_bytesNUMERICThe deal size of newly added regular deals (in byte) of the storage provider in the past 24 hours.
daily_new_verified_deal_bytesNUMERICThe deal size of newly added verified deals (in byte) of the storage provider in the past 24 hours.
avg_regular_deal_bytesNUMERICThe average deal size of regular deals (in byte) of the storage provider.
avg_verified_deal_bytesNUMERICThe average deal size of verified deals (in byte) of the storage provider.

Response Example

Response
{
"request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9382",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-10-01T00:00:00Z",
"miner_id": "f0110804",
"total_regular_deal_bytes": 8659246080,
"total_verified_deal_bytes": 0,
"avg_regular_deal_bytes": 309258788.571429,
"avg_verified_deal_bytes": 0,
"active_regular_deal_bytes": 133169152,
"active_verified_deal_bytes": 0,
"daily_new_regular_deal_bytes": 0,
"daily_new_verified_deal_bytes": 0
}
]
}

Deal Collateral

Description

Collateral for storage deals of the storage providers.

Request URL

GET: /storage_provider/deals/deal_collateral

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/deals/deal_collateral?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.
total_regular_deal_provider_collateralNUMERICThe cumulative amount of deal collateral (in FIL) committed to regular deals by the storage provider, inclusive of those that have been released already.
total_verified_deal_provider_collateralNUMERICThe cumulative amount of deal collateral (in FIL) committed to verified deals by the storage provider, inclusive of those that have been released already.
avg_regular_deal_provider_collateralNUMERICThe average amount of deal collateral of the storage provider for regular deals in FIL.
avg_verified_deal_provider_collateralNUMERICThe average amount of deal collateral of the storage provider for verified deals in FIL.

Response Example

Response
{
"request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9383",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-10-01T00:00:00Z",
"miner_id": "f0110804",
"total_regular_deal_provider_collateral": 0.00182563524862799,
"total_verified_deal_provider_collateral": 0,
"avg_regular_deal_provider_collateral": 0.0000652012588795709,
"avg_verified_deal_provider_collateral": 0
}
]
}

Deal Duration

Description

Duration for storage deals of the storage providers.

Request URL

GET: /storage_provider/deals/deal_duration

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/deals/deal_duration?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.
avg_regular_deal_duration_daysNUMERICThe average duration of regular deals in days of the storage provider.
avg_verified_deal_duration_daysNUMERICThe average duration of verified deals in days of the storage provider.

Response Example

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

Deal Revenue

Description

Revenue for storage deals of the storage providers.

Request URL

GET: /storage_provider/deals/deal_revenue

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/deals/deal_revenue?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.
total_regular_deal_revenueNUMERICCumulative storage revenue in FIL of regular deal received by the storage provider from storage clients (excluding block rewards and miner tips).
total_verified_deal_revenueNUMERICCumulative storage revenue in FIL of verified deal received by the storage provider from storage clients (excluding block rewards and miner tips).

Response Example

Response
{
"request_id": "ba4422cc-734f-4d90-84ec-7ad0b3ef01e7#9385",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-10-01T00:00:00Z",
"miner_id": "f0110804",
"total_regular_deal_revenue": 4.58250000000001e-9,
"total_verified_deal_revenue": 0
}
]
}