For the complete documentation index, see llms.txt. This page is also available as Markdown.

Filecoin (FIL)

GetBlock provides fast and reliable access to Filecoin nodes via JSON-RPC API. Connect to the Filecoin network without running your own infrastructure.

Filecoin is a decentralized storage network whose blockchain coordinates a market for verifiable data storage, secured by Proof-of-Replication and Proof-of-Spacetime. The native token FIL pays for storage and gas fees; its base unit is the attoFIL (1 FIL = 10^18 attoFIL). Blocks are produced in ~30-second epochs, and the chain state is organized around tipsets and content-addressed CIDs.

GetBlock exposes Filecoin through two JSON-RPC surfaces:

  • The native Lotus API (Filecoin.* methods) for chain, state, wallet, message pool, and gas operations.

  • The FEVM API (eth_* methods) for the Filecoin EVM, an EVM-compatible runtime with chain ID 314.

Interfaces

Interface
Methods
Use it for

Native (Lotus)

Filecoin.<Method>

Filecoin-native data: tipsets, actors, miners, messages, wallet balances

FEVM (EVM)

eth_*

EVM smart contracts on the Filecoin EVM (Solidity, ethers.js, viem)

Both surfaces are served over JSON-RPC 2.0 at the same endpoint; the method name selects the surface. Native methods use Filecoin address forms (f0/f1/f2/f3/f4) and CIDs; the FEVM layer uses 0x addresses and standard Ethereum types. An f4 address and its 0x form refer to the same account across the two surfaces.

Key Features

  • Decentralized Storage: A market for verifiable storage secured by Proof-of-Replication and Proof-of-Spacetime

  • Native Lotus API: Filecoin.* methods for tipsets, actors, miners, messages, and wallet balances

  • FEVM (EVM Compatibility): Deploy Solidity contracts on the Filecoin EVM at chain ID 314 with standard eth_* methods

  • Tipset Chain Structure: Blocks are grouped into tipsets per epoch; state is read against a tipset key

  • Content Addressing: Chain objects are identified by CIDs, integrating with IPFS content addressing

  • FIL Native Token: FIL pays for storage and gas; the base unit is attoFIL (1 FIL = 10^18 attoFIL)

  • Actor Model: Accounts, miners, and system components are actors with code and state

GetBlock's Filecoin API reference documentation is provided for informational purposes and developer experience. The canonical specifications are maintained by the Filecoin project: the Lotus JSON-RPC reference at docs.filecoin.io, and the Ethereum JSON-RPC API for the FEVM. Amounts are in attoFIL.

Network Information

Property
Value

Network Name

Filecoin Mainnet

Native Currency

FIL (1 FIL = 10^18 attoFIL)

FEVM Chain ID

314 (0x13a)

Epoch (Block Time)

~30 seconds

Consensus

Expected Consensus (PoRep and PoSt)

Native API

Lotus JSON-RPC (Filecoin.<Method>)

EVM Layer

FEVM (EVM-compatible, eth_*)

Address Formats

Filecoin (f0/f1/f2/f3/f4) and 0x (FEVM)

Block Explorer

Testnet

Calibration (FEVM Chain ID 314159)

Base URL

Both the native and FEVM methods are called by sending a POST request with a JSON-RPC 2.0 body to the endpoint. Replace <ACCESS-TOKEN> with the access token from the GetBlock dashboard.

Supported Networks

Network
Native (Lotus)
FEVM (eth_)
Websocket
Frankfurt, Germany

Mainnet

Calibration Testnet (FEVM Chain ID 314159) is the test environment for staging before mainnet. Confirm testnet endpoint availability from the GetBlock dashboard.

Quickstart

In this section, you will learn how to make your first call with either:

  • Axios (JavaScript / Node.js)

  • Python (Requests library)

Before you begin, you must have already installed npm or yarn on your local machine (for the Axios example) or Python and pip (for the Python example).

1

Setup project

Create and initialize a new project:

2

Install Axios

3

Create file

Create a new file named index.js. This is where you will make your first call.

4

Set ES module type

Set the ES module "type": "module" in your package.json.

5

Add code

Add the following code to index.js:

Replace <ACCESS-TOKEN> with your actual GetBlock access token.

6

Run the script

Expected output:

The result field is the Kaia Mainnet chain ID (0x2019 = 8217 in decimal). This confirms you are connected to the correct network.

1

Setup the project directory

2

Create and activate a virtual environment

3

Install requests

4

Create script

Create a file called main.py with the following content:

Replace <ACCESS-TOKEN> with your actual access token from GetBlock.

5

Run the script

APIs

Support

For technical support and questions:

See Also

Last updated

Was this helpful?