Download OpenAPI specification:Download
Get STX tokens for the testnet
address required | string STX address |
stacking | boolean Default: false Request the amount of STX needed for stacking |
{- "success": true,
- "txId": "0xf2f0402f9f4c4d43b382690c4f7b97e24d5ff5dd5c619e3615daa64dca7ef4bc",
- "txRaw": "80800000000400164247d6f2b425ac5771423ae6c80c754f7172b0000000000000003200000000000000b400008537046ff1008368baaa3ff2235122c556b89dad4f9df0639b924cf32a44b866497e49846b24191e711b21faaae96ca0542e4a140168484740b94211cececb3303020000000000051ab52c45b1a7977204f17ac0b6f48306aea2dbb8e9000000000007a12046617563657400000000000000000000000000000000000000000000000000000000"
}
Get BTC tokens for the testnet
address required | string BTC address |
{- "success": true,
- "txId": "0xf2f0402f9f4c4d43b382690c4f7b97e24d5ff5dd5c619e3615daa64dca7ef4bc",
- "txRaw": "80800000000400164247d6f2b425ac5771423ae6c80c754f7172b0000000000000003200000000000000b400008537046ff1008368baaa3ff2235122c556b89dad4f9df0639b924cf32a44b866497e49846b24191e711b21faaae96ca0542e4a140168484740b94211cececb3303020000000000051ab52c45b1a7977204f17ac0b6f48306aea2dbb8e9000000000007a12046617563657400000000000000000000000000000000000000000000000000000000"
}
Get 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';
limit | integer max number of transactions to fetch |
offset | integer index of first transaction to fetch |
type | Array of strings Items Enum: "coinbase" "token_transfer" "smart_contract" "contract_call" "poison_microblock" Filter by transaction type |
unanchored | boolean Default: false Include transaction data from unanchored (i.e. unconfirmed) microblocks |
{- "limit": 10,
- "offset": 0,
- "total": 101922,
- "results": [
- {
- "tx_id": "0x20dedbef812e44d712569224411b27324b68ab4667321a4badd5e81ba76bf0eb",
- "nonce": 269,
- "fee_rate": "0",
- "sender_address": "SPQXK10DBF5ECAM30XVE3EJA8DNZF3VE0BK4MKV",
- "sponsored": false,
- "post_condition_mode": "deny",
- "post_conditions": [ ],
- "anchor_mode": "on_chain_only",
- "is_unanchored": false,
- "block_hash": "0x28a9e2749b82bdc058776781a5abd5c9a6efed38f05545a8a51152655b8e1f4b",
- "parent_block_hash": "0x3789b75ccfe7f2acf85c3f069fd5b8f95f73aba5332fa618243957d1c017a2a3",
- "block_height": 21709,
- "burn_block_time": 1626286436,
- "burn_block_time_iso": "2021-07-14T18:13:56.000Z",
- "canonical": true,
- "tx_index": 0,
- "tx_status": "success",
- "tx_result": {
- "hex": "0x0703",
- "repr": "(ok true)"
}, - "microblock_hash": "",
- "microblock_sequence": 2147483647,
- "microblock_canonical": true,
- "event_count": 0,
- "events": [ ],
- "tx_type": "coinbase",
- "coinbase_payload": {
- "data": "0x0000000000000000000000000000000000000000000000000000000000000000"
}
}
]
}
Get all recently-broadcast mempool transactions
sender_address | string Filter to only return transactions with this sender address. |
recipient_address | string Filter to only return transactions with this recipient address (only applicable for STX transfer tx types). |
address | string Filter to only return transactions with this address as the sender or recipient (recipient only applicable for STX transfer tx types). |
limit | integer max number of mempool transactions to fetch |
offset | integer index of first mempool transaction to fetch |
unanchored | boolean Default: false Include transaction data from unanchored (i.e. unconfirmed) microblocks |
{- "limit": 96,
- "offset": 0,
- "total": 5,
- "results": [
- {
- "tx_id": "0xb31df5a363dad31723324cb5e0eefa04d491519fd30827a521cbc830114aa50c",
- "tx_status": "pending",
- "tx_type": "token_transfer",
- "receipt_time": 1598288370,
- "receipt_time_iso": "2020-08-24T16:59:30.000Z"