{
    "items": [
        {
            "actions": [],
            "base_fee_per_gas": "15",
            "block": 4319804,
            "confirmation_duration": [0, 5010],
            "confirmations": 431946,
            "created_contract": null,
            "decoded_input": null,
            "exchange_rate": null,
            "fee": {
                "type": "actual",
                "value": "52500000315000"
            },
            "from": {
                "ens_domain_name": null,
                "hash": "0x8B066912dCDA9c9001A84b28F1aBD06e9E19114B",
                "implementations": [],
                "is_contract": false,
                "is_verified": false,
                "metadata": null,
                "name": null,
                "private_tags": [],
                "proxy_type": null,
                "public_tags": [],
                "watchlist_names": []
            },
            "gas_limit": "1048576",
            "gas_price": "2500000015",
            "gas_used": "21000",
            "has_error_in_internal_txs": false,
            "hash": "0xb27af2f3b0d1171c58045c5671e1771a2084193f831f1b8bf81fb3c4f0e4e9bb",
            "max_fee_per_gas": "2500000015",
            "max_priority_fee_per_gas": "2500000015",
            "method": null,
            "nonce": 42633,
            "position": 0,
            "priority_fee": "52500000000000",
            "raw_input": "0x",
            "result": "success",
            "revert_reason": null,
            "status": "ok",
            "timestamp": "2024-08-22T09:48:36.000000Z",
            "to": {
                "ens_domain_name": null,
                "hash": "0x5C253e4cc17225C799724824D35D361Be201B548",
                "implementations": [],
                "is_contract": false,
                "is_verified": false,
                "metadata": null,
                "name": null,
                "private_tags": [],
                "proxy_type": null,
                "public_tags": [],
                "watchlist_names": []
            },
            "token_transfers": null,
            "token_transfers_overflow": null,
            "tx_burnt_fee": "315000",
            "tx_tag": null,
            "tx_types": ["coin_transfer"],
            "type": 2,
            "value": "10000000000000000000"
        }
    ],
    "next_page_params": {
        "api_key": "",
        "apikey": "",
        "block_number": 3515628,
        "fee": "46207912380000",
        "hash": "0x4074791a7beec5dcecb9dffbab10b0001e2d9025480cdb53e77b1606ae174e2e",
        "index": 0,
        "inserted_at": "2024-07-06T17:24:25.541294Z",
        "items_count": 50,
        "value": "500000000000000000"
    }
}
These APIs can be helpful for developers as they offer the possibility of fetching data from the blockchain and use that data for their own goals, such as dapp development, data streams and other possibilities.

Overview

Shib’s on-chain data APIs provide developers with comprehensive access to blockchain data from both Shibarium mainnet and Puppynet testnet. These APIs enable you to build applications that can fetch transaction history, account balances, and other blockchain data for various use cases including dApp development, analytics, and data streaming.
Access to the RPC data requires authentication. Head to the Developer Portal to get your API Key.

Available APIs

Base URLs

The APIs are available for both Shibarium mainnet and Puppynet testnet:
NetworkBase URLDescription
Shibariumhttps://chain.shib.io/api/v1/shibariumMainnet production environment
Puppynethttps://chain.shib.io/api/v1/puppynetTestnet for development

Transactions API

Use this endpoint to fetch transaction data from a given address.

Endpoint

GET /transactions

Request Examples

curl -s "https://chain.shib.io/api/v1/puppynet/transactions?address={{address}}&api_key={{api_key}}" \
-H "Content-Type: application/json" -X GET

Query Parameters

api_key
string
required
Your API key provided by the Developer Portal.
address
string
required
The wallet address from which you would like to fetch data.

Response Schema

{
    "items": [
        {
            "actions": [],
            "base_fee_per_gas": "15",
            "block": 4319804,
            "confirmation_duration": [0, 5010],
            "confirmations": 431946,
            "created_contract": null,
            "decoded_input": null,
            "exchange_rate": null,
            "fee": {
                "type": "actual",
                "value": "52500000315000"
            },
            "from": {
                "ens_domain_name": null,
                "hash": "0x8B066912dCDA9c9001A84b28F1aBD06e9E19114B",
                "implementations": [],
                "is_contract": false,
                "is_verified": false,
                "metadata": null,
                "name": null,
                "private_tags": [],
                "proxy_type": null,
                "public_tags": [],
                "watchlist_names": []
            },
            "gas_limit": "1048576",
            "gas_price": "2500000015",
            "gas_used": "21000",
            "has_error_in_internal_txs": false,
            "hash": "0xb27af2f3b0d1171c58045c5671e1771a2084193f831f1b8bf81fb3c4f0e4e9bb",
            "max_fee_per_gas": "2500000015",
            "max_priority_fee_per_gas": "2500000015",
            "method": null,
            "nonce": 42633,
            "position": 0,
            "priority_fee": "52500000000000",
            "raw_input": "0x",
            "result": "success",
            "revert_reason": null,
            "status": "ok",
            "timestamp": "2024-08-22T09:48:36.000000Z",
            "to": {
                "ens_domain_name": null,
                "hash": "0x5C253e4cc17225C799724824D35D361Be201B548",
                "implementations": [],
                "is_contract": false,
                "is_verified": false,
                "metadata": null,
                "name": null,
                "private_tags": [],
                "proxy_type": null,
                "public_tags": [],
                "watchlist_names": []
            },
            "token_transfers": null,
            "token_transfers_overflow": null,
            "tx_burnt_fee": "315000",
            "tx_tag": null,
            "tx_types": ["coin_transfer"],
            "type": 2,
            "value": "10000000000000000000"
        }
    ],
    "next_page_params": {
        "api_key": "",
        "apikey": "",
        "block_number": 3515628,
        "fee": "46207912380000",
        "hash": "0x4074791a7beec5dcecb9dffbab10b0001e2d9025480cdb53e77b1606ae174e2e",
        "index": 0,
        "inserted_at": "2024-07-06T17:24:25.541294Z",
        "items_count": 50,
        "value": "500000000000000000"
    }
}

