More resources
Get data required for signature

Get data required for signature#

Query some data required for signature, Includes fee rates and other information required for BTC transaction

Request URL#

POST https://www.okx.com/api/v5/waas/transaction/get-sign-info

Request parameters#

ParameterTypeRequiredDescription
chainIdStringYesUnique identifier of the chain
addrFromStringYesFrom address for the transaction
addrToStringYesTo address for the transaction
txAmountStringYesTransaction amount
extJsonJson ObjectNoExtended parameters

Response parameters#

ParameterTypeDescription
normalFeeRateStringNormal fee rate
maxFeeRateStringMax fee rate
minFeeRateObjectMin fee rate
inscriptionOutputStringInscription output size
minOutputStringMin output
normalCostStringNormal cost
maxCostBooleanMax cost
minCostObjectMin cost

Request example#

shell
curl --location --request POST 'https://www.okx.com/api/v5/waas/transaction/get-sign-info' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z' \
--data '{
  "addrFrom": "bc1qkcg8puz0y5m6gl8lw2ah27q932yd229v8sfhhxp8tfpwugz5ukwspuyst5",
  "addrTo": "bc1qkcg8puz0y5m6gl8lw2ah27q932yd229v8sfhhxp8tfpwugz5ukwspuyst5",
  "txAmount": "31600000000000000",
  "chainId": 0,
  "extJson": {
  }
}'

Response example#

200
{
  "code": 0,
  "msg": "",
  "data": [{
    "normalFeeRate": 27,
    "maxFeeRate": 35,
    "minFeeRate": 22,
    "inscriptionOutput": "546",
    "minOutput": "1500",
    "normalCost": "1800",
    "maxCost": "3600",
    "minCost": "600"
  }]
}