Skip to content

CoboGlobal/cobo-waas2-python-sdk

Repository files navigation

cobo-waas2-python-sdk

The Cobo Wallet-as-a-Service (WaaS) 2.0 API is the latest version of Cobo's WaaS API offering. It enables you to access Cobo's full suite of crypto wallet technologies with powerful and flexible access controls. By encapsulating complex security protocols and streamlining blockchain interactions, this API allows you to concentrate on your core business activities without worrying about the safety of your assets. The WaaS 2.0 API presents the following key features:

  • A unified API for Cobo's all four wallet types
  • Support for 80+ chains and 3000+ tokens
  • A comprehensive selection of webhook events
  • Flexible usage models for MPC Wallets, including Organization-Controlled Wallets and User-Controlled Wallets
  • Programmatic control of smart contract wallets such as Safe{Wallet} with fine-grained access controls
  • Seamlessly transfer funds across multiple exchanges, including Binance, OKX, Bybit, Deribit, and more

For more information about the WaaS 2.0 API, see Introduction to WaaS 2.0.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v2
  • Package version: 1.21.0
  • Generator version: 7.6.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.cobo.com/waas

Requirements.

Python 3.7+

Installation & Usage

pip install

pip install cobo-waas2==1.21.0

Then import the package:

import cobo_waas2

Getting Started

Please follow the installation procedure and then run the following:

