Blockchain API
Connecting you to the world of web3 through APIs
What is Blockchain API?
The Blockops Blockchain API provides developers with instant, high-performance Remote Procedure Call (RPC) endpoints via HTTP and WebSockets (WSS). It acts as the critical communication bridge between your decentralized application (dApp) and the blockchain, handling node operations and syncing behind the scenes.
The Problem It Solves
Running your own blockchain nodes requires massive storage, constant updates, and 24/7 monitoring. The Blockchain API eliminates this infrastructure burden. You simply use our API endpoint to get reliable read/write access to the network, allowing you to focus entirely on building your application.
Dashboard
The dashboard gives access to all the available features on Blockops and provides a side navigation for easy navigation.
To get started, visit blockops.network and navigate to the Blockchain API page on the dashboard. This allows you to connect to a network which generates your API keys.


Supported Networks
Blockops' API Service supports:
Gnosis
Cronos
Polygon
Lisk
Assethub
Arbitrum
Zora
Celo
BSC
Optimism
Soneium
Starknet
Unichain
Solana
Fantom
Sonic
Zksync
Blast
Linea
Berachain
Mantle
Scroll
Hyperbridge
Avalanche
Monad and
Base, all easily accessible from the dashboard.
Accessing Endpoints
Select Project: Choose your project from the top dropdown (e.g., "Default Project").
Select Network: Use the network selector to switch between chains (e.g., Lisk vs Ethereum) and environments (Mainnet vs Testnet).

RPC Endpoints
Once a network is selected, your unique HTTP and WSS (WebSocket) endpoints are automatically generated.
HTTP Endpoint: Use this for standard JSON-RPC requests (e.g., fetching block data).
WSS Endpoint: Use this for real-time subscriptions and events.
You can view your full API Key on the right side of the dashboard.

Integration Helper
The dashboard includes a built-in integration helper. Select a method (e.g., eth_getBlockByNumber) and a language (e.g., bash, js, python) to generate a ready-to-use code snippet tailored to your API key.

Common EVM RPC Methods
Once your endpoints are generated, you can interact with the network using standard JSON-RPC methods. Here is a quick reference for the most common methods you will use when building your project:
Account Info
eth_getBalance
Returns the native token balance of an address (e.g., LSK or ETH).
eth_getTransactionCount
Returns the nonce of an account (essential for sending transactions).
Chain State
eth_chainId
Returns the specific Chain ID (e.g., Lisk Mainnet is 1135).
eth_gasPrice
Returns the current price of gas on the network in wei.
Transaction Info
eth_getTransactionByHash
Gets the full details of a transaction using its unique hash.
eth_getTransactionReceipt
Gets the receipt (status, logs, gas used) of a transaction.
Contract Interaction
eth_call
Executes a "read-only" call to a smart contract (costs zero gas).
eth_estimateGas
Estimates how much gas a transaction will cost before you send it.
Events & Logs
eth_getLogs
Returns an array of all logs matching a specific filter (highly useful for indexing data).
Practical Examples
Connect via a command line
You can connect to the network using websocket or HTTP with your API key in two ways:
Adding the API key as a query string
?api_key=${APIKEY}Or the request header
-H 'authorization: APIKEY ${APIKEY}'
cURL
For example, the following cURL command can be used to get the header and body of a block.
curl -H "Content-Type: application/json" -H "authorization: APIKEY xxxx" -d '{"id":1, "jsonrpc":"2.0", "method": "eth_getBlockByNumber", "params": ["latest", true]}' https://lisk.rpc.blockops.network/rpc
What Success Looks Like: Here is the successful JSON response you will receive back, proving your app is communicating with the chain:
{"jsonrpc":"2.0","result":{"hash":"0x381dd358f0b1e328e861822b2a51a72e8dc064803a5c7ccc96277da3b16d7667","number":"0xe07a1d", "timestamp": "0x65123abc"},"id":1}
wscat
If you want to send data requests with WebSockets, you can use several libraries or wscat. You can install and use wscat as follows:
Download wscat from https://www.npmjs.com/package/wscat
Install wscat by running the following command:
npm install -g wscat
You can connect to the network with wscat using two options by adding the API key as a query string:
wscat -c 'wss://lisk.rpc.blockops.network/ws' --header 'authorization: APIKEY xxxx'
Or the request header:
wscat -c 'wss://lisk.rpc.blockops.network/ws?api_key=**********************'
After executing the command, the terminal will display a message indicating that the connection has been enabled successfully:
Connected (press CTRL+C to quit)
Then, you can send the following request into the open terminal:
> {"id":1, "jsonrpc":"2.0", "method": "eth_blockNumber"}

Connect via Polkadot JS UI
Connect via Polkadot JS API
If you are building on Polkadot or any Substrate-based chain, you can connect your application using the official @polkadot/api library.
First, install the library in your project repository:
Then, instantiate the WsProvider using your Blockops WSS endpoint. The most reliable way to authenticate is by appending your API key as a query parameter in the URL.
Rotate API Key
Rotating API keys is important when an unauthorized third party has access to your API key. You have the option to reset it by using the Rotate Key button located in the project dashboard.

Blockchain API Rate Limiting
What is Rate Limiting? Rate limiting is a mechanism that controls the number of API requests your application can make to the Blockops RPC nodes within a specific time frame (usually measured in Requests Per Second, or RPS).
API Service Rate Limiting
For detailed information on how request limits are handled, how to manage your RPS (Requests Per Second), and how to upgrade your limits, please refer to our full guide on Blockops API Rate Limiting.
(Note: You can monitor your real-time request volume and remaining limits directly from your Project Dashboard.).
API Error Codes
The following error codes are frequently returned by our Blockchain API. However, it's important to note that this list doesn't include errors related to network-specific business logic.
401
Unauthorized Access
Invalid API key or no API key found in request
404
No route matched
This indicates the specific page you are trying to visit is non-existent
429
Too Many Requests
You have exceeded your request limit.
500
Internal Server Error
Something went wrong inside our servers. Contact support.
Conclusion
Blockops Blockchain API is a gateway to accessing your endpoint with ease and securely.
Follow us on Twitter for more information on upcoming protocols and developments.
Last updated