Skip to main content
POST
/
transactions
/
transfer
import cobo_waas2
from cobo_waas2.models.create_transfer_transaction201_response import (
    CreateTransferTransaction201Response,
)
from cobo_waas2.models.transfer_params import TransferParams
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.TransactionsApi(api_client)
    transfer_params = cobo_waas2.TransferParams(
        request_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
        source=cobo_waas2.TransferSource(
            cobo_waas2.CustodialTransferSource(
                source_type="Asset", wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479"
            )
        ),
        token_id="ETH_USDT",
        destination=cobo_waas2.TransferDestination(
            cobo_waas2.AddressTransferDestination(destination_type="Address", account_output=cobo_waas2.AddressTransferDestinationAccountOutput(address="19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku",amount="1.5"))
        ),
    )

    try:
        # Transfer token
        api_response = api_instance.create_transfer_transaction(
            transfer_params=transfer_params
        )
        print("The response of TransactionsApi->create_transfer_transaction:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling TransactionsApi->create_transfer_transaction: %s\n"
            % e
        )

{
  "request_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "transaction_id": "c986cb3b-1301-412f-9450-13a52c43a95f",
  "status": "Submitted"
}
import cobo_waas2
from cobo_waas2.models.create_transfer_transaction201_response import (
    CreateTransferTransaction201Response,
)
from cobo_waas2.models.transfer_params import TransferParams
from cobo_waas2.rest import ApiException
from pprint import pprint

# See configuration.py for a list of all supported configurations.
configuration = cobo_waas2.Configuration(
    # Replace `<YOUR_PRIVATE_KEY>` with your private key
    api_private_key="<YOUR_PRIVATE_KEY>",
    # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2.
    host="https://api.dev.cobo.com/v2",
)
# Enter a context with an instance of the API client
with cobo_waas2.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = cobo_waas2.TransactionsApi(api_client)
    transfer_params = cobo_waas2.TransferParams(
        request_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
        source=cobo_waas2.TransferSource(
            cobo_waas2.CustodialTransferSource(
                source_type="Asset", wallet_id="f47ac10b-58cc-4372-a567-0e02b2c3d479"
            )
        ),
        token_id="ETH_USDT",
        destination=cobo_waas2.TransferDestination(
            cobo_waas2.AddressTransferDestination(destination_type="Address", account_output=cobo_waas2.AddressTransferDestinationAccountOutput(address="19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku",amount="1.5"))
        ),
    )

    try:
        # Transfer token
        api_response = api_instance.create_transfer_transaction(
            transfer_params=transfer_params
        )
        print("The response of TransactionsApi->create_transfer_transaction:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling TransactionsApi->create_transfer_transaction: %s\n"
            % e
        )

Authorizations

BIZ-API-KEY
string
header
required

The API key. For more details, refer to API key.

In the API playground, enter your API secret, and your API key will be accordingly calculated.

Body

application/json

The request body to create a transfer transaction

The information about a token transfer.

request_id
string
required

The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

source
object
required

The information about the transaction source types Asset. Refer to Transaction sources and destinations for a detailed introduction about the supported sources and destinations for each transaction type.

Switch between the tabs to display the properties for different transaction sources.

  • Asset
  • Web3
  • Org-Controlled/User-Controlled
  • Safe{Wallet}
  • Main/Sub
token_id
string
required

The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens. For transfers from Exchange Wallets, this property value represents the asset ID.

Example:

"ETH_USDT"

destination
object
required

The information about the transaction destination type Address. Refer to Transaction sources and destinations for a detailed introduction about the supported sources and destinations for each transaction type.

You need to specify either the account_output property or the utxo_outputs property.

You can transfer tokens to multiple addresses only if you use MPC Wallets as the transaction source. To do this, you should use the utxo_outputs property to specify the destination addresses.

Switch between the tabs to display the properties for different transaction destinations.

  • Address
  • CustodialWallet
  • ExchangeWallet
category_names
string[]

The custom category for you to identify your transactions.

description
string

The description of the transfer.

Example:

"Transfer from wallet"

fee
object

The preset properties to limit transaction fee.

In the fixed fee model, the transaction fee is a fixed amount within a certain amount of period regardless of the transaction size or network congestion, which can vary between different chains. For more information about the fixed fee model, refer to Fee models.

You can specify the maximum fee amount to limit the transaction fee. The transaction will fail if the transaction fee exceeds the specified maximum fee amount.

Switch between the tabs to display the properties for different transaction fee models.

  • Fixed
  • EVM_EIP_1559
  • EVM_Legacy
  • UTXO
  • SOL
  • FIL
transaction_process_type
enum<string>

Transaction processing type. Possible values are:

  • AutoProcess (default): After the transaction is constructed, it will be automatically signed and broadcast.
  • BuildOnly: Set to this value if you want to build the transaction first without automatically signing and broadcasting it. You can manually call the Sign and broadcast transaction operation to complete the signing and broadcasting process.
Available options:
AutoProcess,
BuildOnly
Example:

"AutoProcess"

auto_fuel
enum<string>

The mode of transaction fee payment using Fee Station. Currently, Fee Station supports EVM-compatible and TRON transactions initiated from MPC Wallets (Organization-Controlled) and Custodial Wallets (Web3 Wallets). For more details, refer to Fee Station.

  • ProActiveAutoFuel: Always use Fee Station to pay transaction fees.
  • PassiveAutoFuel: Use Fee Station only when the source address balance is insufficient to cover the transaction fees.
  • UsePortalPreference: Use payment preferences set on Cobo Portal.

Please note that the TRON chain does not support PassiveAutoFuel due to its fee delegation mechanism.

Available options:
PassiveAutoFuel,
ProActiveAutoFuel,
UsePortalPreference
Example:

"PassiveAutoFuel"

Response

The request was successful.

request_id
string
required

The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

transaction_id
string
required

The transaction ID.

Example:

"c986cb3b-1301-412f-9450-13a52c43a95f"

status
enum<string>
required

The transaction status. For more details including sub-statuses, please refer to Transaction statuses and sub-statuses.

Available options:
Submitted,
PendingScreening,
PendingAuthorization,
PendingSignature,
Broadcasting,
Confirming,
Completed,
Failed,
Rejected,
Pending
Example:

"Submitted"