Skip to main content
GET
/
stakings
/
activities
/
{activity_id}
import cobo_waas2
from cobo_waas2.models.activity import Activity
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.StakingsApi(api_client)
    activity_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Get staking activity details
        api_response = api_instance.get_staking_activity_by_id(activity_id)
        print("The response of StakingsApi->get_staking_activity_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling StakingsApi->get_staking_activity_by_id: %s\n" % e
        )

{
  "id": "0011039d-27fb-49ba-b172-6e0aa80e37ec",
  "initiator": "steve@example.com",
  "initiator_type": "API",
  "type": "Stake",
  "wallet_id": "0111039d-27fb-49ba-b172-6e0aa80e37ec",
  "address": "0xAbCdE123456789aBcDeF123456789aBcDeF12345",
  "pool_id": "babylon_btc_signet",
  "token_id": "BTC",
  "staking_id": "0011039d-27fb-49ba-b172-6e0aa80e37ec",
  "request_ids": [
    "f47ac10b-58cc-4372-a567-0e02b2c3d479"
  ],
  "amount": "100.00",
  "transaction_ids": [
    "0011039d-27fb-49ba-b172-6e0aa80e37ec"
  ],
  "timeline": [
    {
      "action": "Submitted",
      "status": "success",
      "timestamp": 1640995200000,
      "transaction_id": "aff0e1cb-15b2-4e1f-9b9d-a9133715986f"
    }
  ],
  "fee": {
    "fee_type": "EVM_EIP_1559",
    "token_id": "TRON",
    "max_fee_amount": "0.1"
  },
  "status": "Success",
  "extra": {
    "pool_type": "Babylon",
    "finality_provider_public_key": "eca1b104dce16c30705f4147a9c4a373ac88646c5d1bcda6a89c018940cb96a0",
    "stake_block_time": 2000,
    "auto_broadcast": false
  },
  "created_timestamp": 1640995200000,
  "updated_timestamp": 1640995200000
}
import cobo_waas2
from cobo_waas2.models.activity import Activity
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.StakingsApi(api_client)
    activity_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"

    try:
        # Get staking activity details
        api_response = api_instance.get_staking_activity_by_id(activity_id)
        print("The response of StakingsApi->get_staking_activity_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print(
            "Exception when calling StakingsApi->get_staking_activity_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

activity_id
string
required

The activity ID.

Response

A staking activity has been successfully retrieved.

The staking activity.

pool_id
enum<string>
required

The ID of the staking pool. A staking pool is a pairing of a staking protocol and a specific type of token. Currently, berachain_bgt and berachain_bgt_testnet are not supported.

Available options:
babylon_btc_signet,
babylon_btc,
beacon_eth,
beacon_eth_holesky,
core_btc,
core_xtn,
sky_farm_eth_usdc,
bithive_signet,
bithive,
beacon_bera,
beacon_bera_testnet,
berachain_bgt,
berachain_bgt_testnet
Example:

"babylon_btc_signet"

token_id
string
required

The token ID.

Example:

"BTC"

amount
string
required

The staking amount.

Example:

"100.00"

status
enum<string>
required

The status of the staking activity. Possible values include:

  • Success: The activity is successfully completed.
  • Processing: The activity is being processed.
  • Failed: The activity has failed.
Available options:
Success,
Processing,
Failed
Example:

"Success"

id
string

The activity ID.

Example:

"0011039d-27fb-49ba-b172-6e0aa80e37ec"

initiator
string

The initiator of the activity.

Example:

"steve@example.com"

initiator_type
enum<string>

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"

type
enum<string>

The type of the staking activity. Possible values include:

  • Stake: Stake tokens.
  • Unstake: Unstake tokens. Unstaked tokens are still in the staking protocol.
  • Withdraw: Withdraw tokens from the staking protocol to your wallet.
  • Claim: Claim rewards from the staking protocol.
Available options:
Stake,
Unstake,
Withdraw,
Claim
Example:

"Stake"

wallet_id
string

The staker's wallet ID.

Example:

"0111039d-27fb-49ba-b172-6e0aa80e37ec"

address
string

The staker's wallet address.

Example:

"0xAbCdE123456789aBcDeF123456789aBcDeF12345"

staking_id
string

The ID of the corresponding staking position.

Example:

"0011039d-27fb-49ba-b172-6e0aa80e37ec"

request_ids
string[]

The request IDs of the corresponding transactions of the activity.

transaction_ids
string[]

The IDs of the corresponding transactions of the activity.

timeline
object[]

The timeline of the activity.

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
extra
object

The base information about a staking protocol. The staking information specific to the Babylon protocol.

  • Babylon
  • Ethereum Beacon Chain
  • CoreBTC
created_timestamp
integer

The time when the activity was created.

Example:

1640995200000

updated_timestamp
integer

The time when the activity was last updated.

Example:

1640995200000