Estimate-tx-fee

Estimate the transaction fee for current layer 1 or layer 2 asset transfer.

POST /api/estimate-tx-fee

Headers

NameValue

Content-Type

application/json

Authorization

token

Request Body

NameTypeRequiredDescription

wallet_id

string

true

The end user's wallet id

amount

int

false

the amount of satoshi to send in case of type 1

type

int

true

1 layer 1 btc transfer; 2 layer 2 taproot asset transfer

fee_rate

int

true

satoshi cost per byte

Response Body

NameTypeDescription

tx_fee

int

estimated tx_fee for this transaction

Request Demo

{
  "wallet_id": "10e21d53-82d3-43d6-99bc-03ea6945d902",
  "type": 1,
  "amount": 20000,
  "fee_rate": 21
}

Response Demo

{
    "code": 0,
    "data": {
        "tx_fee": 1512
    },
    "message": "",
    "traceid": "e8857f31-91ee-47ea-975c-d05f6328d9fb"
}

Last updated