Wallet API
Broadcast transaction

Broadcast transaction#

Broadcast the transaction to the chain, i.e., the transaction goes on the chain, making the user’s transaction information recorded on the chain effective.

Request URL#

POST https://www.okx.com/api/v5/waas/transaction/send-transaction

Request parameters#

ParameterTypeRequiredDescription
signedTxStringYesThe transaction string that has been signed
chainIdStringYesUnique identifier of the chain
walletIdStringYesUnique identifier of the wallet
addrFromStringYesTransaction from address
addrToStringYesTransaction to address
txHashStringYesTransaction hash
txAmountStringYesTransfer amount
serviceChargeStringYesService charge (minimum unit of main coin)
tokenAddressStringYesToken address
txTypeStringYesTransaction type
extJsonJson ObjectYesExtended parameters
>feeRateStringYesfee rate

Response parameters#

ParameterTypeDescription
orderIdStringUnique identifier of the transaction

Request example#

shell
curl --location 'https://www.okx.com/api/v5/waas/transaction/send-transaction' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--header 'OK-ACCESS-USER: 001-****-****-****-008' \
--header 'OK-ACCESS-KEY: 0c777c1f-****-****-****-53e2a39490ef' \
--header 'OK-ACCESS-PASSPHRASE: Q****3#' \
--header 'Content-Type: application/json' \
--data '{
  "signedTx": "08b47112567534ad041bbc6fa102394773c6d8f6d634320773af4da55efa",
  "walletId": "walletId_001",
  "addrFrom": "bc1qjlgnuyaugzfhnnjjnhrjc2333vfk4rv8h4f05d",
  "addrTo": "bc1qjlgnuyaugzfhnnjjnhrjc2333vfk4rv8h4f05d",
  "txHash": "a33ea20a5d9c1106e577f920816b4349fcda004f5c74e5896c47779e95220437",
  "txAmount": "31600000000000000",
  "chainId": "3",
  "txType": "transfer",
  "extJson": {
    "feeRate":35
  }
}'

Response example#

200
{
  "code": 0,
  "msg": "success",
  "data": [{
    "orderId""457825047189549056"
  }]
}