import cobo_waas2
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.WalletsApi(api_client)
    wallet_type = cobo_waas2.WalletType.CUSTODIAL
    wallet_subtype = cobo_waas2.WalletSubtype.ASSET
    chain_ids = 'BTC,ETH'
    limit = 10
    before = ''
    after = ''

    try:
        # List supported chains
        api_response = api_instance.list_supported_chains(wallet_type=wallet_type, wallet_subtype=wallet_subtype, chain_ids=chain_ids, limit=limit, before=before, after=after)
        print("The response of WalletsApi->list_supported_chains:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->list_supported_chains: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.dev.cobo.com/v2

Class Method HTTP request Description
AddressBooksApi list_address_books GET /address_books List address book entries
AppWorkflowsApi create_approval_request POST /app/workflows/approval_requests Request workflow approval
AppWorkflowsApi get_approval_request_by_id GET /app/workflows/approval_requests/{approval_id} Get approval request details
AppWorkflowsApi list_app_workflows GET /app/workflows List app workflows
AppWorkflowsApi list_approval_requests GET /app/workflows/approval_requests List approval requests
AppWorkflowsApi revoke_approval_request POST /app/workflows/approval_requests/{approval_id}/revoke Revoke approval request
DevelopersApi get_api_key_info GET /developers/api_key_info Get API key information
DevelopersApi list_callback_messages GET /developers/callback_messages List all callback messages
DevelopersApi retry_callback_message POST /developers/callback_messages/{message_id}/retry Retry callback message
DevelopersWebhooksApi create_webhook_endpoint POST /webhooks/endpoints Register webhook endpoint
DevelopersWebhooksApi get_webhook_endpoint_by_id GET /webhooks/endpoints/{endpoint_id} Get webhook endpoint information
DevelopersWebhooksApi get_webhook_event_by_id GET /webhooks/endpoints/{endpoint_id}/events/{event_id} Retrieve event information
DevelopersWebhooksApi list_webhook_endpoints GET /webhooks/endpoints List webhook endpoints
DevelopersWebhooksApi list_webhook_event_definitions GET /webhooks/events/definitions Get webhook event types
DevelopersWebhooksApi list_webhook_event_logs GET /webhooks/endpoints/{endpoint_id}/events/{event_id}/logs List webhook event logs
DevelopersWebhooksApi list_webhook_events GET /webhooks/endpoints/{endpoint_id}/events List all webhook events
DevelopersWebhooksApi retry_webhook_event_by_id POST /webhooks/endpoints/{endpoint_id}/events/{event_id}/retry Retry event
DevelopersWebhooksApi trigger_test_webhook_event POST /webhooks/events/trigger Trigger test event
DevelopersWebhooksApi update_webhook_endpoint_by_id PUT /webhooks/endpoints/{endpoint_id} Update webhook endpoint
FeeStationApi estimate_fee_station_fee POST /fee_station/transactions/estimate_fee Estimate fee for Fee Station transaction
FeeStationApi get_fee_station_transaction_by_id GET /fee_station/transactions/{transaction_id} Get Fee Station transaction information
FeeStationApi list_fee_station_addresses GET /fee_station/addresses List Fee Station addresses
FeeStationApi list_fee_station_transactions GET /fee_station/transactions List all Fee Station transactions
FeeStationApi list_token_balances_for_fee_station GET /fee_station/tokens List Fee Station token balances
OAuthApi exchange_permission_token POST /oauth/permission_token/exchange Get Access Token
OAuthApi get_token GET /oauth/token Get Org Access Token
OAuthApi refresh_permission_token POST /oauth/permission_token/refresh Refresh Access Token
OAuthApi refresh_token POST /oauth/token Refresh Org Access Token
OrganizationsApi get_org_info GET /organizations/info Get organization information
PaymentApi cancel_refund_by_id PUT /payments/refunds/{refund_id}/cancel Cancel refund order
PaymentApi create_crypto_address POST /payments/crypto_addresses Create crypto address
PaymentApi create_forced_sweep_request POST /payments/force_sweep_requests Create forced sweep
PaymentApi create_merchant POST /payments/merchants Create merchant
PaymentApi create_payment_order POST /payments/orders Create pay-in order
PaymentApi create_refund POST /payments/refunds Create refund order
PaymentApi create_settlement_request POST /payments/settlement_requests Create settlement request
PaymentApi delete_crypto_address POST /payments/crypto_addresses/{crypto_address_id}/delete Delete crypto address
PaymentApi get_exchange_rate GET /payments/exchange_rates/{token_id}/{currency} Get exchange rate
PaymentApi get_payment_order_detail_by_id GET /payments/orders/{order_id} Get pay-in order information
PaymentApi get_refund_detail_by_id GET /payments/refunds/{refund_id} Get refund order information
PaymentApi get_refunds GET /payments/refunds List all refund orders
PaymentApi get_settlement_by_id GET /payments/settlement_requests/{settlement_request_id} Get settlement request information
PaymentApi get_settlement_info_by_ids GET /payments/settlement_info Get withdrawable balances
PaymentApi get_top_up_address GET /payments/topup/address Get top-up address
PaymentApi list_bank_accounts GET /payments/bank_accounts List all bank accounts
PaymentApi list_crypto_addresses GET /payments/crypto_addresses List crypto addresses
PaymentApi list_forced_sweep_requests GET /payments/force_sweep_requests List forced sweeps
PaymentApi list_merchants GET /payments/merchants List all merchants
PaymentApi list_payment_orders GET /payments/orders List all pay-in orders
PaymentApi list_payment_supported_tokens GET /payments/supported_tokens List all supported tokens
PaymentApi list_settlement_details GET /payments/settlement_details List all settlement details
PaymentApi list_settlement_requests GET /payments/settlement_requests List all settlement requests
PaymentApi list_top_up_payers GET /payments/topup/payers List payers
PaymentApi update_merchant_by_id PUT /payments/merchants/{merchant_id} Update merchant
PaymentApi update_payment_order PUT /payments/orders/{order_id} Update pay-in order
PaymentApi update_refund_by_id PUT /payments/refunds/{refund_id} Update refund order information
PaymentApi update_top_up_address PUT /payments/topup/address Update top-up address
PrimeBrokerApi change_guard_pubkey PUT /prime_broker/user/{user_id}/guard_pubkey Change Guard pubkey binding
PrimeBrokerApi create_guard_pubkey POST /prime_broker/user/{user_id}/guard_pubkey Create Guard pubkey binding
PrimeBrokerApi create_prime_broker_address POST /prime_broker/user/{user_id}/addresses Bind addresses to a broker user
PrimeBrokerApi delete_guard_pubkey POST /prime_broker/user/{user_id}/guard_pubkey/delete Delete Guard pubkey binding
PrimeBrokerApi query_approval_statement GET /prime_broker/approval_statement/{statement_id} Query approval statement
PrimeBrokerApi query_guard_pubkey GET /prime_broker/user/{user_id}/guard_pubkey Query a Guard pubkey
StakingsApi create_babylon_airdrop_registration POST /stakings/protocols/babylon/airdrops/registrations Register for Babylon airdrop
StakingsApi create_babylon_staking_registration POST /stakings/protocols/babylon/stakings/registrations Register for Babylon Phase-2
StakingsApi create_claim_activity POST /stakings/activities/claim Create claim activity
StakingsApi create_stake_activity POST /stakings/activities/stake Create stake activity
StakingsApi create_unstake_activity POST /stakings/activities/unstake Create unstake activity
StakingsApi create_withdraw_activity POST /stakings/activities/withdraw Create withdraw activity
StakingsApi get_babylon_airdrop_registration_by_id GET /stakings/protocols/babylon/airdrops/registrations/{registration_id} Get Babylon airdrop registration details
StakingsApi get_babylon_staking_registration_by_id GET /stakings/protocols/babylon/stakings/registrations/{registration_id} Get Babylon Phase-2 registration details
StakingsApi get_staking_activity_by_id GET /stakings/activities/{activity_id} Get staking activity details
StakingsApi get_staking_by_id GET /stakings/{staking_id} Get staking position details
StakingsApi get_staking_estimation_fee POST /stakings/estimate_fee Estimate staking fees
StakingsApi get_staking_estimation_fee_v2 POST /stakings/estimate_fee_v2 Estimate staking fees v2
StakingsApi get_staking_pool_by_id GET /stakings/pools/{pool_id} Get staking pool details
StakingsApi list_babylon_airdrop_registrations GET /stakings/protocols/babylon/airdrops/registrations List Babylon airdrop registrations
StakingsApi list_babylon_eligible_airdrops GET /stakings/protocols/babylon/airdrops/eligibles List wallets eligible for Babylon airdrop
StakingsApi list_babylon_eligible_stakings GET /stakings/protocols/babylon/stakings/eligibles List staking positions eligible for Babylon Phase-2
StakingsApi list_babylon_staking_registrations GET /stakings/protocols/babylon/stakings/registrations List Babylon Phase-2 registrations
StakingsApi list_staking_activities GET /stakings/activities List staking activities
StakingsApi list_staking_pools GET /stakings/pools List staking pools
StakingsApi list_stakings GET /stakings List staking positions
TransactionsApi broadcast_signed_transactions POST /transactions/broadcast Broadcast signed transactions
TransactionsApi cancel_transaction_by_id POST /transactions/{transaction_id}/cancel Cancel transaction
TransactionsApi check_loop_transfers GET /transactions/check_loop_transfers Check Cobo Loop transfers
TransactionsApi create_contract_call_transaction POST /transactions/contract_call Call smart contract
TransactionsApi create_message_sign_transaction POST /transactions/message_sign Sign message
TransactionsApi create_transfer_transaction POST /transactions/transfer Transfer token
TransactionsApi drop_transaction_by_id POST /transactions/{transaction_id}/drop Drop transaction
TransactionsApi estimate_fee POST /transactions/estimate_fee Estimate transaction fee
TransactionsApi get_transaction_approval_detail GET /transactions/{transaction_id}/approval_detail Get transaction approval details
TransactionsApi get_transaction_by_id GET /transactions/{transaction_id} Get transaction information
TransactionsApi list_transaction_approval_details GET /transactions/approval_details List transaction approval details
TransactionsApi list_transactions GET /transactions List all transactions
TransactionsApi resend_transaction_by_id POST /transactions/{transaction_id}/resend Resend transaction
TransactionsApi sign_and_broadcast_transaction_by_id POST /transactions/{transaction_id}/sign_and_broadcast Sign and broadcast transaction
TransactionsApi speedup_transaction_by_id POST /transactions/{transaction_id}/speedup Speed up transaction
TravelRuleApi get_transaction_limitation GET /travel_rule/transaction/limitation Retrieve transaction limitations
TravelRuleApi list_supported_countries GET /travel_rule/transaction/countries List supported countries
TravelRuleApi submit_deposit_travel_rule_info POST /travel_rule/transaction/deposit/travel_rule_info Submit Travel Rule information for deposits
TravelRuleApi submit_withdraw_travel_rule_info POST /travel_rule/transaction/withdraw/travel_rule_info Submit Travel Rule information for withdrawals
WalletsApi batch_check_utxo POST /wallets/{wallet_id}/utxos/batch_check Batch check UTXOs
WalletsApi check_address_chains_validity GET /wallets/check_address_chains_validity Check address validity across chains
WalletsApi check_address_validity GET /wallets/check_address_validity Check address validity
WalletsApi check_addresses_validity GET /wallets/check_addresses_validity Check addresses validity
WalletsApi create_address POST /wallets/{wallet_id}/addresses Create addresses in wallet
WalletsApi create_token_listing_request POST /wallets/tokens/listing_requests Create token listing request
WalletsApi create_wallet POST /wallets Create wallet
WalletsApi delete_wallet_by_id POST /wallets/{wallet_id}/delete Delete wallet
WalletsApi get_chain_by_id GET /wallets/chains/{chain_id} Get chain information
WalletsApi get_max_transferable_value GET /wallets/{wallet_id}/max_transferable_value Get maximum transferable value
WalletsApi get_max_transferable_value_with_fee_model POST /wallets/{wallet_id}/max_transferable_value_with_fee_model Estimate maximum transferable value
WalletsApi get_token_by_id GET /wallets/tokens/{token_id} Get token information
WalletsApi get_token_listing_request_by_request_id GET /wallets/tokens/listing_requests/{request_id} Get token listing request
WalletsApi get_wallet_by_id GET /wallets/{wallet_id} Get wallet information
WalletsApi list_address_balances_by_token GET /wallets/{wallet_id}/tokens/{token_id} List address balances by token
WalletsApi list_addresses GET /wallets/{wallet_id}/addresses List wallet addresses
WalletsApi list_enabled_chains GET /wallets/enabled_chains List enabled chains
WalletsApi list_enabled_tokens GET /wallets/enabled_tokens List enabled tokens
WalletsApi list_supported_chains GET /wallets/chains List supported chains
WalletsApi list_supported_tokens GET /wallets/tokens List supported tokens
WalletsApi list_token_balances_for_address GET /wallets/{wallet_id}/addresses/{address}/tokens List token balances by address
WalletsApi list_token_balances_for_wallet GET /wallets/{wallet_id}/tokens List token balances by wallet
WalletsApi list_token_listing_requests GET /wallets/tokens/listing_requests List token listing requests
WalletsApi list_utxos GET /wallets/{wallet_id}/utxos List UTXOs
WalletsApi list_wallets GET /wallets List all wallets
WalletsApi lock_utxos POST /wallets/{wallet_id}/utxos/lock Lock UTXOs
WalletsApi refresh_address_balances_by_token PUT /wallets/{wallet_id}/tokens/{token_id}/refresh_address_balances Refresh address balances by token
WalletsApi unlock_utxos POST /wallets/{wallet_id}/utxos/unlock Unlock UTXOs
WalletsApi update_wallet_by_id PUT /wallets/{wallet_id} Update wallet
WalletsExchangeWalletApi list_asset_balances_for_exchange_wallet GET /wallets/{wallet_id}/exchanges/assets List asset balances
WalletsExchangeWalletApi list_exchanges GET /wallets/exchanges List supported exchanges
WalletsExchangeWalletApi list_supported_assets_for_exchange GET /wallets/exchanges/{exchange_id}/assets List supported assets
WalletsExchangeWalletApi list_supported_chains_for_exchange GET /wallets/exchanges/{exchange_id}/assets/{asset_id}/chains List supported chains
WalletsMPCWalletsApi cancel_tss_request_by_id POST /wallets/mpc/vaults/{vault_id}/tss_requests/{tss_request_id}/cancel Cancel TSS request
WalletsMPCWalletsApi create_key_share_holder_group POST /wallets/mpc/vaults/{vault_id}/key_share_holder_groups Create key share holder group
WalletsMPCWalletsApi create_mpc_project POST /wallets/mpc/projects Create project
WalletsMPCWalletsApi create_mpc_vault POST /wallets/mpc/vaults Create vault
WalletsMPCWalletsApi create_tss_request POST /wallets/mpc/vaults/{vault_id}/tss_requests Create TSS request
WalletsMPCWalletsApi delete_key_share_holder_group_by_id POST /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id}/delete Delete key share holder group
WalletsMPCWalletsApi get_key_share_holder_by_tss_node_id GET /wallets/mpc/vaults/{vault_id}/key_share_holders/{tss_node_id} Get key share holder information
WalletsMPCWalletsApi get_key_share_holder_group_by_id GET /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} Get key share holder group information
WalletsMPCWalletsApi get_mpc_project_by_id GET /wallets/mpc/projects/{project_id} Get project information
WalletsMPCWalletsApi get_mpc_vault_by_id GET /wallets/mpc/vaults/{vault_id} Get vault information
WalletsMPCWalletsApi get_tss_request_by_id GET /wallets/mpc/vaults/{vault_id}/tss_requests/{tss_request_id} Get TSS request
WalletsMPCWalletsApi list_cobo_key_holders GET /wallets/mpc/cobo_key_share_holders List all Cobo key share holders
WalletsMPCWalletsApi list_key_share_holder_groups GET /wallets/mpc/vaults/{vault_id}/key_share_holder_groups List all key share holder groups
WalletsMPCWalletsApi list_key_share_holders GET /wallets/mpc/vaults/{vault_id}/key_share_holders List all key share holders
WalletsMPCWalletsApi list_mpc_projects GET /wallets/mpc/projects List all projects
WalletsMPCWalletsApi list_mpc_vaults GET /wallets/mpc/vaults List all vaults
WalletsMPCWalletsApi list_tss_requests GET /wallets/mpc/vaults/{vault_id}/tss_requests List TSS requests
WalletsMPCWalletsApi update_key_share_holder_group_by_id PUT /wallets/mpc/vaults/{vault_id}/key_share_holder_groups/{key_share_holder_group_id} Update key share holder group
WalletsMPCWalletsApi update_mpc_project_by_id PUT /wallets/mpc/projects/{project_id} Update project name
WalletsMPCWalletsApi update_mpc_vault_by_id PUT /wallets/mpc/vaults/{vault_id} Update vault name
WalletsSmartContractWalletsApi list_safe_wallet_delegates POST /wallets/{wallet_id}/smart_contracts/delegates List Delegates

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

