dcr

Decred (DCR)

Method: POST searchrawtransactions

dropdown

POST searchrawtransactions

Returns raw data for transactions involving the passed address. Returned transactions are pulled from both the database, and transactions currently in the mempool. Transactions pulled from the mempool will have the "confirmations" field set to 0. Usage of this RPC requires the optional --addrindex flag to be activated, otherwise all responses will simply return with an error stating the address index has not yet been built up. Similarly, until the address index has caught up with the current best height, all requests will return an error response in order to avoid serving stale data.

Each request is limited to a maximum of 10000 transactions. Callers may use the skip parameter in subsequent requests to access additional data if access to more results is required.

Parameters

address - string

Decred address.

verbose - int

Optional, default=true

specifies the transaction is returned as a JSON object instead of hex-encoded string.

skip - int

Optional, default=0

the number of leading transactions to leave out of the final response.

count - int

Optional, default=100, max=10000

the maximum number of transactions to return.

vinextra - int

Optional, default=0

specify that extra data from previous output will be returned in vin.

reverse - boolean

Optional, default=false

specify that the transactions should be returned in reverse chronological order.

filteraddrs - json array

Optional.

specify that only inputs or outputs with matching addresses should be returned.

Request

curl --location --request POST 'https://dcr.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "searchrawtransactions",
"params": [null, true, 0, 100, 0, false, null],
"id": "getblock.io"}'


Response

{
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": null
}