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 transactions for Bitcoin address
Used to fetch the full transaction history of a Bitcoin wallet.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.TransactionService.getTransactionsForBtcAddress({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"chain_id": 123,
"chain_name": "<string>",
"contract_decimals": 123,
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_idx": 123,
"type": "<string>",
"address": "<string>",
"value": "<string>",
"quote": 123,
"quote_rate": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"gas_quote_rate": 123,
"coinbase": true,
"locktime": 123,
"weight": 123
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}
Processing: Realtime
Only supports non-HD bitcoin addresses.
Query Parameters
The bitcoin address to query.
Number of items per page. Omitting this parameter defaults to 100.
0-indexed page number to begin pagination.
Response
The timestamp when the response was generated. Useful to show data staleness to users.
List of response items.
The requested chain ID eg: 20090103
.
The requested chain name eg: btc-mainnet
.
Use contract decimals to format the token balance for display purposes - divide the balance by 10^{contract_decimals}
.
The block signed timestamp in UTC.
The height of the block.
The hash of the block.
The requested transaction hash.
The position index of the tx in the block.
Either 'input' as the sender or 'output' as the receiver of btc.
The wallet address.
b;The value attached to this tx in satoshi.
The value attached to this tx in USD.
The value token exchange rate in USD.
b;The total transaction fees denoted in satoshi.
The gas spent in USD.
The native gas token exchange rate in USD.
Indicates if this is a coinbase tx where btc is rewarded to a miner for validating the block.
The earliest Unix timestamp or block height at which the tx is valid and can be included. Is 0
if no restriction.
A measure that reflects impact on the block size limit. Used to determine fees.
Pagination metadata.
import { GoldRushClient } from "@covalenthq/client-sdk";
const ApiServices = async () => {
const client = new GoldRushClient("YOUR_API_KEY");
const resp = await client.TransactionService.getTransactionsForBtcAddress({chainName: "chainName", walletAddress: "walletAddress"});
console.log(resp.data);
};
ApiServices();
{
"updated_at": "2023-11-07T05:31:56Z",
"items": [
{
"chain_id": 123,
"chain_name": "<string>",
"contract_decimals": 123,
"block_signed_at": "2023-11-07T05:31:56Z",
"block_height": 123,
"block_hash": "<string>",
"tx_hash": "<string>",
"tx_idx": 123,
"type": "<string>",
"address": "<string>",
"value": "<string>",
"quote": 123,
"quote_rate": 123,
"fees_paid": "<string>",
"gas_quote": 123,
"gas_quote_rate": 123,
"coinbase": true,
"locktime": 123,
"weight": 123
}
],
"pagination": {
"has_more": true,
"page_number": 123,
"page_size": 123,
"total_count": 123
}
}