CoboAuth

  • Type: API key
  • API key parameter name: BIZ-API-KEY
  • Location: HTTP header

CoboSignature

  • Type: API key
  • API key parameter name: BIZ-API-SIGNATURE
  • Location: HTTP header

CoboNonce

  • Type: API key
  • API key parameter name: BIZ-API-NONCE
  • Location: HTTP header

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: https://auth.cobo.com/authorize
  • Scopes:
  • address_book.read: Read address book
  • api_key.read: Read API key information
  • callback.read: Read callback message
  • callback.resend: Resend callback message
  • wallet.create: Create wallet
  • wallet.read: Read wallet information
  • wallet.update: Update wallet information
  • wallet.delete: Delete wallet information
  • wallet.create_address: Create wallet address
  • wallet.manage_utxo: Manage UTXO
  • mpc_project.create: Create MPC project
  • mpc_project.read: Read MPC project information
  • mpc_project.update: Update MPC project information
  • mpc_vault.create: Create MPC Vault
  • mpc_vault.read: Read MPC Vault information
  • mpc_vault.update: Update MPC Vault information
  • mpc_key_group.create: Create MPC key group
  • mpc_key_group.read: Read MPC key group information
  • mpc_key_group.update: Update MPC key group information
  • mpc_key_group.delete: Delete MPC key group information
  • transaction.read: Read transaction information
  • transaction.withdraw: Make withdrawals
  • transaction.estimate_fee: Estimate transaction fee
  • transaction.contract_call: Initiate contract calls
  • transaction.message_sign: Initiate message signings
  • transaction.stake: Stake assets
  • transaction.unstake: Unstake assets
  • transaction.unstake_withdraw: Withdraw unstaked assets
  • transaction.manage: Manage ongoing transactions
  • transaction.update: Update transaction notes
  • travel_rule.read: Read travel rule information
  • travel_rule.edit: Edit travel rule information
  • webhook.read: Read webhook URLs/events
  • webhook.edit: Edit webhook URLs
  • webhook.resend: Resend webhook events
  • payment_orders_payin.create: Create pay-in order
  • payment_orders_payin.read: Read pay-in order information
  • payment_orders_payin.update: Update pay-in order
  • payment_orders_refund.create: Create payment refund order
  • payment_orders_refund.read: Read payment refund order information
  • payment_settlement.create: Create payment settlement request
  • payment_settlement.read: Read payment settlement request information
  • payment_merchant.create: Create payment merchant
  • payment_merchant.read: Read payment merchant information
  • payment_merchant.update: Update payment merchant
  • payment_force_sweep.create: Create payment force sweep request
  • payment_force_sweep.read: Read payment force sweep request information

Author

help@cobo.com

About

WaaS2 Python SDK

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages