Skip to main content

Gas

Gas provides information on the Filecoin Network usage and transaction fees.

Network Base Fee

Description

The base fee required to send a message to the Filecoin Network.

Request URL

GET: /gas/network_base_fee

Request Parameters

VariableTypeDescriptionExampleDefault
start_hourSTRINGStart hour of the selected period (Optional).2022-07-01T00:00:00ZThe first hour (0 AM) of the most recent date that the API includes.
end_hourSTRINGEnd hour of the selected period (Optional).2022-07-01T00:00:00ZThe first hour (0 AM) of the most recent date that the API includes.
note

The difference between end_hour and start_hour should be smaller than 31 days.

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/gas/network_base_fee?end_hour=2022-07-01T00:00:00Z&start_hour=2022-07-01T00:00:00Z"

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
hour_dateTIMESTAMPTZTrunc hour of height.
base_feeNUMERICThe average set price per unit of gas to be burned (sent to an unrecoverable address) for every message execution. (Unit: Nano FIL)

Response Example

Response
{
"request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#659",
"code": 0,
"message": "success.",
"data": [
{
"hour_date": "2022-07-01T00:00:00Z",
"base_fee": 0.12069467401666667
}
]
}


Network Fee Per Message

Description

The average fee required to send a message to the Filecoin Network based on their method during the last 24 hours.

Request URL

GET: /gas/network_fee_per_message

Request Parameters

VariableTypeDescriptionExampleDefault
start_dateSTRINGStart date of the selected period (Optional).2022-07-01The most recent date that the API includes.
end_dateSTRINGEnd date of the selected period (Optional).2022-07-01The most recent date that the API includes.
note

The difference between end_date and start_date should be smaller than 90 days.

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/gas/network_fee_per_message?end_date=2022-07-01&start_date=2022-07-01"

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.
avg_sealing_cost_per_sectorNUMERICThe average gas cost of sealing a sector in the last 24 hours.
avg_storage_deal_publishing_fee_per_messageNUMERICThe average gas cost of publishing a storage deal in the last 24 hours.
avg_overestimation_fee_per_messageNUMERICThe average gas overestimation cost per message in the last 24 hours.
avg_miner_tip_per_messageNUMERICThe average amount of FIL the miner receives for executing the message in the last 24 hours.
avg_precommit_fee_per_messageNUMERICThe average cost of the PreCommitSector method in the last 24 hours.
avg_provecommit_fee_per_messageNUMERICThe average cost of the ProveCommitSector method in the last 24 hours.
avg_precommit_batch_fee_per_sectorNUMERICThe average cost per sector of the PreCommitSecotorBatch method, including corresponding batch fees in the last 24 hours.
avg_provecommit_batch_fee_per_sectorNUMERICThe average cost per sector of the ProveCommitAggregate method, including corresponding batch fees in the last 24 hours.

Response Example

Response
{
"request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#656",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-07-01T00:00:00Z",
"avg_sector_sealing_cost_per_message": 0.0117253306541251,
"avg_storage_deal_publishing_fee_per_message": 0.0226392708856105,
"avg_overestimation_fee_per_message": 0.2589213231427517,
"avg_miner_tip_per_message": 0.000004940028699413,
"avg_precommit_fee_per_message": 0.00245399760172175,
"avg_provecommit_fee_per_message": 0.00817382179859997,
"avg_precommit_batch_fee_per_message": 0.00446321841000505,
"avg_provecommit_batch_fee_per_message": 0.0129468113973523
}
]
}


Daily Network Fee Breakdown

Description

The network fees on the Filecoin Network during the last 24 hours.

Request URL

GET: /gas/daily_network_fee_breakdown

Request Parameters

VariableTypeDescriptionExampleDefault
start_dateSTRINGStart date of the selected period (Optional).2022-07-01The most recent date that the API includes.
end_dateSTRINGEnd date of the selected period (Optional).2022-07-01The most recent date that the API includes.
note

The difference between end_date and start_date should be smaller than 90 days.

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/gas/daily_network_fee_breakdown?end_date=2022-07-01&start_date=2022-07-01"

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.
base_fee_burnNUMERICThe amount of FIL tokens burned as base fee in the last 24 hours.
overestimation_burnNUMERICThe amount of FIL tokens burned as overestimation burn in the last 24 hours. This is due to the difference between GasLimit and GasUsage, resulting in overestimation burn.
precommit_batch_fee_burnNUMERICThe amount of FIL tokens burned as PreCommit Batch Fee in the last 24 hours.
provecommit_batch_fee_burnNUMERICThe amount of FIL tokens burned as ProveCommit Batch Fee in the last 24 hours.
penalty_fee_burnNUMERICThe amount of FIL tokens burned from the total fee less the sum of base fee, overestimation fee, PreCommitSectorBatch fee, ProveCommit Aggregate fee in the last 24 hours.
miner_tipNUMERICThe amount of FIL the miner receives for executing the message over the last 24 hours.

Response Example

Response
{
"request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#660",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-07-01T00:00:00Z",
"base_fee_burn": 6665.807220776991,
"overestimation_burn": 449.99812880734163,
"precommit_batch_fee_burn": 248.385583929,
"provecommit_batch_fee_burn": 1753.46446468425,
"penalty_fee_burn": 3232.52226487929,
"miner_tip": 7.068296803722808
}
]
}


Daily Gas Usage in Units

Description

The gas usage of different types of messages on Filecoin Network during the last 24 hours.

Request URL

GET: /gas/daily_gas_usage_in_units

Request Parameters

VariableTypeDescriptionExampleDefault
start_dateSTRINGStart date of the selected period (Optional).2022-07-01The most recent date that the API includes.
end_dateSTRINGEnd date of the selected period (Optional).2022-07-01The most recent date that the API includes.
note

The difference between end_date and start_date should be smaller than 90 days.

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/gas/daily_gas_usage_in_units?end_date=2022-07-01&start_date=2022-07-01"

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.
total_gas_usedNUMERICTotal amount of resources (or units of gas) consumed to execute all messages on the blockchain in the last 24 hours.
provecommit_sector_gas_usedNUMERICAmount of gas units by ProveCommitSector in the last 24 hours.
precommit_sector_gas_usedNUMERICAmount of gas units by PreCommitSector in the last 24 hours.
provecommit_aggregate_gas_usedNUMERICAmount of gas units of ProveCommitAggregate in the last 24 hours.
precommit_sector_batch_gas_usedNUMERICAmount of gas units by PreCommitSectorBatch in the last 24 hours.
publish_storage_deals_gas_usedNUMERICAmount of gas units to publish storage deals in the last 24 hours.
submit_windowed_post_gas_usedNUMERICAmount of gas units to submit Proof of Storage (PoSt) in the last 24 hours.

Response Example

Response
{
"request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#661",
"code": 0,
"message": "success.",
"data": [
{
"stat_date": "2022-07-01T00:00:00Z",
"total_gas_used": 47858893957775,
"provecommit_sector_gas_used": 32366049681035,
"precommit_sector_gas_used": 11149043502621,
"provecommit_aggregate_gas_used": 497144277814,
"precommit_sector_batch_gas_used": 128102628109,
"publish_storage_deals_gas_used": 604228387885,
"submit_windowed_post_gas_used": 2197209729799
}
]
}