- APIs
- Stacks Blockchain API
- Estimate
Get approximate fees for the given transaction
RPC node
Get an estimated fee for the supplied transaction.
POST
Parameters
Body
application/jsontransaction_payload
REQUIRED
string
estimated_len
integer
Status code | Description |
---|---|
200 | Estimated fees for the transaction |
400 | Fee estimation error |
500 | Internal Server Error |
cURL
curl -L -X POST \"https://api.hiro.so/v2/fees/transaction" \-H 'Accept: application/json' \-H 'Content-Type: application/json' \-d '{"estimated_len": 350,"transaction_payload": "021af942874ce525e87f21bbe8c121b12fac831d02f4086765742d696e666f0b7570646174652d696e666f00000000"}'
Response
{"cost_scalar_change_by_byte": 0.00476837158203125,"estimated_cost": {"read_count": 19,"read_length": 4814,"runtime": 7175000,"write_count": 2,"write_length": 1020},"estimated_cost_scalar": 14,"estimations": [{"fee": 17,"fee_rate": 1.2410714285714286},{"fee": 125,"fee_rate": 8.958333333333332},{"fee": 140,"fee_rate": 10}]}