Flow

Flow is a Proof-of-Stake Layer-1 blockchain designed for consumer applications, games, and digital assets, with a multi-role node architecture that separates collection, consensus, execution, and verification for scale without sharding. Smart contracts are written in Cadence, a resource-oriented language in which assets are first-class values that cannot be copied or lost. The native token is FLOW (1 FLOW = 100,000,000 units), and accounts are identified by 16-hex-character addresses. GetBlock exposes Flow through the Access API over REST (HTTP + JSON): a path-addressed interface where reads use GET and script execution and transaction submission use POST.

Key Features

  • Consumer-Scale L1: Multi-role architecture (collection / consensus / execution / verification) scales without sharding
  • Cadence Contracts: Resource-oriented smart contracts where digital assets are first-class, safe-by-construction values
  • REST Access API: The Access node exposes a path-addressed REST API — no JSON-RPC envelope
  • Base64 Payloads: Cadence scripts, arguments, and results are carried as base64-encoded JSON-Cadence
  • Block-Pinned Reads: Accounts, scripts, and blocks accept a height or the keywords final / sealed for historical state
  • Sealed Finality: A transaction is final once its block is Sealed

TECHNICAL DISCLAIMER: AUTHORITATIVE REST API SPECIFICATION.

GetBlock's API reference documentation is provided exclusively for informational purposes and to optimize the developer experience. The canonical specification is the Flow Access HTTP API, documented at developers.flow.com. This package covers the Cadence Access API; Flow also offers a separate EVM-equivalent JSON-RPC interface (Flow EVM), which is documented separately.

Network Information

PropertyValue
Network NameFlow Mainnet
Chain IDflow-mainnet
Native CurrencyFLOW (1 FLOW = 100,000,000 units)
ConsensusProof-of-Stake (multi-role)
Contract LanguageCadence
Address Format16 hex characters (e.g. 0x1654653399040a61)
FinalitySealed blocks

Base URL

https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/
https://shared.us-east-1.getblock.io/<ACCESS-TOKEN>/
https://shared.ap-southeast-1.getblock.io/<ACCESS-TOKEN>/

Making Requests

The Flow Access API is REST, not JSON-RPC: the resource is chosen by the URL path appended to your GetBlock endpoint. Reads are GET; executing a Cadence script and submitting a transaction are POST with a JSON body. Cadence code, arguments, and results travel as base64-encoded JSON-Cadence. Many reads accept final or sealed in place of a block height.

bashexport FLOW_REST=https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/

# Latest sealed block
curl "${FLOW_REST}v1/blocks?height=sealed"

# Account balance, keys, and contracts
curl "${FLOW_REST}v1/accounts/0x1654653399040a61?expand=keys,contracts"

Quickstart

  1. Setup project

    bashmkdir flow-api-quickstart && cd flow-api-quickstart && npm init --yes
  2. Install dependency

    bashnpm install axios
  3. Add code

    index.js

    javascriptconst axios = require('axios');
    
    const url = 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/';
    
    axios.get(`${url}v1/blocks`, {
      params: { height: 'sealed' },
      headers: { 'Content-Type': 'application/json' }
    })
    .then(response => {
      console.log('Latest sealed block:', response.data[0].header.height);
    })
    .catch(error => console.error(error));
  4. Run the script

    bashnode index.js
  5. Response

    bashLatest sealed block: 88226300
  1. Setup project

    bashmkdir flow-api-quickstart && cd flow-api-quickstart
    python -m venv venv && source venv/bin/activate
  2. Install dependency

    bashpip install requests
  3. Add code

    main.py

    pythonimport requests
    
    url = "https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/"
    
    params = {
        "height": "sealed"
    }
    
    headers = {
        'Content-Type': 'application/json'
    }
    
    response = requests.get(url + "v1/blocks", headers=headers, params=params)
    print(response.text)
  4. Run the script

    bashpython main.py

Available REST Endpoints

Chain & Node Info

EndpointMethodDescription
node-version-infoGETReturns version information about the Access node serving the request, including the protocol version, spork ID, and node role
network-parametersGETReturns the network parameters of the connected Flow network, chiefly the chain identifier (flow-mainnet, flow-testnet, …)

Blocks

EndpointMethodDescription
blocksGETReturns one or more blocks by height
block-by-idGETReturns one or more blocks by block ID

Accounts

EndpointMethodDescription
accountGETReturns a Flow account: its FLOW balance, public keys, and deployed Cadence contracts
account-keyGETReturns a single public key of an account by its key index, including its signing and hashing algorithms, weight, sequence number, and revocation status

Collections & Transactions

EndpointMethodDescription
collection-by-idGETReturns a collection by ID
transactionGETReturns a transaction by ID: its Cadence script, arguments, reference block, gas limit, proposer/payer/authorizers, and signatures
transaction-resultGETReturns the execution result of a transaction by its ID: status, status code, any error message, computation used, and the events it emitted
send-transactionPOSTSubmits a signed transaction to the network and returns the created transaction, including its ID

Scripts & Events

EndpointMethodDescription
execute-scriptPOSTExecutes a read-only Cadence script against the chain state and returns the base64-encoded JSON-Cadence result
eventsGETReturns events of a given type within a block-height range, or across a set of block IDs

Execution Results

EndpointMethodDescription
execution-resultsGETReturns the execution results for one or more blocks, selected by block ID
execution-result-by-idGETReturns a single execution result by its own result ID (not the block ID), including its chunks and the block it commits to

Support

For technical support and questions:

See Also