estimateFee - Dash
Example code for the estimateFee WebSocket method. Complete guide on how to use the estimateFee WebSocket method in the GetBlock Web3 documentation.
Returns fee-rate estimates for one or more confirmation-block targets over WebSocket.
Parameters
blocks
array
Yes
Array of confirmation targets, e.g. [1, 6, 12]
Message
wscat -c wss://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>
# then send:
{
"id": "getblock.io",
"method": "estimateFee",
"params": {
"blocks": [
1,
6,
12
],
"specific": {
"conservative": true,
"txsize": 1278
}
}
}Response
Response Fields
feePerTx
string
Estimated total fee in duffs for a transaction of the supplied txsize
feePerUnit
string
Estimated fee rate in duffs per kilobyte, not per byte
Results are returned in the same order as the requested blocks targets.
Use Cases
Fee Selection: Fetch several targets at once
Wallets: Offer fee tiers
Batching: Pick economical fees
Error Handling
error
Bad request
The targets are invalid
403 / RBAC: access denied
Access denied
The GetBlock access token is missing or incorrect
Last updated
Was this helpful?