APIs used:
Blockchain transactions are at the core of Ethereum functionality, allowing users to interact with smart contracts and transfer assets securely and transparently. Accessing transaction history for an address is essential for various purposes, from analytics, to building a decentralized application. In this guide, we'll walk you through the process of retrieving the earliest transaction details for an Ethereum address using the GoldRush API.
Quick Start
Obtain GoldRush API Key
Before getting started, you'll need to obtain an API key from GoldRush. Sign up for an API key if you haven’t gotten one yet.
Installation
Now that you have your GoldRush API key, it's time to integrate the GoldRush SDK into your project.
npm install @covalenthq/client-sdk
Endpoint Overview
The /v1/{chainName}/bulk/transactions/{walletAddress}/ endpoint is your gateway to retrieving the earliest transactions associated with a specific Ethereum address.
Parameters
chainName: This specifies the blockchain network (e.g., "eth-mainnet" for Ethereum's main network).
walletAddress: Represents the Ethereum address for which you seek transaction history.
Response
This response provides detailed information about the earliest transactions involving a specific wallet address on the Ethereum mainnet. It includes data such as the block height, block hash, transaction hash, sender and recipient addresses, transaction value in ether, transaction fees, gas metadata, and explorers.
"address": "0xdc2f48410033d18c5cce2c11135fd0d40fc19aaa", "updated_at": "2024-04-25T01:04:44.489338723Z", "next_update_at": "2024-04-25T01:09:44.489338883Z", "quote_currency": "USD", "chain_id": 1, "chain_name": "eth-mainnet", "complete": true, "current_bucket" 1886754, "links": { ... 2 items }, "items": [ "0": { "block_signed_at": "2023-10-23T16:41:35Z", "block_height": 18414227, "block_hash": "0x8075abc4b36065443aac0e76a4fe25e3ed1b98621137648b5254b867aad0f791", "tx_hash": "0x6777840dae5d445f4c0b83f0916edf6302662ff9554a7d9f7beb7dcf46213782", "tx_offset": 38, "successful": true, "miner_address": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97", "from_address": "0x51971c86b04516062c1e708cdc048cb04fbe959f", "from_address_label": null, "to_address": "0xdc2f48410033d18c5cce2c11135fd0d40fc19aaa", "to_address_label": null, "value": "59580000000000000", "value_quote": 105.1700156061255, "pretty_value_quote": "$105.17", "gas_metadata": { ... 6 items }, "gas_offered": 100000, "gas_spent": 21000, "gas_price": 37328676560, "fees_paid": "783902207760000", "gas_quote": 1.3837362776736395, "pretty_gas_quote": "$1.38", "gas_quote_rate": 1765.189922895695, "explorers": [ "0": { ... 2 items }, ], }, ],
Use-Cases
Portfolio Tracking dApp
With access to transaction details through the GoldRush API, developers can build portfolio tracking decentralized applications (dApps). Users can monitor their asset holdings, transaction history, and portfolio performance in real-time.
Blockchain Explorer and Visualization
GoldRush's comprehensive blockchain data enables the creation of advanced blockchain explorers and visualization tools. Developers can leverage transaction details to provide users with intuitive interfaces for exploring the Ethereum blockchain and analyzing transaction patterns.
Cross-Chain Wallet dApp
By integrating transaction querying functionality, developers can enhance cross-chain wallet dApps with support for multiple blockchain transactions. Users can view detailed transaction information for both Ethereum and other supported blockchains.
Conclusion
Accessing transaction details on Ethereum is made simple and efficient with the GoldRush API. By following the steps outlined in this guide, developers can access comprehensive transaction data and unlock a wide range of use cases, from portfolio tracking to blockchain visualization. Start building your blockchain-powered applications today with GoldRush.