Get recent transactions
Retrieves all recently mined transactions.
Get recent transactions
Retrieves all recently mined transactions
If using TypeScript, import typings for this response from our types package:
import type { TransactionResults } from '@stacks/stacks-blockchain-api-types';
Query Parameters
limit
integer
max number of transactions to fetch
Example:100
Default: 96
Maximum: 200
offset
integer
index of first transaction to fetch
Example:42000
type
array<string>
Filter by transaction type
Example:"coinbase"
from_address
string
Option to filter results by sender address
to_address
string
Option to filter results by recipient address
sort_by
string
Option to sort results by block height, timestamp, or fee
Example:"burn_block_time"
Default: "block_height"
Value in: "block_height" | "burn_block_time" | "fee"
start_time
integer
Filter by transactions after this timestamp (unix timestamp in seconds)
Example:1704067200
end_time
integer
Filter by transactions before this timestamp (unix timestamp in seconds)
Example:1706745599
contract_id
string
Filter by contract call transactions involving this contract ID
Example:"SP000000000000000000002Q6VF78.pox-4"
function_name
string
Filter by contract call transactions involving this function name
Example:"delegate-stx"
nonce
integer
Filter by transactions with this nonce
Example:123
order
string
Option to sort results in ascending or descending order
Example:"desc"
Default: "desc"
Value in: "asc" | "desc"
unanchored
boolean
Include transaction data from unanchored (i.e. unconfirmed) microblocks
Example:true
Default: false
Status code | Description |
---|---|
200 | List of transactions |
$curl -X GET "https://api.hiro.so/extended/v1/tx?limit=100&offset=42000&type=coinbase&from_address=string&to_address=string&sort_by=burn_block_time&start_time=1704067200&end_time=1706745599&contract_id=SP000000000000000000002Q6VF78.pox-4&function_name=delegate-stx&nonce=123&order=desc&unanchored=true"
GET request that returns transactions
{"limit": 200,"offset": 0,"total": 0,"results": [{"tx_id": "string","nonce": 0,"fee_rate": "string","sender_address": "string","sponsor_nonce": 0,"sponsored": true,"sponsor_address": "string","post_condition_mode": "allow","post_conditions": [{"principal": {"type_id": "principal_origin"},"condition_code": "sent_equal_to","amount": "string","type": "stx"}],"anchor_mode": "on_chain_only","block_hash": "string","block_height": 0,"block_time": 0,"block_time_iso": "string","burn_block_height": 0,"burn_block_time": 0,"burn_block_time_iso": "string","parent_burn_block_time": 0,"parent_burn_block_time_iso": "string","canonical": true,"tx_index": 0,"tx_status": "success","tx_result": {"hex": "string","repr": "string"},"event_count": 0,"parent_block_hash": "string","is_unanchored": true,"microblock_hash": "string","microblock_sequence": 0,"microblock_canonical": true,"execution_cost_read_count": 0,"execution_cost_read_length": 0,"execution_cost_runtime": 0,"execution_cost_write_count": 0,"execution_cost_write_length": 0,"events": [{"event_index": 0,"event_type": "smart_contract_log","tx_id": "string","contract_log": {"contract_id": "string","topic": "string","value": {"hex": "string","repr": "string"}}}],"tx_type": "token_transfer","token_transfer": {"recipient_address": "string","amount": "string","memo": "string"}}]}