API Reference

Introduction

The AllChains Node Service API allows you to interact with multiple blockchain networks through a unified RESTful API. This reference guide details all available endpoints, parameters, and response formats.

Authentication

All API requests require authentication using an API key. Include your API key in the X-API-KEY header with each request.

// Example authentication header

X-API-KEY: your-api-key-here

You can obtain your API key from your account dashboard after registration.

Base URL

All API requests should be made to the following base URL:

https://api.allchains.cloud

Endpoints

The following endpoints are available for interacting with blockchain networks:

GETGet Block

/v1/{chain}/block/{block_identifier}

Get block details by block number or block hash.

Parameters

NameTypeRequiredDescription
chainstringYesChain symbol (eth, btc, etc)
block_identifierstringYesBlock number or block hash

Example Response

{
  "code": 1,
  "msg": "success",
  "data": {
    "hash": "0x...",
    "number": 17000000,
    "timestamp": 1676394889,
    "transactions": [...],
    "miner": "0x...",
    "difficulty": "0x...",
    "totalDifficulty": "0x...",
    "size": 12345,
    "gasUsed": 12345678,
    "gasLimit": 30000000
  }
}

GETGet Transaction

/v1/{chain}/tx/{tx_hash}

Get transaction details by transaction hash.

Parameters

NameTypeRequiredDescription
chainstringYesChain symbol (eth, btc, etc)
tx_hashstringYesTransaction hash

Example Response

{
  "code": 1,
  "msg": "success",
  "data": {
    "hash": "0x...",
    "blockHash": "0x...",
    "blockNumber": 17000000,
    "from": "0x...",
    "to": "0x...",
    "value": "0x...",
    "gas": 21000,
    "gasPrice": "0x...",
    "input": "0x...",
    "nonce": 123,
    "timestamp": 1676394889
  }
}

GETGet Address Balance

/v1/{chain}/address/{address}/balance

Get the balance of an address.

Parameters

NameTypeRequiredDescription
chainstringYesChain symbol (eth, btc, etc)
addressstringYesBlockchain address

Example Response

{
  "code": 1,
  "msg": "success",
  "data": {
    "address": "0x...",
    "balance": "1000000000000000000"
  }
}

GETGet Gas Price

/v1/{chain}/gas-price

Get the current gas price. Only applicable to EVM-compatible chains.

Parameters

NameTypeRequiredDescription
chainstringYesChain symbol (eth, bsc, etc)

Example Response

{
  "code": 1,
  "msg": "success",
  "data": {
    "gasPrice": "0x...",
    "baseFee": "0x...",
    "priorityFee": {
      "slow": "0x...",
      "standard": "0x...",
      "fast": "0x..."
    }
  }
}

POSTCall Contract

/v1/{chain}/contract/call

Call a smart contract method (read-only).

Parameters

NameTypeRequiredDescription
chainstringYesChain symbol (eth, bsc, etc)

Request Body

{
  "to": "0x...",
  "data": "0x...",
  "block": "latest"
}

Example Response

{
  "code": 1,
  "msg": "success",
  "data": {
    "result": "0x..."
  }
}

Error Codes

The API returns standard HTTP status codes and a JSON response body with error details when an error occurs.

CodeDescription
200Success. The response body will contain the requested data.
400Bad Request. The request was invalid or cannot be processed.
401Unauthorized. Authentication failed or API key is missing.
403Forbidden. The API key doesn't have permissions for the requested resource.
404Not Found. The requested resource doesn't exist.
429Too Many Requests. Rate limit has been exceeded.
500Internal Server Error. An unexpected error occurred on the server.

Rate Limits

API requests are subject to rate limiting based on your subscription plan. The current rate limits are:

PlanDaily LimitRequests per Second
Free50 calls5 RPS
Basic10,000 calls20 RPS
Professional100,000 calls50 RPS
EnterpriseUnlimitedCustom

If you exceed your rate limit, the API will return a 429 Too Many Requests response. Consider upgrading your plan if you consistently hit these limits.

View pricing plans