Response Fields

items
array
required
List of transactions for the specified address.
actions
array
A list of actions associated with the transaction.
base_fee_per_gas
string
The base fee per gas unit for this transaction, indicating the minimum amount of gas required to process the transaction.
block
number
The number of the block where the transaction was registered.
confirmation_duration
array
An array representing the range of time (in milliseconds) it took for the transaction to be confirmed.
confirmations
number
The number of confirmations this transaction has received. Confirmations indicate how many blocks have been added to the blockchain since this transaction.
created_contract
object|null
Details about a contract that was created as a result of a transaction. Contains information such as the contract’s address, name, and whether it has been verified.
decoded_input
object|null
The decoded information from the raw transaction input. Typically includes the method call and the parameters passed to the function during the transaction.
exchange_rate
object|null
The exchange rate at the time of the transaction (if applicable).
fee
object
required
Contains information about the transaction fee.
from
object
required
Contains information about the sender of the transaction.
gas_limit
string
The maximum amount of gas allowed for the transaction.
gas_price
string
The price of gas per unit.
gas_used
string
The actual amount of gas used by the transaction.
has_error_in_internal_txs
boolean
Whether there were any errors in any internal transactions.
hash
string
The transaction hash.
max_fee_per_gas
string
The maximum fee per gas unit that the sender is willing to pay.
max_priority_fee_per_gas
string
The maximum priority fee per gas unit that the sender is willing to pay to speed up the transaction process.
method
string|null
Specific method or smart contract function.
nonce
number
The nonce for this transaction, which is the number of transactions sent by the sender up to this point.
position
number
The position of the transaction within the block.
priority_fee
string
The priority fee paid to validators.
raw_input
string
The raw input data provided in the transaction.
result
string
Indicates the outcome of the transaction.
revert_reason
string|null
Shows the reason why the transaction was reverted, if applicable.
status
string
The transaction status, that is, if it was successfully processed or not.
timestamp
string
The timestamp when the transaction occurred.
to
object
required
Contains information about the recipient of the transaction (same structure as from field).
token_transfers
array|null
What token transfers occurred during this transaction.
token_transfers_overflow
boolean|null
Whether overflow or errors in token transfers happened.
tx_burnt_fee
string
The amount of gas fees burned by the transaction.
tx_tag
string|null
Specific tags associated with the transaction.
tx_types
array
A list indicating the type of transaction.
type
number
The transaction type.
value
string
The amount of cryptocurrency transferred in the transaction.
next_page_params
object
These are parameters needed to retrieve the next page of transactions when paginating through API results.

Balance API

The Balance API allows you to retrieve account balances for native tokens and ERC-20 tokens.

Endpoint

GET /balances

Query Parameters

api_key
string
required
Your API key provided by the Developer Portal.
address
string
required
The wallet address for which you want to fetch balance data.

Response Schema

{
    "items": [
        {
            "coin_balance": "1000000000000000000",
            "exchange_rate": "1.0",
            "fiat_value": "1.0",
            "token": {
                "address": "0x0000000000000000000000000000000000000000",
                "circulating_market_cap": null,
                "decimals": 18,
                "exchange_rate": "1.0",
                "holders": 1000,
                "icon_url": null,
                "name": "Ether",
                "symbol": "ETH",
                "total_supply": "1000000000000000000000",
                "type": "coin"
            }
        }
    ],
    "next_page_params": {
        "api_key": "",
        "apikey": "",
        "items_count": 1
    }
}

Response Fields

items
array
required
List of token balances for the specified address.
coin_balance
string
The balance of the token in its smallest unit (wei for ETH).
exchange_rate
string
The current exchange rate of the token.
fiat_value
string
The fiat value of the token balance.
token
object
required
Information about the token.
next_page_params
object
Parameters for pagination to retrieve the next page of results.

Rate Limits

The APIs have rate limits to ensure fair usage. Monitor your API usage and implement appropriate caching strategies for production applications.

Error Handling

Best Practices

  • Implement proper error handling and retry logic
  • Cache responses when appropriate to reduce API calls
  • Use pagination for large datasets
  • Monitor your API usage and stay within rate limits
  • Implement exponential backoff for failed requests
  • Validate addresses before making API calls
Never expose your API key in client-side code. Always make API calls from your backend server to keep your key secure.

Use Cases

Wallet Applications

Display transaction history and balances for user wallets with real-time updates.

Analytics Dashboards

Build comprehensive analytics platforms showing transaction patterns and token flows.

DeFi Applications

Track user positions, liquidity pools, and yield farming activities.

Blockchain Explorers

Create custom blockchain explorers with detailed transaction and balance information.

Next Steps