Skip to main content

Contracts

Provides information about smart contracts on the Filecoin Virtual Machine.

Contracts Deployed

Description

Daily counts of new contracts deployed on the FVM.

Request URL

GET: v2/fvm/contracts_deployed

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.

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

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/fvm/contracts_deployed?end_date=2025-01-01&start_date=2025-02-01"

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

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

print(response.text)

Response Schema

VariableTypeDescription
stat_dateDATEThe date the data was recorded.
new_contract_count_dailyNUMERICNew FVM smart contracts added on this day.
total_contract_countNUMERICTotal number of FVM smart contracts as of this date.
total_deployer_address_countNUMERICTotal number of deployer addresses as of this date.

Response Example

Response
{
   "request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#666",
   "code": 0,
   "message": "success.",
   "data": [
    {'stat_date': '2026-01-19T00:00:00Z',
    'new_contract_count_daily': 8,
    'total_contract_count': 5741,
    'total_deployer_address_count': 2678}
   ]
}

Contract Interactions

Description

Daily counts of interactions with FVM smart contracts, including both internal and external transactions.

Request URL

GET: v2/fvm/contract_interactions

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.

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

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/fvm/contract_interactions?end_date=2025-01-01&start_date=2025-02-01"

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

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

print(response.text)

Response Schema

VariableTypeDescription
stat_dateDATEThe date the data was recorded.
total_internal_txn_countNUMERICThe total number of internal transactions on the FVM as of this date.
total_external_txn_countNUMERICThe total number of external transactions on the FVM as of this date.
total_txn_countNUMERICTotal number of transactions on the FVM as of this date.
internal_txn_countNUMERICThe number of internal transactions on the FVM on this date.
external_txn_countNUMERICThe number of external transactions on the FVM on this date.
txn_countNUMERICThe number of transactions on the FVM on this date.

Response Example

Response
{
   "request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#666",
   "code": 0,
   "message": "success.",
   "data": [
    {'stat_date': '2026-01-29T00:00:00Z',
      'total_internal_txn_count': 0,
      'total_external_txn_count': 7582812,
      'total_txn_count': 7582812,
      'internal_txn_count': 0,
      'external_txn_count': 18269,
      'txn_count': 18269}
   ]
}

Total Contract Balance

Description

The total balance of all smart contracts on the FVM.

Request URL

GET: v2/fvm/total_contract_balance

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.

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

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/fvm/total_contract_balance?end_date=2025-01-01&start_date=2025-02-01"

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

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

print(response.text)

Response Schema

VariableTypeDescription
stat_dateDATEThe date the data was recorded.
total_contract_balanceNUMERICThe total balance of all smart contracts on the FVM as of this date.

Response Example

Response
{
   "request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#666",
   "code": 0,
   "message": "success.",
   "data": [
    {'stat_date': '2026-01-18T00:00:00Z',
      'total_contract_balance': 9682034.37666366},
    {'stat_date': '2026-01-19T00:00:00Z',
      'total_contract_balance': 9800069.3379708},
    {'stat_date': '2026-01-20T00:00:00Z',
      'total_contract_balance': 9883542.64048157},
]
}

Active Contract Users

Description

Daily counts of active users on the FVM.

Request URL

GET: v2/fvm/active_contract_users

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.

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

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/fvm/active_contract_users?end_date=2025-01-01&start_date=2025-02-01"

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

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

print(response.text)

Response Schema

VariableTypeDescription
stat_dateDATEThe date the data was recorded.
active_user_count_dailyNUMERICThe number of active users on the FVM on this date.
total_active_user_countNUMERICThe cumulative number of active users ever seen on the FVM.

Response Example

Response
{
   "request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#666",
   "code": 0,
   "message": "success.",
   "data": [
 {'stat_date': '2026-01-24T00:00:00Z',
  'active_user_count_daily': 92,
  'total_active_user_count': 792932},
 {'stat_date': '2026-01-25T00:00:00Z',
  'active_user_count_daily': 148,
  'total_active_user_count': 792943}
]
}

Gas Usage

Description

Information about daily gas usage on the Filecoin Virtual Machine.

Request URL

GET: v2/fvm/gas_usage

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.

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

Request Examples

Code
import requests

url = "https://api.spacescope.io/v2/fvm/gas_usage?end_date=2025-01-01&start_date=2025-02-01"

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

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

print(response.text)

Response Schema

VariableTypeDescription
stat_dateDATEThe date the data was recorded.
gas_cost_dailyNUMERICThe cost of gas used on FVM on this date.
total_gas_costNUMERICThe cumulative total amount of gas used on the FVM as of this date.
gas_used_dailyNUMERICThe amount of gas used on FVM-related messages on this date.
total_gas_usedNUMERICThe cumulative total amount of gas used on FVM-related messages on this date.
avg_txn_gas_cost_dailyNUMERICThe average cost of gas burn for FVM-related messages on this date.

Response Example

Response
{
   "request_id": "4e14a4aa-2368-4029-a660-5a883c0c29f1#666",
   "code": 0,
   "message": "success.",
   "data": [
 {'stat_date': '2026-01-28T00:00:00Z',
  'gas_cost_daily': 0.00035320073201896,
  'total_gas_cost': 16116.0676800125,
  'gas_used_daily': 3527497534513,
  'total_gas_used': 1218100831492570,
  'avg_txn_gas_cost_daily': 1.4379380858159e-08},
]
}