Skip to main content
GET
/
webhooks
/
endpoints
/
{endpoint_id}
/
events
/
{event_id}
import cobo_waas2
from cobo_waas2.models.webhook_event import WebhookEvent
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.DevelopersWebhooksApi(api_client)
    event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Retrieve event information
        api_response = api_instance.get_webhook_event_by_id(event_id, endpoint_id)
        print("The response of DevelopersWebhooksApi->get_webhook_event_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling DevelopersWebhooksApi->get_webhook_event_by_id: %s\n"
            % e
        )

{
  "event_id": "8f2e919a-6a7b-4a9b-8c1a-4c0b3f5b8b1f",
  "url": "https://example.com/webhook",
  "created_timestamp": 1701396866000,
  "type": "wallets.transaction.created",
  "data": {
    "data_type": "Transaction",
    "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
  },
  "status": "Success",
  "next_retry_timestamp": 1701396866000,
  "retries_left": 3
}
import cobo_waas2
from cobo_waas2.models.webhook_event import WebhookEvent
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.DevelopersWebhooksApi(api_client)
    event_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    endpoint_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Retrieve event information
        api_response = api_instance.get_webhook_event_by_id(event_id, endpoint_id)
        print("The response of DevelopersWebhooksApi->get_webhook_event_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling DevelopersWebhooksApi->get_webhook_event_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

event_id
string<uuid>
required

The event ID. You can obtain a list of event IDs by calling List all events.

endpoint_id
string<uuid>
required

The webhook endpoint ID. You can retrieve a list of webhook endpoint IDs by calling List webhook endpoints.

Response

The webhook event information is successfully retrieved.

The webhook event payload.

url
string<url>
required

The webhook endpoint URL.

Maximum length: 500
Example:

"https://example.com/webhook"

created_timestamp
integer
required

The time when the event was triggered, in Unix timestamp format (milliseconds).

  • The value remains unchanged across retries.
  • The default webhook timeout is 2 seconds.
Example:

1701396866000

type
enum<string>
required

The event type. To learn the trigger condition of each event type, refer to Webhook event types and event data.

Currently, you can only trigger test webhook events with the event data types Transaction and TSSRequest.

Available options:
wallets.transaction.created,
wallets.transaction.updated,
wallets.transaction.failed,
wallets.transaction.succeeded,
wallets.mpc.tss_request.created,
wallets.mpc.tss_request.updated,
wallets.mpc.tss_request.failed,
wallets.mpc.tss_request.succeeded,
wallets.addresses.created,
wallets.created,
wallets.token_listing.failed,
wallets.token_listing.succeeded,
mpc_vaults.created,
fee_station.transaction.created,
fee_station.transaction.updated,
fee_station.transaction.failed,
fee_station.transaction.succeeded,
wallet.token.enabled,
wallet.chain.enabled,
wallet.mpc.balance.updated,
wallet.web3.balance.updated,
wallet.token.disabled,
wallet.chain.disabled,
token.suspended.deposit,
token.suspended.withdraw,
payment.transaction.created,
payment.transaction.late,
payment.transaction.completed,
payment.transaction.held,
payment.status.updated,
payment.refund.status.updated,
payment.settlement.status.updated,
payment.address.updated,
compliance.disposition.status.updated
Example:

"wallets.transaction.created"

data
object
required

The data type of the event. The information about a transaction.

  • Transaction
  • TSSRequest
  • Addresses
  • WalletInfo
  • MPCVault
  • Chains
  • Tokens
  • Token Listing Event Data
  • BalanceUpdateInfo
  • SuspendedToken
  • Pay-In Order
  • Refund
  • Settlement
  • Payment Transaction
  • Top-Up Address Update
  • Compliance Disposition Event Data
event_id
string<uuid>

The event ID.

Example:

"8f2e919a-6a7b-4a9b-8c1a-4c0b3f5b8b1f"

status
enum<string>

The event status. Possible values include:

  • Success: The event has been delivered, and the webhook endpoint has responded to the event.
  • Retrying: The event has been delivered, but the webhook endpoint has not responded. In this case, Cobo will retry delivering the event.
  • Failed: The event cannot be delivered and Cobo will stop retrying. This may occur if the number of retries reaches 10, or if the event has been delivered but the webhook endpoint responded with an error.
Available options:
Success,
Retrying,
Failed
Example:

"Success"

next_retry_timestamp
integer

The timestamp indicating the next scheduled retry to deliver this event, in Unix timestamp format, measured in milliseconds. This field is only present if the event status is Retrying.

Example:

1701396866000

retries_left
integer

The number of retries left. This field is only present if the event status is Retrying.

Example:

3