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
| Variable | Type | Description | Example | Default |
|---|---|---|---|---|
| start_date | STRING | Start date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
| end_date | STRING | End date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
The difference between end_date and start_date should be smaller than 31 days.
Request Examples
Code
- Python
- GO
- NodeJS
- cURL
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)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacescope.io/v2/fvm/contracts_deployed?end_date=2025-01-01&start_date=2025-02-01"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("authorization", "Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.spacescope.io/v2/fvm/contracts_deployed?end_date=2025-01-01&start_date=2025-02-01',
'headers': {
'authorization': 'Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
curl --location --request GET 'https://api.spacescope.io/v2/fvm/contracts_deployed?end_date=2025-01-01&start_date=2025-02-01' \
--header 'authorization: Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
Response Schema
| Variable | Type | Description |
|---|---|---|
| stat_date | DATE | The date the data was recorded. |
| new_contract_count_daily | NUMERIC | New FVM smart contracts added on this day. |
| total_contract_count | NUMERIC | Total number of FVM smart contracts as of this date. |
| total_deployer_address_count | NUMERIC | Total 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
| Variable | Type | Description | Example | Default |
|---|---|---|---|---|
| start_date | STRING | Start date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
| end_date | STRING | End date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
The difference between end_date and start_date should be smaller than 31 days.
Request Examples
Code
- Python
- GO
- NodeJS
- cURL
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)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacescope.io/v2/fvm/contract_interactions?end_date=2025-01-01&start_date=2025-02-01"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("authorization", "Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.spacescope.io/v2/fvm/contract_interactions?end_date=2025-01-01&start_date=2025-02-01',
'headers': {
'authorization': 'Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
curl --location --request GET 'https://api.spacescope.io/v2/fvm/contract_interactions?end_date=2025-01-01&start_date=2025-02-01' \
--header 'authorization: Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
Response Schema
| Variable | Type | Description |
|---|---|---|
| stat_date | DATE | The date the data was recorded. |
| total_internal_txn_count | NUMERIC | The total number of internal transactions on the FVM as of this date. |
| total_external_txn_count | NUMERIC | The total number of external transactions on the FVM as of this date. |
| total_txn_count | NUMERIC | Total number of transactions on the FVM as of this date. |
| internal_txn_count | NUMERIC | The number of internal transactions on the FVM on this date. |
| external_txn_count | NUMERIC | The number of external transactions on the FVM on this date. |
| txn_count | NUMERIC | The 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
| Variable | Type | Description | Example | Default |
|---|---|---|---|---|
| start_date | STRING | Start date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
| end_date | STRING | End date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
The difference between end_date and start_date should be smaller than 31 days.
Request Examples
Code
- Python
- GO
- NodeJS
- cURL
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)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacescope.io/v2/fvm/total_contract_balance?end_date=2025-01-01&start_date=2025-02-01"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("authorization", "Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.spacescope.io/v2/fvm/total_contract_balance?end_date=2025-01-01&start_date=2025-02-01',
'headers': {
'authorization': 'Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
curl --location --request GET 'https://api.spacescope.io/v2/fvm/total_contract_balance?end_date=2025-01-01&start_date=2025-02-01' \
--header 'authorization: Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
Response Schema
| Variable | Type | Description |
|---|---|---|
| stat_date | DATE | The date the data was recorded. |
| total_contract_balance | NUMERIC | The 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
| Variable | Type | Description | Example | Default |
|---|---|---|---|---|
| start_date | STRING | Start date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
| end_date | STRING | End date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
The difference between end_date and start_date should be smaller than 31 days.
Request Examples
Code
- Python
- GO
- NodeJS
- cURL
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)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacescope.io/v2/fvm/active_contract_users?end_date=2025-01-01&start_date=2025-02-01"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("authorization", "Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.spacescope.io/v2/fvm/active_contract_users?end_date=2025-01-01&start_date=2025-02-01',
'headers': {
'authorization': 'Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
curl --location --request GET 'https://api.spacescope.io/v2/fvm/active_contract_users?end_date=2025-01-01&start_date=2025-02-01' \
--header 'authorization: Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
Response Schema
| Variable | Type | Description |
|---|---|---|
| stat_date | DATE | The date the data was recorded. |
| active_user_count_daily | NUMERIC | The number of active users on the FVM on this date. |
| total_active_user_count | NUMERIC | The 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
| Variable | Type | Description | Example | Default |
|---|---|---|---|---|
| start_date | STRING | Start date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
| end_date | STRING | End date of the selected period (Optional). | 2022-07-01 | The most recent date that the API includes. |
The difference between end_date and start_date should be smaller than 31 days.
Request Examples
Code
- Python
- GO
- NodeJS
- cURL
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)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.spacescope.io/v2/fvm/gas_usage?end_date=2025-01-01&start_date=2025-02-01"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("authorization", "Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.spacescope.io/v2/fvm/gas_usage?end_date=2025-01-01&start_date=2025-02-01',
'headers': {
'authorization': 'Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
curl --location --request GET 'https://api.spacescope.io/v2/fvm/gas_usage?end_date=2025-01-01&start_date=2025-02-01' \
--header 'authorization: Bearer ghp_xJtTSVcNRJINLWMmfDangcIFCjqPUNZenoVe'
Response Schema
| Variable | Type | Description |
|---|---|---|
| stat_date | DATE | The date the data was recorded. |
| gas_cost_daily | NUMERIC | The cost of gas used on FVM on this date. |
| total_gas_cost | NUMERIC | The cumulative total amount of gas used on the FVM as of this date. |
| gas_used_daily | NUMERIC | The amount of gas used on FVM-related messages on this date. |
| total_gas_used | NUMERIC | The cumulative total amount of gas used on FVM-related messages on this date. |
| avg_txn_gas_cost_daily | NUMERIC | The 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},
]
}