Skip to main content
GET
/
transactions
/
{transaction_id}
import cobo_waas2
from cobo_waas2.models.transaction_detail import TransactionDetail
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)
    transaction_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Get transaction information
        api_response = api_instance.get_transaction_by_id(transaction_id)
        print("The response of TransactionsApi->get_transaction_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TransactionsApi->get_transaction_by_id: %s\n" % e)

{
  "transaction_id": "aff0e1cb-15b2-4e1f-9b9d-a9133715986f",
  "cobo_id": "20231213122855000000000000000000",
  "request_id": "760a1955-e212-4dfb-a8d0-e66312a1a051",
  "wallet_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "type": "Deposit",
  "status": "Submitted",
  "sub_status": "PendingDoubleCheck",
  "failed_reason": "Rejected by signer Cobo TSS",
  "chain_id": "ETH",
  "token_id": "ETH_USDT",
  "asset_id": "USDT",
  "source": {
    "source_type": "DepositFromAddress",
    "wallet_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479"
  },
  "destination": {
    "destination_type": "Address",
    "account_output": {
      "address": "19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sL4Ku",
      "memo": "82840924",
      "amount": "1.5"
    },
    "utxo_outputs": [
      {
        "address": "19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sDEMO",
        "amount": "1.5"
      }
    ],
    "change_address": "19AR6YWEGbSoY8UT9Ksy9WrmrZPD5sDEMO",
    "force_internal": false,
    "force_external": false
  },
  "result": {
    "result_type": "Signature",
    "signature": "0x6a8d82c2b080c18e7c1d187a95b3d9b0b9b20454d5e1d784b8a4625d16772d3f"
  },
  "fee": {
    "fee_type": "EVM_EIP_1559",
    "token_id": "ETH",
    "effective_gas_price": "100000000",
    "fee_used": "0.1",
    "estimated_fee_used": "0.1",
    "gas_used": "100000000",
    "max_fee_per_gas": "9000000000000",
    "max_priority_fee_per_gas": "1000000000000",
    "gas_limit": "21000"
  },
  "initiator": "API Prod Key #1",
  "initiator_type": "API",
  "confirmed_num": 12,
  "confirming_threshold": 15,
  "transaction_hash": "239861be9a4afe080c359b7fe4a1d035945ec46256b1a0f44d1267c71de8ec28",
  "block_info": {
    "block_number": 123,
    "block_timestamp": 1717740319,
    "block_hash": "0xc9ee947f8bb6027c161888bf0d004bec05e7c2beec7e6b187dc512174e438735"
  },
  "raw_tx_info": {
    "used_nonce": 9,
    "selected_utxos": [
      {
        "tx_hash": "7014d7d9b91862d7131f7543d84da3bec60e20be93c23ad01167c48b778fdemo",
        "vout_n": 0,
        "address": "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE",
        "value": "0.5",
        "redeem_script": "0x1cc56cbbac4622082221a8768d1d0901",
        "revealed_script": "0x1cc56cbbac4622082221a8768d1d0901"
      }
    ],
    "raw_tx": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO",
    "unsigned_raw_tx": "0xa22cb4650000000000000000000000001e0049783f008a0085193e00003d00cd54003c71000000000000000000000000000000000000000000000000000000000000DEMO",
    "utxo_change": {
      "address": "2N2xFZtbCFB6Nb3Pj9Sxsx5mX2fxX3yEgkE",
      "value": "0.5"
    }
  },
  "replacement": {
    "replaced_by_type": "Resend",
    "replaced_by_transaction_id": "aff0e1cb-15b2-4e1f-9b9d-a9133715986f",
    "replaced_by_transaction_hash": "239861be9a4afe080c359b7fe4a1d035945ec46256b1a0f44d1267c71de8ec28",
    "replaced_type": "Resend",
    "replaced_transaction_id": "aff0e1cb-15b2-4e1f-9b9d-a9133715986f",
    "replaced_transaction_hash": "239861be9a4afe080c359b7fe4a1d035945ec46256b1a0f44d1267c71de8ec28"
  },
  "category": [
    "Payment"
  ],
  "description": "withdrawal to exchange trading account",
  "is_loop": false,
  "cobo_category": [
    "AutoFueling"
  ],
  "extra": [
    "{\"extra_type\":\"BabylonBusinessInfo\",\"btc_address_info\":{\"address\":\"tb1p8k9f36798z5wkfd3mlq00cjm82c7sp5hudlqaxkdvfw4xaywvw4qzzv2xz\",\"chain_id\":\"SIGNET_BTC\",\"memo\":\"\",\"path\":\"44/1/5/0/4\",\"encoding\":\"ENCODING_P2TR\",\"pubkey\":\"xpub6FkyaGRDyh4hayxmbY4YX7q9fuuxt14dNoYv5TphsKLnChVXSaTxY7DPwdeN8Yys5FLhfuajG8pshdXWk9cTzBFUy5rVA4Lx9kwmFUqhZcC\",\"x_only_pubkey\":\"\",\"root_pubkey\":\"xpub661MyMwAqRbcGFdLxNuuQvnPTLFs1xHpFQz5iumoDnw4NPofkE8SSrtwUmoy3E52HtcxCH9wXCfhztuuiuusvB3kAb4nt9rT4bkXxujubKm\",\"taproot_script_tree_hash\":\"\",\"taproot_internal_address\":\"\"}}\n"
  ],
  "fueling_info": {
    "request_id": "gas_760a1955-e212-4dfb-a8d0-e66312a1a051",
    "transaction_id": "b0530b27-104f-4338-87de-de01500326ea",
    "main_transaction_id": "b0530b27-104f-4338-87de-de01500326ea"
  },
  "created_timestamp": 1610445878970,
  "updated_timestamp": 1610445878970,
  "timeline": [
    {
      "status": "Submitted",
      "finished": true,
      "finished_timestamp": 1610445878970
    }
  ]
}
import cobo_waas2
from cobo_waas2.models.transaction_detail import TransactionDetail
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)
    transaction_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Get transaction information
        api_response = api_instance.get_transaction_by_id(transaction_id)
        print("The response of TransactionsApi->get_transaction_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling TransactionsApi->get_transaction_by_id: %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.

Path Parameters

transaction_id
string<uuid>
required

The transaction ID.

Response

The information about a transaction.

transaction_id
string<uuid>
required

The transaction ID.

Example:

"aff0e1cb-15b2-4e1f-9b9d-a9133715986f"

wallet_id
string
required

For deposit transactions, this property represents the wallet ID of the transaction destination. For transactions of other types, this property represents the wallet ID of the transaction source.

Example:

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

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"

source
object
required

Information about the transaction source type 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
  • DepositFromAddress
  • DepositFromWallet
  • DepositFromLoop
destination
object
required

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.

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

  • Address
  • Wallet
  • EVM_Contract
  • SOL_Contract
  • Cosmos Contract
  • EVM_EIP_191_Signature
  • EVM_EIP_712_Signature
  • Raw_Message_Signature
  • DepositToAddress
  • DepositToWallet
  • BTC_BIP_137_Signature
  • BTC_BIP_322_Signature
  • COSMOS_ADR_36_Signature
  • STELLAR_Contract
initiator_type
enum<string>
required

The transaction initiator type. Possible values include:

  • API: An API initiator, who initiates the transaction by using the WaaS API.
  • Web: An web initiator, who initiates the transaction from Cobo Portal.
  • App: An App initiator, who initiates the transaction from Cobo Portal Apps.
  • External: An external initiator, who initiates the transaction outside Cobo.
Available options:
API,
Web,
App,
External
Example:

"API"

created_timestamp
integer
required

The time when the transaction was created, in Unix timestamp format, measured in milliseconds.

Example:

1610445878970

updated_timestamp
integer
required

The time when the transaction was updated, in Unix timestamp format, measured in milliseconds.

Example:

1610445878970

cobo_id
string

The Cobo ID, which can be used to track a transaction.

Example:

"20231213122855000000000000000000"

request_id
string

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:

"760a1955-e212-4dfb-a8d0-e66312a1a051"

type
enum<string>

The transaction type. Possible values include:

  • Deposit: A deposit transaction.
  • Withdrawal: A withdrawal transaction.
  • ContractCall: A transaction that interacts with a smart contract.
  • MessageSign: A transaction that signs a message.
  • ExternalSafeTx: A transaction to a Smart Contract Wallet (Safe{Wallet}) that requires one or multiple signatures to be executed.
  • Stake: A transaction that creates a staking request.
  • Unstake: A transaction that creates a unstaking request.
Available options:
Deposit,
Withdrawal,
ContractCall,
MessageSign,
ExternalSafeTx,
Stake,
Unstake
Example:

"Deposit"

sub_status
enum<string>

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

Available options:
RejectedKYT,
PendingDoubleCheck,
PendingSpenderCheck,
PendingRiskControlCheck,
PendingApproverCheck,
RejectedCoboCheck,
RejectedByCobo,
RejectedWhiteList,
RejectedDoubleCheck,
RejectedSpenderAuth,
RejectedRiskControlCheck,
RejectedApproverAuth,
RejectedbyMobileCosigner,
Built,
PendingWaitSigner,
PendingApprovalStart,
PendingSignerApproval,
PendingSignerProcessing,
RejectedBySigner,
FailedBySigner,
FailedSignerTimeout,
FailedBroadcasting,
FailedOnChain,
Reverting,
Queue,
InsufficientBalance,
InsufficientBalanceFundLocked,
PendingSystemProcessing,
SystemProcessingOngoing,
PendingBlockConfirmations,
ReOrged,
ReplacedByNewTransaction,
CanceledBySpender,
CanceledByAPI,
OnchainRejection,
RejectedTravelRule,
RejectedTravelRuleDueToCompliance,
PendingTravelRuleInfo,
PendingTravelRuleCheck,
RejectedTravelRuleDueToUnsupportedToken,
SignatureVerificationSuccess,
SignatureVerificationFailed,
PendingCoboCheck,
RejectedTransactionPolicy,
RejectedByScreeningApp,
PendingScreeningAppCheck,
PendingCoboKYTCheck,
RejectedByCoboKYT,
PendingCoboTravelRuleCheck
Example:

"PendingDoubleCheck"

failed_reason
string

(This property is applicable to approval failures and signature failures only) The reason why the transaction failed.

Example:

"Rejected by signer Cobo TSS"

chain_id
string

The chain ID, which is the unique identifier of a blockchain. You can retrieve the IDs of all the chains you can use by calling List enabled chains.

Example:

"ETH"

token_id
string

The token ID, which is the unique identifier of a token. You can retrieve the IDs of all the tokens you can use by calling List enabled tokens.

Example:

"ETH_USDT"

asset_id
string

(This concept applies to Exchange Wallets only) The asset ID. An asset ID is the unique identifier of the asset held within your linked exchange account.

Example:

"USDT"

result
object

The result of a message signing transaction.

fee
object

The transaction fee actually charged by the chain that uses the EIP-1559 fee model.

For more information about the EIP-1559 fee model, see Fee models.

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

  • EVM_EIP_1559
  • EVM_Legacy
  • UTXO
  • Fixed
  • SOL
  • FIL
initiator
string

The transaction initiator.

Example:

"API Prod Key #1"

confirmed_num
integer

The number of confirmations this transaction has received.

Example:

12

confirming_threshold
integer

The minimum number of confirmations required to deem a transaction secure. The common threshold is 6 for a Bitcoin transaction.

Example:

15

transaction_hash
string

The transaction hash.

Example:

"239861be9a4afe080c359b7fe4a1d035945ec46256b1a0f44d1267c71de8ec28"

block_info
object

The information about the transaction block.

raw_tx_info
object

The raw transaction information.

replacement
object
category
string[]

A custom transaction category for you to identify your transfers more easily.

description
string

The description for your transaction.

Example:

"withdrawal to exchange trading account"

is_loop
boolean

Whether the transaction was executed as a Cobo Loop transfer.

  • true: The transaction was executed as a Cobo Loop transfer.
  • false: The transaction was not executed as a Cobo Loop transfer.
Example:

false

cobo_category
string[]

The transaction category defined by Cobo. Possible values include:

  • AutoSweep: An auto-sweep transaction.
  • AutoFueling: A transaction where Fee Station pays transaction fees to an address within your wallet.
  • AutoFuelingRefund: A refund for an auto-fueling transaction.
  • SafeTxMessage: A message signing transaction to authorize a Smart Contract Wallet (Safe{Wallet}) transaction.
  • BillPayment: A transaction to pay Cobo bills through Fee Station.
  • BillRefund: A refund for a previously made bill payment.
  • CommissionFeeCharge: A transaction to charge commission fees via Fee Station.
  • CommissionFeeRefund: A refund of previously charged commission fees.
extra
string[]

A list of JSON-encoded strings containing structured, business-specific extra information for the transaction. Each item corresponds to a specific data type, indicated by the extra_type field in the JSON object (for example, "BabylonBusinessInfo", "BtcAddressInfo").

fueling_info
object

Details of the auto-fueling transaction that provides gas for the current transaction.

timeline
object[]