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

Transactions API

Fetch transaction data from specific addresses with detailed information about gas fees, confirmations, and token transfers.

Balance API

Retrieve account balances for native tokens and ERC-20 tokens across multiple networks.

Base URLs

The APIs are available for both Shibarium mainnet and Puppynet testnet:

Transactions API

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

Endpoint

Request Examples

Query Parameters

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

Response Schema

Response Fields

array
required
List of transactions for the specified address.
array
A list of actions associated with the transaction.
string
The base fee per gas unit for this transaction, indicating the minimum amount of gas required to process the transaction.
number
The number of the block where the transaction was registered.
array
An array representing the range of time (in milliseconds) it took for the transaction to be confirmed.
number
The number of confirmations this transaction has received. Confirmations indicate how many blocks have been added to the blockchain since this transaction.
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.
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.
object|null
The exchange rate at the time of the transaction (if applicable).
object
required
Contains information about the transaction fee.
object
required
Contains information about the sender of the transaction.
string
The maximum amount of gas allowed for the transaction.
string
The price of gas per unit.
string
The actual amount of gas used by the transaction.
boolean
Whether there were any errors in any internal transactions.
string
The transaction hash.
string
The maximum fee per gas unit that the sender is willing to pay.
string
The maximum priority fee per gas unit that the sender is willing to pay to speed up the transaction process.
string|null
Specific method or smart contract function.
number
The nonce for this transaction, which is the number of transactions sent by the sender up to this point.
number
The position of the transaction within the block.
string
The priority fee paid to validators.
string
The raw input data provided in the transaction.
string
Indicates the outcome of the transaction.
string|null
Shows the reason why the transaction was reverted, if applicable.
string
The transaction status, that is, if it was successfully processed or not.
string
The timestamp when the transaction occurred.
object
required
Contains information about the recipient of the transaction (same structure as from field).
array|null
What token transfers occurred during this transaction.
boolean|null
Whether overflow or errors in token transfers happened.
string
The amount of gas fees burned by the transaction.
string|null
Specific tags associated with the transaction.
array
A list indicating the type of transaction.
number
The transaction type.
string
The amount of cryptocurrency transferred in the transaction.
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

Query Parameters

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

Response Schema

Response Fields

array
required
List of token balances for the specified address.
string
The balance of the token in its smallest unit (wei for ETH).
string
The current exchange rate of the token.
string
The fiat value of the token balance.
object
required
Information about the token.
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

Error: 401 UnauthorizedCause: Invalid or missing API keySolution: Verify your API key is correct and included in the request
Error: 429 Too Many RequestsCause: Exceeded rate limitsSolution: Implement exponential backoff and reduce request frequency
Error: 400 Bad RequestCause: Invalid wallet address formatSolution: Ensure the address is a valid Ethereum address format
Error: 500 Internal Server ErrorCause: Server-side issuesSolution: Retry the request with exponential backoff

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

Get API Key

Obtain your API key from the Developer Portal to start using the on-chain data APIs.

Explore More APIs

Discover additional APIs and tools available in the Shib ecosystem.