Query Transaction Average Fee

Query average blockchain fee within latest N blocks.


POST /v1/sofa/wallets/{WALLET_ID}/autofee

Post Body

block_numintoptional, default 1, range 1~30Get average blockchain fee within latest N blocks

Response Body

auto_feestringMining fee denominated in the smallest cryptocurrency unit

Error Code

HTTP CodeError CodeErrorMessageDescription
403-Forbidden. Invalid wallet ID-No wallet ID found
403-Forbidden. Header not found-Missing X-API-CODE, X-CHECKSUM header or query param t
403-Forbidden. Invalid timestamp-The timestamp t is not in the valid time range
403-Forbidden. Invalid checksum-The request is considered a replay request
403-Forbidden. Invalid API code-X-API-CODE header contains invalid API code
403-Invalid API code for wallet {WALLET_ID}-The API code mismatched
403-Forbidden. Checksum unmatch-X-CHECKSUM header contains wrong checksum
403-Forbidden. Call too frequently ({THROTTLING_COUNT} calls/minute)-Send requests too frequently
400112Invalid parameter-The block_num is out of range

Sample Request



Post Body

  "block_num": 1

Response Body

  "auto_fee": "1"

Sample cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"block_num":1}' \