githubEdit

hammerOverview

GetBlock API docs: RPC endpoints, SDK guides, and developer tools. Everything you need to connect and build on 100+ blockchain networks

Getting Started with GetBlock

To get started, follow these steps:

  1. Sign up: Create an account to access your Access Token.

  2. Generate access token: Navigate to the dashboard, and generate your first access token for API authentication.

  3. Choose the blockchain name and type: Select the blockchain network you want to interact with, set up testnet/mainnet, and choose the interface you’re going to use.

  4. Send your first request:

import requests
url = "https://go.getblock.io/<ACCESS-TOKEN>/"
headers = { "Content-Type": "application/json" }
payload = { "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": "getblock.io" }
response = requests.post(url, headers=headers, json=payload)
print(response.json())

Key Features of GetBlock

GetBlock is offering one of the most comprehensive APIs toolkits in the segment supporting hundreds of dApps with fast and reliable connection to blockchain nodes.

100+ blockchains in store

  • Seamless connection to full and archive nodes

  • Shared and dedicated nodes: Tailored for your dApp’s needs.

  • Programmable and non-programmable blockchains

  • L1 and L2 protocols

  • EVM and non-EVM networks

See full list: https://getblock.io/nodes/arrow-up-right All mainstream RPC interfaces

  • WebSockets

  • JSON RPC

  • GraphQL

  • REST API

  • And more

Add them in Lego-like manner: https://account.getblock.io/arrow-up-right

Industry-leading suite of add-ons and ready-made APIs

  • DAS API

  • Firehose

  • Blockbook

  • Yellowstone Geyser

Need more? Don’t hesitate to contact sales: https://getblock.io/contact/arrow-up-right

Examples for Console REST API Requests

cURL

Most *nix-based systems come with cURL pre-installed. cURL is a command-line tool and library for transferring data with URLs. To check if cURL is installed, run the following command:

Example of requesting the latest block number using the GetBlock API and cURL:

Python

To run Python examples, ensure Python is installed along with the requests package. You can install the package using the following command:

Example:

JavaScript

For JavaScript examples, you'll need Node.js version 18 or later. Follow the official documentation to install the latest stable version globally. Verify your installation by running:

Ruby

To execute Ruby examples, install Ruby on your machine. Refer to the official installation guide for details. Confirm installation by running:

Supported networks

We provide APIs for a wide range of networks, including:

Aptos (APT)arrow-up-right

Arbitrum (ARB)arrow-up-right

Avalanche (AVAX)arrow-up-right

Bitcoin Cash (BCH)arrow-up-right

BNB Smart Chain (BSC)arrow-up-right

Bitcoin-SV (BSV)arrow-up-right

Bitcoin (BTC)arrow-up-right

Bitcoin Gold (BTG)arrow-up-right

Cronos (CRO)arrow-up-right

Dash (DASH)arrow-up-right

DigiByte (DGB)arrow-up-right

Dogeсoin (DOGE)arrow-up-right

Polkadot (DOT)arrow-up-right

Ethereum Classic (ETC)arrow-up-right

Ethereum (ETH)arrow-up-right

Fantom (FTM)arrow-up-right

Fuse.io (FUSE)arrow-up-right

Moonbeam (GLMR)arrow-up-right

Gnosis Chain (GNO)arrow-up-right

Huobi ECO Chain (HECO)arrow-up-right

KuCoin Community Chain (KCC)arrow-up-right

Kusama (KSM)arrow-up-right

Polygon (MATIC)arrow-up-right

Moonriver (MOVR)arrow-up-right

Near Protocol (NEAR)arrow-up-right

Harmony (ONE)arrow-up-right

Ontology (ONT)arrow-up-right

Optimism (OP)arrow-up-right

Rootstock (RSK)arrow-up-right

Solana (SOL)arrow-up-right

Theta (THETA)arrow-up-right

TON (TON)arrow-up-right

Tron (TRX)arrow-up-right

NEM (XEM)arrow-up-right

Monero (XMR)arrow-up-right

ZCash (ZEC)arrow-up-right

Last updated

Was this helpful?