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.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
Your API key provided by the Developer Portal.
Response Schema
Response Fields
The base fee per gas unit for this transaction, indicating the minimum amount of gas required to process the transaction.
An array representing the range of time (in milliseconds) it took for the transaction to be confirmed.
The number of confirmations this transaction has received. Confirmations indicate how many blocks have been added to the blockchain since this transaction.
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.
The decoded information from the raw transaction input. Typically includes the method call and the parameters passed to the function during the transaction.
The maximum priority fee per gas unit that the sender is willing to pay to speed up the transaction process.
The nonce for this transaction, which is the number of transactions sent by the sender up to this point.
Contains information about the recipient of the transaction (same structure as
from field).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
Your API key provided by the Developer Portal.
Response Schema
Response Fields
Rate Limits
Error Handling
Authentication Errors
Authentication Errors
Error:
401 UnauthorizedCause: Invalid or missing API keySolution: Verify your API key is correct and included in the requestRate Limit Exceeded
Rate Limit Exceeded
Error:
429 Too Many RequestsCause: Exceeded rate limitsSolution: Implement exponential backoff and reduce request frequencyInvalid Address
Invalid Address
Error:
400 Bad RequestCause: Invalid wallet address formatSolution: Ensure the address is a valid Ethereum address formatServer Errors
Server Errors
Error:
500 Internal Server ErrorCause: Server-side issuesSolution: Retry the request with exponential backoffBest Practices
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.