Cross Chain
Balances
Transactions
- GETGet a transaction
- GETGet transaction summary for address
- GETGet earliest transactions for address (v3)
- GETGet recent transactions for address (v3)
- GETGet paginated transactions for address (v3)
- GETGet bulk time bucket transactions for address (v3)
- GETGet all transactions in a block by page (v3)
- GETGet all transactions in a block (v3)
NFT
- Core Rendering
- Market Data
- Ownership & Token Gating
Bitcoin
Get a transaction
Used to fetch and render a single transaction including its decoded event logs. For foundational chains, can also retrieve internal transactions, state changes and method ID where available.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.TransactionService.getTransaction({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"updated_at": "2023-11-07T05:31:56Z",
"chain_id": 123,
"chain_name": "<string>",
"items": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_offset": 123,
"successful": true,
"from_address": "<string>",
"miner_address": "<string>",
"from_address_label": "<string>",
"to_address": "<string>",
"to_address_label": "<string>",
"value": "<string>",
"value_quote": 123,
"pretty_value_quote": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
},
"gas_offered": 123,
"gas_spent": 123,
"gas_price": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"pretty_gas_quote": "<string>",
"gas_quote_rate": 123,
"explorers": [
{
"label": "<string>",
"url": "<string>"
}
],
"log_events": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"tx_offset": 123,
"log_offset": 123,
"tx_hash": "<string>",
"raw_log_topics": [
"<string>"
],
"sender_contract_decimals": 123,
"sender_name": "<string>",
"sender_contract_ticker_symbol": "<string>",
"sender_address": "<string>",
"sender_address_label": "<string>",
"sender_logo_url": "<string>",
"supports_erc": [
"<string>"
],
"sender_factory_address": "<string>",
"raw_log_data": "<string>",
"decoded": {
"name": "<string>",
"signature": "<string>",
"params": [
{
"name": "<string>",
"type": "<string>",
"indexed": true,
"decoded": true,
"value": "<string>"
}
]
}
}
],
"internal_transfers": [
{
"from_address": "<string>",
"to_address": "<string>",
"value": "<string>",
"gas_limit": 123
}
],
"state_changes": [
{
"address": "<string>",
"balance_before": "<string>",
"balance_after": "<string>",
"storage_changes": [
{
"storage_address": "<string>",
"value_before": "<string>",
"value_after": "<string>"
}
],
"nonce_before": 123,
"nonce_after": 123
}
],
"input_data": {
"method_id": "<string>"
}
}
]
}
Processing: Realtime
Base cost is 0.1
credits (e.g. requests that return with status 200
but no items).
Calls with no-logs
cost 0.05
credits/item.
The following tracing features each cost 0.05
credits where available on Foundational Chains:
with-internal
- includes internal transfers/transactions.with-state
- includes all transaction state changes with before and after values.with-input-data
- includes the transaction’s input data such as the Method ID.
Currently, tracing features are supported on the following chains:
eth-mainnet
optimism-mainnet
base-mainnet
How to Get the Latest Axie Spawns
Comparing GoldRush’s Transactions API to RPC Providers
How to Get Transaction History for an Address on Ethereum
How to Fetch User Operations (UserOps) for a Specific Wallet Address
A Guide to DeFi Taxes
Understanding Different Types of Blockchain Transactions with Covalent
Path Parameters
The chain name eg: eth-mainnet
.
The transaction hash.
Query Parameters
The currency to convert. Supports USD
, CAD
, EUR
, SGD
, INR
, JPY
, VND
, CNY
, KRW
, RUB
, TRY
, NGN
, ARS
, AUD
, CHF
, and GBP
.
Omit log events.
Whether to include internal transfers/transactions.
Whether to include all transaction state changes with before and after values.
Whether to include the transaction's input data such as the Method ID.
Response
The timestamp when the response was generated. Useful to show data staleness to users.
The requested chain ID eg: 1
.
The requested chain name eg: eth-mainnet
.
List of response items.
The block signed timestamp in UTC.
The height of the block.
The hash of the block. Use it to remove transactions from re-org-ed blocks.
The requested transaction hash.
The offset is the position of the tx in the block.
Indicates whether a transaction failed or succeeded.
The sender's wallet address.
The address of the miner.
The label of from
address.
The receiver's wallet address.
The label of to
address.
b;The value attached to this tx.
The value attached in quote-currency
to this tx.
A prettier version of the quote for rendering purposes.
The requested chain native gas token metadata.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The string returned by the name()
method.
The ticker symbol for this contract. This field is set by a developer and non-unique across a network.
Use the relevant contract_address
to lookup prices, logos, token transfers, etc.
A list of supported standard ERC interfaces, eg: ERC20
and ERC721
.
The contract logo URL.
The gas spent for this tx.
The gas price at the time of this tx.
b;The total transaction fees (gas_price
* gas_spent
) paid for this tx, denoted in wei.
The gas spent in quote-currency
denomination.
A prettier version of the quote for rendering purposes.
The native gas exchange rate for the requested quote-currency
.
The log events.
The block signed timestamp in UTC.
The height of the block.
The offset is the position of the tx in the block.
The offset is the position of the log entry within an event log.
The requested transaction hash.
The log topics in raw data.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The name of the sender.
The address of the sender.
The label of the sender address.
The contract logo URL.
A list of supported standard ERC interfaces, eg: ERC20
and ERC721
.
The address of the deployed UniswapV2 like factory contract for this DEX.
The log events in raw.
The decoded item.
List of internal transfers/transactions associated with the wallet address.
The contract address sending the native token.
The internal transfer recipient wallet address.
b;The value of the internal transfer in wei.
The gas available from the parent transaction or contract call.
List of state changes with before and after values and balances for involved contract and wallet addresses.
b;The balance of the native token before the transaction in wei.
b;The balance of the native token after the transaction in wei.
List of before and after values in the storage address.
The specific storage slot in the contract's storage space.
The hex value stored in the slot before the transaction.
The hex value stored in the slot after the transaction.
The transaction count for this address before the transaction.
The transaction count for this address after the transaction.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.TransactionService.getTransaction({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"updated_at": "2023-11-07T05:31:56Z",
"chain_id": 123,
"chain_name": "<string>",
"items": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_offset": 123,
"successful": true,
"from_address": "<string>",
"miner_address": "<string>",
"from_address_label": "<string>",
"to_address": "<string>",
"to_address_label": "<string>",
"value": "<string>",
"value_quote": 123,
"pretty_value_quote": "<string>",
"gas_metadata": {
"contract_decimals": 123,
"contract_name": "<string>",
"contract_ticker_symbol": "<string>",
"contract_address": "<string>",
"supports_erc": [
"<string>"
],
"logo_url": "<string>"
},
"gas_offered": 123,
"gas_spent": 123,
"gas_price": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"pretty_gas_quote": "<string>",
"gas_quote_rate": 123,
"explorers": [
{
"label": "<string>",
"url": "<string>"
}
],
"log_events": [
{
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"tx_offset": 123,
"log_offset": 123,
"tx_hash": "<string>",
"raw_log_topics": [
"<string>"
],
"sender_contract_decimals": 123,
"sender_name": "<string>",
"sender_contract_ticker_symbol": "<string>",
"sender_address": "<string>",
"sender_address_label": "<string>",
"sender_logo_url": "<string>",
"supports_erc": [
"<string>"
],
"sender_factory_address": "<string>",
"raw_log_data": "<string>",
"decoded": {
"name": "<string>",
"signature": "<string>",
"params": [
{
"name": "<string>",
"type": "<string>",
"indexed": true,
"decoded": true,
"value": "<string>"
}
]
}
}
],
"internal_transfers": [
{
"from_address": "<string>",
"to_address": "<string>",
"value": "<string>",
"gas_limit": 123
}
],
"state_changes": [
{
"address": "<string>",
"balance_before": "<string>",
"balance_after": "<string>",
"storage_changes": [
{
"storage_address": "<string>",
"value_before": "<string>",
"value_after": "<string>"
}
],
"nonce_before": 123,
"nonce_after": 123
}
],
"input_data": {
"method_id": "<string>"
}
}
]
}