More resources
Get data required for signature

Get data required for signature#

Query some data required for signature, including on-chain data (such as the current height required by some chains) and address-related data (such as nonce).

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
>inputdataStringNocallData for making contract call

Response parameters#

ParameterTypeDescription
gasLimtStringGas Limit
nonceStringCurrent number
gasPriceObjectGas Price
>normalStringMedium gasPrice
>minStringLow gasPrice
>maxStringHigh gasPrice
>supportEip1559BooleanWhether to support 1559
>erc1559ProtocolObject1559 protocol

erc1559Protocol

ParameterTypeDescription
erc1559ProtocolObject1559 protocol
>suggestBaseFeeStringSuggested base fee
>baseFeeStringBase fee
>proposePriorityFeeStringMedium tip
>safePriorityFeeStringLow tip
>fastPriorityFeeStringHigh tip

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-raw '{
  "addrFrom": "0x383c8208b4711256753b70729ba0cf0cda55efad",
  "addrTo": "0x4ad041bbc6fa102394773c6d8f6d634320773af4",
  "txAmount": "31600000000000000",
  "chainId": "1",
  "extJson": {
      "inputData": "041bbc6fa102394773c6d8f6d634320773af4"
  }
}'

Response example#

200
{
  "code": 0,
  "msg": "success",
  "data": [{
    "gasLimit": "21000",
    "nonce": "0",
    "gasPrice": {
      "normal": "12694000000",
      "min": "9340000000",
      "max": "17318000000",
      "supportEip1559": "true",
      "erc1599Protocol": {
        "suggestBaseFee": "8840000000",
        "proposePriorityFee": "760000000",
        "safePriorityFee": "500000000",
        "fastPriorityFee": "2290000000",
        "baseFee": "8840000000"
      }
    }
  }]
}