Skip to main content
POST

Request

String
required
coin code
Int
transaction amount in decimal places (e.g. one bitcoin is divisible to eight decimal places, and 100000000 represents 1 BTC)
String
deposit address
String
Cobo ID of a transaction designated as RBF, this parameter is used when attempting to speed up or drop a previous transaction
String
from address
For UTXO model, the inputs in the transaction will be selected from the from_address based on either the amount or to_address_details. If this parameter is not provided, the inputs will be selected from the addresses in the current wallet. If the sending amount is greater than the balance, this endpoint will return error code 12007.

For Account model, if the sum of sending amount and transaction fee (gas_price * gas_limit) is greater than the balance of the from_address, the blockchain may return insufficient funds error, and this endpoint will return default transaction fee, please note that the default transaction fee might not be very accurate compared to the fee obtained directly from the blockchain.
Json
list of addresses used for receiving coins associated with the UTXO model; this value must be a JSON string and has a parameter type that fits. Please note that the to_address_details parameter and amount parameter are alternative.
Sample
For UTXO model, the parameters from_address, amount, to_address_details, and input_selection will determine the number of bytes in the transaction, and the fee_amount is determined by the fee_per_byte and the number of bytes.
Float
transaction fees per byte; applicable to UTXO model
If specified, the fee_amount in the custom field of the response will be based on the fee parameter and the number of bytes in the transaction.
Int
gas price; applicable to account model; unit: wei
Int
gas limit, applicable to account model
Json
UTXO Model:
  1. input_selection: inputs to be excluded and included in transactions associated with the UTXO model; inputs must be in correspondence with from_address (if specified); it must be a JSON string and has a structure that fits InputSelection
  2. inputs_to_spend: UTXO you want as input. Please note that the length of the list of UTXOs should be less than or equal to 100.
    • tx_hash: Transaction tx_hash
    • vout_n: UTXO index
  3. inputs_to_exclude: UTXO you don’t want as input
    • tx_hash: Transaction tx_hash
    • vout_n: UTXO index
Sample
Web3 wallet:
  • calldata: request data associated with an EVM contract.
Sample
If specified, the gas_limit in the response will be determined by the calldata.

Response

bool
request successful or failed
object