Skip to main content
POST
/
wallets
import cobo_waas2
from cobo_waas2.models.create_wallet_params import CreateWalletParams
from cobo_waas2.models.created_wallet_info import CreatedWalletInfo
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)
    create_wallet_params = cobo_waas2.CreateWalletParams(
        cobo_waas2.CreateCustodialWalletParams(
            name="My WaaS 2.0 Wallet", wallet_type="Custodial", wallet_subtype="Asset"
        )
    )

    try:
        # Create wallet
        api_response = api_instance.create_wallet(
            create_wallet_params=create_wallet_params
        )
        print("The response of WalletsApi->create_wallet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->create_wallet: %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.create_wallet_params import CreateWalletParams
from cobo_waas2.models.created_wallet_info import CreatedWalletInfo
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)
    create_wallet_params = cobo_waas2.CreateWalletParams(
        cobo_waas2.CreateCustodialWalletParams(
            name="My WaaS 2.0 Wallet", wallet_type="Custodial", wallet_subtype="Asset"
        )
    )

    try:
        # Create wallet
        api_response = api_instance.create_wallet(
            create_wallet_params=create_wallet_params
        )
        print("The response of WalletsApi->create_wallet:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WalletsApi->create_wallet: %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.

Body

application/json

The request body to create a wallet

  • Custodial Wallets
  • MPC Wallets
  • Exchange Wallets

The information of Custodial Wallets.

name
string
required

The wallet name.

Example:

"My WaaS 2.0 Wallet"

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"

enable_auto_sweep
boolean

Enable the auto-sweep feature for the wallet. This parameter only applies to MPC Wallets and Web3 Wallets.

Response

The request was successful.

  • Custodial Wallets
  • MPC 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