Get Transactions
Request a paginated list of transactions related to a collection of HD accounts and/or loose addresses and/or public keys.
Note that loose addresses that are also part of one of the HD accounts requested will be ignored. Their transactions are listed as part of the HD account result.
GET /txs?active=...Parameters
Section titled “Parameters”- active -
string- A pipe-separated list of extended public keys and/or loose addresses and/or pubkeys (xpub1|address1|address2|pubkey1|...) - page -
integer- Index of the requested page (first page is index 0) - count -
integer- Number of transactions returned per page - excludeNullXfer -
boolean- Boolean flag indicating if transactions that don’t change the balance should be excluded from the result (default = false) - at -
string(optional) - Access Token (json web token). Required if authentication is activated. Alternatively, the access token can be passed through theAuthorizationHTTP header (with theBearerscheme).
Examples
Section titled “Examples”GET /txs?active=xpub0123456789GET /txs?active=xpub0123456789|address1|address2|pubkey1Success
Section titled “Success”Status code 200 with JSON response:
{ "n_tx": 153, "page": 2, "n_tx_page": 50, "txs": [ { "block_height": 100000, "hash": "abcdef", "version": 1, "locktime": 0, "result": -10000, "time": 1400000000, "inputs": [ { "vin": 1, "prev_out": { "txid": "abcdef", "vout": 2, "value": 20000, "xpub": { "m": "xpubABCDEF", "path": "M/0/3" }, "addr": "1xAddress", "pubkey": "04Pubkey" }, "sequence": 4294967295 } ], "out": [ { "n": 2, "value": 10000, "addr": "1xAddress", "pubkey": "03Pubkey" "xpub": { "m": "xpubABCDEF", "path": "M/1/5" } } ] } ]}Notes
- The transaction
inputsandoutarrays are for known addresses only and do not reflect the full input and output list of the transaction on the blockchain result.txs[i].block_heightshould not be present for unconfirmed transactionsresult.txs[i].resultis the change in value for the “wallet” as defined by all entries on theactivequery parameterresult.txs[i].inputs[j].prev_out.addrshould be present for BIP47-related addresses but may benullif the previous output address is unknownresult.txs[i].out[j].addrshould be present for BIP47-related addresses
Failure
Section titled “Failure”Status code 400 with JSON response:
{ "status": "error", "error": "<error message>"}