Skip to main content

/v2/fees/transaction REST API Endpoint

Get approximate fees for the given transaction.

Updated on
Oct 4, 2023

/v2/fees/transaction REST API Endpoint

Body Parameters

Content-Type
application/json
The content type
transaction_payload
string
The transaction payload
estimated_len
integer
The estimated length value

Returns

object
POST response containing the estimated fee for a transaction
estimated_cost_scalar
integer
The estimated cost scalar value
cost_scalar_change_by_byte
decimal
The cost scalar change per byte
estimated_cost
object
The estimated cost object
read_count
integer
The count of read operations
read_length
integer
The length of read operations
runtime
integer
The runtime cost
write_count
integer
The count of write operations
write_length
integer
The length of write operations
estimations
array
An array of estimations
fee_rate
number
The fee rate of the principal that deployed the contract
fee
number
The fee of the principal that deployed the contract
Request
1
curl -X 'POST' \
2
'https://docs-demo.stacks-mainnet.quiknode.pro/v2/fees/transaction' \
3
-H 'Content-Type: application/json' \
4
--data-raw '{
5
"estimated_len": 350,
6
"transaction_payload": "021af942874ce525e87f21bbe8c121b12fac831d02f4086765742d696e666f0b7570646174652d696e666f00000000"
7
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free