Skip to main content
PUT
/
wallets
/
{wallet_id}
import cobo_waas2
from cobo_waas2.models.update_wallet_params import UpdateWalletParams
from cobo_waas2.models.wallet_info import WalletInfo
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.WalletsApi(api_client)
    wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    update_wallet_params = cobo_waas2.UpdateWalletParams(
        cobo_waas2.UpdateCustodialWalletParams(wallet_type="Custodial")
    )

    try:
        # Update wallet
        api_response = api_instance.update_wallet_by_id(
            wallet_id, update_wallet_params=update_wallet_params
        )
        print("The response of WalletsApi->update_wallet_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->update_wallet_by_id: %s\n" % e)

{
  "wallet_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "wallet_type": "Custodial",
  "wallet_subtype": "Asset",
  "name": "Example Wallet",
  "org_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "enable_auto_sweep": true
}
import cobo_waas2
from cobo_waas2.models.update_wallet_params import UpdateWalletParams
from cobo_waas2.models.wallet_info import WalletInfo
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.WalletsApi(api_client)
    wallet_id = "f47ac10b-58cc-4372-a567-0e02b2c3d479"
    update_wallet_params = cobo_waas2.UpdateWalletParams(
        cobo_waas2.UpdateCustodialWalletParams(wallet_type="Custodial")
    )

    try:
        # Update wallet
        api_response = api_instance.update_wallet_by_id(
            wallet_id, update_wallet_params=update_wallet_params
        )
        print("The response of WalletsApi->update_wallet_by_id:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->update_wallet_by_id: %s\n" % e)

Authorizations

Authorization
string
header
required

The Org Access Token. Use this authorization method only if you are developing Cobo Portal Apps for installation and use across different organizations.

Path Parameters

wallet_id
string<uuid>
required

The wallet ID.

Body

application/json

The request body.

  • Custodial Wallets
  • MPC Wallets
  • Smart Contract Wallets
  • Exchange Wallets

The information of Custodial Wallets.

wallet_type
enum<string>
required

The wallet type. Possible values include:

Available options:
Custodial,
MPC,
SmartContract,
Exchange
Example:

"Custodial"

name
string

The wallet name.

Example:

"My WaaS 2.0 Wallet"

enable_auto_sweep
boolean

Enable the auto sweep feature for the wallet

Response

Successfully updated address

  • Custodial Wallets
  • MPC Wallets
  • Safe Wallets
  • Exchange Wallets

The basic information of a wallet.

wallet_id
string<uuid>
required

The wallet ID.

Example:

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

wallet_type
enum<string>
required

The wallet type. Possible values include:

Available options:
Custodial,
MPC,
SmartContract,
Exchange
Example:

"Custodial"

wallet_subtype
enum<string>
required

The wallet sub-type. Possible values include:

  • Asset: Custodial Wallets (Asset Wallets).
  • Web3: Custodial Wallets (Web3 Wallets).
  • Org-Controlled: MPC Wallets (Organization-Controlled Wallets).
  • User-Controlled: MPC Wallets (User-Controlled Wallets).
  • Safe{Wallet}: Smart Contract Wallets (Safe).
  • Main: Exchange Wallets (Main Account).
  • Sub: Exchange Wallets (Sub Account).

Each wallet sub-type requires a different set of properties. Switch between the above tabs for details.

Available options:
Asset,
Web3,
Org-Controlled,
User-Controlled,
Safe{Wallet},
Main,
Sub
Example:

"Asset"

name
string
required

The wallet name.

Example:

"Example Wallet"

org_id
string
required

The ID of the owning organization.

Example:

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

enable_auto_sweep
boolean

Enable the auto sweep feature for the wallet