Transactions API
API KEY
Access to the RPC data requires authentication. Head to the Developer Portal to get your API Key.
Use this endpoint to fetch transaction data from a given address.
Base URL
- Shibarium
- Puppynet
https://chain.shib.io/api/v1/shibarium
https://chain.shib.io/api/v1/puppynet
Request example
GET /transactions
- cURL
- Typescript
- Go
curl -s "https://chain.shib.io/api/v1/puppynet/transactions?address={{address}}&api_key={{api_key}}" \
-H "Content-Type: application/json" -X GET
import axios from 'axios';
const apiKey = '<api_key>';
const walletAddress = '<wallet_address>';
const baseURL = 'https://chain.shib.io/api/v1/puppynet';
async function makeRequest(url: string): Promise<string> {
try {
const response = await axios.get(url, {
headers: { 'Content-Type': 'application/json' }
});
return JSON.stringify(response.data);
} catch (error) {
throw new Error(`Request failed: ${error}`);
}
}
async function main() {
try {
// Get transactions
const transactionsURL = `${baseURL}/transactions?address=${walletAddress}&api_key=${apiKey}`;
const transactionsResp = await makeRequest(transactionsURL);
console.log('Transactions response:', transactionsResp);
// Get balances
const balancesURL = `${baseURL}/balances?address=${walletAddress}&api_key=${apiKey}`;
const balancesResp = await makeRequest(balancesURL);
console.log('Balances response:', balancesResp);
} catch (error) {
console.error('Error:', error.message);
}
}
main();
package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
apiKey := "<api_key>"
walletAddress := "<wallet_address>"
baseURL := "https://chain.shib.io/api/v1/puppynet"
// Get transactions
transactionsURL := fmt.Sprintf("%s/transactions?address=%s&api_key=%s", baseURL, walletAddress, apiKey)
transactionsResp, err := makeRequest(transactionsURL)
if err != nil {
fmt.Printf("Error getting transactions: %v\n", err)
} else {
fmt.Printf("Transactions response: %s\n", transactionsResp)
}
// Get balances
balancesURL := fmt.Sprintf("%s/balances?address=%s&api_key=%s", baseURL, walletAddress, apiKey)
balancesResp, err := makeRequest(balancesURL)
if err != nil {
fmt.Printf("Error getting balances: %v\n", err)
} else {
fmt.Printf("Balances response: %s\n", balancesResp)
}
}
func makeRequest(url string) (string, error) {
client := &http.Client{}
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return "", err
}
req.Header.Add("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
return "", err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
return "", err
}
return string(body), nil
}
Header Parameters
No header parameters needed.
Query Parameters
Parameter | Description | Required |
---|---|---|
api_key | Your API key provided by the Developer Portal. | ----- |
address | The wallet address from which you would like to fetch data. | ---- |
Response
{
"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"
}
}
Key | Value |
---|---|
items | List of transactions. |
actions | A list of actions associated with the transaction. |
base_fee_per_gas | The base fee per gas unit for this transaction, indicating the minimum amount of gas required to process the transaction. |
block | The number of the block where the transaction was registered. |
confirmation_duration | An array representing the range of time (in milliseconds) it took for the transaction to be confirmed. |
confirmations | The number of confirmations (431946) this transaction has received. Confirmations indicate how many blocks have been added to the blockchain since this transaction. |
created_contract | This key refers to details about a contract that was created as a result of a transaction. It contains information such as the contract's address, name, and whether it has been verified. |
decoded_input | This contains the decoded information from the raw transaction input. It typically includes the method call (method_call) and the parameters passed to the function during the transaction. |
exchange_rate | The exchange rate at the time of the transaction (if applicable). |
fee | Contains information about the transaction fee. |
type | Specifies whether the fee is the actually charged one, an estimation or the maximum possible fee. |
value | The actual fee paid for the transaction. |
from | Contains information about the sender of the transaction. |
ens_domain_name | The ENS (Ethereum Name Service) domain name, if applicable. |
hash | The address hash of the sender. |
implementations | Holds a list of smart contract standards or protocols that the given address adheres to. |
is_contract | Indicates if the sender is a smart contract. |
is_verified | Indicates whether the sender address is verified. |
metadata | Stores extra information about the address, such as descriptive data that might come from external sources or on-chain events. Metadata can include details like social handles, contract descriptions, or external references to the address. |
name | Refers to a human-readable identifier for the address, often assigned through services like ENS (Ethereum Name Service) or another name registration system. |
private_tags | User-defined labels or categories that can be assigned to addresses for organizational purposes. |
proxy_type | Refers to the type of proxy contract the address might represent, especially in systems where smart contract proxies are used. Proxy contracts allow upgrades or changes to be made to a contract's logic without changing the contract's address. |
public_tags | Public tags are similar to private tags but are visible to everyone. They serve as a form of public labeling for addresses that are widely recognized or have a specific purpose. |
watchlist_names | Stores the names of watchlists the address has been added to. |
gas_limit | The maximum amount of gas allowed for the transaction, here units. |
gas_price | The price of gas per unit. |
gas_used | The actual amount of gas used by the transaction. |
has_error_in_internal_txs | Whether there were any errors in any internal transactions. |
hash | The transaction hash. |
max_fee_per_gas | he maximum fee per gas unit that the sender is willing to pay. |
max_priority_fee_per_gas | The maximum priority fee per gas unit that the sender is willing to pay to speed up the transaction process. |
method | Specific method or smart contract function. |
nonce | The nonce for this transaction, which is the number of transactions sent by the sender up to this point. |
position | The position of the transaction within the block. |
priority_fee | The priority fee paid to validators. |
raw_input | The raw input data provided in the transaction. |
result | Indicates the outcome of the transaction. |
revert_reason | Shows the reason why the transaction was reverted, if applicable. |
status | The transaction status, that is, if it was successfully processed or not. |
timestamp | The timestamp when the transaction occurred. |
to | Contains information about the recipient of the transaction |
ens_domain_name | The ENS (Ethereum Name Service) domain name, if applicable. |
hash | The address hash of the recipient. |
implementations | Holds a list of smart contract standards or protocols that the given address adheres to. |
is_contract | Indicates if the recipient is a smart contract. |
is_verified | Indicates whether the recipient address is verified. |
metadata | Stores extra information about the address, such as descriptive data that might come from external sources or on-chain events. Metadata can include details like social handles, contract descriptions, or external references to the address. |
name | Refers to a human-readable identifier for the address, often assigned through services like ENS (Ethereum Name Service) or another name registration system |
private_tags | User-defined labels or categories that can be assigned to addresses for organizational purposes. |
proxy_type | Refers to the type of proxy contract the address might represent, especially in systems where smart contract proxies are used. Proxy contracts allow upgrades or changes to be made to a contract's logic without changing the contract's address. |
public_tags | Public tags are similar to private tags but are visible to everyone. They serve as a form of public labeling for addresses that are widely recognized or have a specific purpose. |
watchlist_names | Stores the names of watchlists the address has been added to. |
token_transfers | What token transfers occurred during this transactions. |
token_transfers_overflow | Whether overflow or errors in token transfers happened. |
tx_burnt_fee | The amount of gas fees burned by the transaction. |
tx_tag | Specific tags associated with the transaction. |
tx_types | A list indicating the type of transaction. |
type | The transaction type. |
value | The amount of cryptocurrency transferred in the transaction. |
next_page_params | These are parameters needed to retrieve the next page of transactions when paginating through API results. |
api_key | Key used for authentication. |
apikey | Key used for authentication. |
block_number | The specific block number on the blockchain where the transaction was included. |
fee | The transaction fee that was paid for executing the transaction on the blockchain. |
hash | This is a unique identifier for the transaction. |
index | This key refers to the position of the transaction within the block. |
inserted_at | The timestamp when the transaction or the data related to it was inserted into the blockchain itself. |
items_count | The number of items returned in the response or contained within a specific transaction detail. |
value | The value of the transaction in the native currency of the blockchain. |