Overview
WalletAPIClient is an async Python client built on a generated OpenAPI SDK. It handles authentication, request routing, and response unwrapping across all API domains.
Basic usage
async. Use async with WalletAPIClient(...) as client: to ensure the HTTP session is closed cleanly.
Constructor
API base URL (for example,
https://api.agenticwallet.cobo.com).X-API-Key header value for authentication. Required unless allow_unauthenticated=True.When
True, allows requests without an API key. Use only for unauthenticated endpoints such as ping().Request timeout in seconds.
Service credential for admin-only operations such as
create_principal().Context manager
Health methods
ping()
Ping the API. No authentication required.
health_check()
Get detailed system health status.
Wallet methods
list_wallets()
List all wallets accessible to the authenticated principal.
The number of items to skip before returning results. Range: [0, 100000].
The maximum number of items to return. Range: [1, 200].
Whether to include archived wallets.
True: include archived. False: exclude archived.get_wallet()
Get detailed information about a specific wallet by its ID.
The wallet UUID. Retrieve it by calling
list_wallets().When
True, includes per-delegation spending summaries in the response.create_wallet()
Create a new wallet. Wallet provisioning is asynchronous — the initial response returns status=preparing; the wallet transitions to status=active once key generation completes.
The wallet type. Use
MPC.The wallet name. Max 255 characters.
The MPC key share scheme.
AGENT (2-of-2): agent TSS node + Cobo, suitable for automated wallets. HUMAN (2-of-2): mobile TSS node + Cobo, suitable for human-controlled wallets. Defaults to AGENT.The TSS node ID of the agent’s main device. Required when
wallet_type=MPC.Arbitrary key-value metadata to associate with the wallet.
When
True, creates the wallet on behalf of the principal’s linked owner. When False, the wallet is created for the principal itself.update_wallet()
Update the name or metadata of a specific wallet.
The wallet UUID. Retrieve it by calling
list_wallets().Update payload containing the fields to change.
create_wallet_address()
Derive a new on-chain address for the specified wallet and chain.
The wallet UUID. Retrieve it by calling
list_wallets().The Cobo chain ID for the new address (for example,
SETH, BASE_ETH, SOL). Use list_chains() to retrieve all supported chain IDs.list_wallet_addresses()
List all on-chain addresses associated with a specific wallet.
The wallet UUID. Retrieve it by calling
list_wallets().get_wallet_node_status()
Get the online status of the TSS node associated with a specific wallet.
The wallet UUID. Retrieve it by calling
list_wallets().initiate_wallet_pair()
Initiate wallet ownership pairing and obtain a one-time pairing token for the user to enter in the Cobo Agentic Wallet app.
The wallet pair initiation payload. Must include the wallet UUID.
confirm_wallet_pair()
Confirm wallet ownership pairing after the user has entered the pairing token.
The wallet pair confirmation payload.
get_pair_info()
Get pairing info by a one-time pairing token.
The one-time pairing token.
get_pair_info_by_wallet()
Get pairing info by wallet UUID.
The wallet UUID.
wallet_reshare()
Initiate a TSS key reshare for the specified wallet.
The wallet UUID.
The new TSS node ID to reshare to.
wallet_tss_callback()
Report a TSS request callback result to the platform.
The wallet UUID.
The TSS request ID.
The TSS request status code.
TSS result items.
Failure reason strings, if any.
Balance methods
list_balances()
List cached token balances across all wallets accessible to the authenticated principal. Balances are synchronized from on-chain data and may be slightly delayed.
Filter balances by wallet ID. Retrieve it by calling
list_wallets().Filter balances by chain ID (for example,
SETH, BASE_ETH).Filter balances by on-chain address.
Filter balances by token ID (for example,
SETH, SETH_USDC).When
True and address is provided, forces a fresh sync of balances from on-chain before returning results.The maximum number of items to return. Range: [1, 200].
The number of items to skip before returning results.
Transaction methods
transfer_tokens()
Initiate a token transfer from the specified wallet. Gas fees are covered automatically. Returns HTTP 202 with status=pending_approval when an approval policy requires human review.
The wallet UUID. Retrieve it by calling
list_wallets().The destination on-chain address.
The transfer amount as a decimal string (for example,
1.5).The Cobo token ID (for example,
SETH, SETH_USDC, SOLDEV_SOL_USDC). Use list_assets() to retrieve all supported token IDs.The chain ID. Automatically resolved from
token_id if omitted.A client-supplied idempotency key. If a transfer with the same
request_id already exists for this wallet and principal, the existing record is returned with idempotent=true.Custom fee parameters. If omitted, the network default is used.
The source address to transfer from. If omitted, the wallet’s most recently created address for this chain is used.
Whether to use Cobo Gasless (Fee Station) to cover gas fees. Defaults to
True for human-owned wallets, False for agent-owned wallets.Optional gas provider identifier when sponsored gas is supported.
A human-readable description of the transfer.
estimate_transfer_fee()
Estimate the network fee for a token transfer without submitting it. Returns recommended, slow, and fast fee options. Policy evaluation runs — an error is returned if a policy would deny the equivalent transfer.
The wallet UUID. Retrieve it by calling
list_wallets().The destination on-chain address.
The transfer amount as a decimal string.
The Cobo token ID.
The chain ID. Automatically resolved from
token_id if omitted.The source address. If omitted, the wallet’s most recently created address for this chain is used.
contract_call()
Submit a smart contract call from the specified wallet. For EVM chains, provide contract_addr, value, and calldata. For Solana, provide instructions and optionally address_lookup_table_accounts. Returns HTTP 202 with status=pending_approval when an approval policy requires human review.
The wallet UUID. Retrieve it by calling
list_wallets().The Cobo chain ID (for example,
SETH, BASE_ETH, SOL).The EVM contract address. Required for EVM contract calls.
The ETH value to send with the call, as a decimal string in the smallest unit. Defaults to
0.The ABI-encoded calldata for EVM contract calls, as a hex string.
Solana instructions for the contract call. Required for Solana contract calls.
Solana address lookup table accounts.
A client-supplied idempotency key.
Custom fee parameters. If omitted, the network default is used.
The source address. If omitted, the wallet’s most recently created address for this chain is used.
Whether to use Cobo Gasless to cover gas fees. Defaults to
True for human-owned wallets, False for agent-owned wallets.Optional gas provider identifier when sponsored gas is supported.
Optional human-readable description for auditability.
estimate_contract_call_fee()
Estimate the network fee for a contract call without submitting it. Policy evaluation runs — an error is returned if a policy would deny the equivalent call.
drop_transaction()
Attempt to cancel a pending transaction by replacing it with a zero-value transaction at a higher fee.
The wallet UUID.
The transaction UUID to drop. Retrieve it from the
list_transaction_records() response.A client-supplied idempotency key.
Custom fee to use for the replacement transaction.
The Cobo-internal transaction ID.
speedup_transaction()
Speed up a pending transaction by rebroadcasting it with a higher fee.
The wallet UUID.
The transaction UUID to speed up.
The new fee to use. Must be higher than the original.
A client-supplied idempotency key.
The Cobo-internal transaction ID.
message_sign()
Sign a message or EIP-712 typed data using the wallet’s key.
The wallet UUID.
The Cobo chain ID.
The message destination type.
EIP-712 typed data to sign.
The source address to sign from.
A human-readable description of the signing request.
When
True, waits for the signing result before returning. When False, returns immediately — poll via the transaction ID.A client-supplied idempotency key.
payment()
Create a payment request. Supports the x402 and MPP protocols.
The wallet UUID.
The payment protocol identifier.
A client-supplied idempotency key.
The raw
PAYMENT-REQUIRED header value from an x402 server response.The
WWW-Authenticate header value from an MPP server response.An existing MPP session object to resume.
list_recent_addresses()
List recently used destination addresses for a wallet.
The wallet UUID.
The maximum number of addresses to return.
handle_waas_webhook()
Handle an incoming WaaS webhook event.
The webhook request body as a parsed dict.
The business timestamp from the webhook header.
The business response signature from the webhook header.
Transaction record methods
list_transaction_records()
List on-chain transaction records including transfers, contract calls, and deposits. When wallet_uuid is omitted, records across all wallets visible to the authenticated principal are returned.
Filter records by wallet ID. When omitted, records from all wallets are returned.
A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip before returning results. Range: [0, 100000].
The maximum number of items to return. Range: [1, 200].
Filter by transaction status. Possible values:
created, submitted, broadcasting, success, failed, rejected. If omitted, all statuses are returned.Filter by transaction type. Possible values:
transfer, contract_call, deposit. If omitted, all types are returned.Filter by token ID (for example,
SETH, SETH_USDC).Filter by chain ID (for example,
SETH, BASE_ETH).Filter by on-chain address.
When
True, includes extended fields in the response.get_transaction_record()
Get a specific on-chain transaction record by its ID.
The wallet UUID.
The transaction record UUID. Retrieve it by calling
list_transaction_records().When
True, includes extended fields in the response.get_transaction_record_by_request_id()
Get a specific on-chain transaction record by client request ID.
The wallet UUID.
The client-supplied request ID used when submitting the transaction.
When
True, includes extended fields in the response.Delegation methods
create_delegation()
Grant an operator access to a wallet on behalf of the authenticated principal.
The ID of the principal receiving wallet access.
The wallet to delegate access to. Retrieve it by calling
list_wallets().The permissions to grant. Valid values:
read:wallet, operator, write:wallet, write:transfer, write:contract_call.Optional delegation-scoped policies to create alongside the delegation.
The expiry timestamp for this delegation. If omitted, the delegation does not expire.
get_delegation()
Get details of a specific delegation.
The delegation UUID. Retrieve it by calling
list_delegations().list_delegations()
List delegations created by the authenticated principal.
Filter by operator ID.
Filter by wallet ID.
Filter by status. Possible values:
active, revoked, expired.A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip.
The maximum number of items to return.
list_received_delegations()
List delegations received by the authenticated principal (where the principal is the operator).
update_delegation()
Update an existing delegation.
revoke_delegation()
Revoke an active delegation. Once revoked, the operator loses access to the wallet.
freeze_delegations()
Freeze one or more delegations, temporarily suspending the operator’s access.
The freeze scope. Controls which delegations are frozen.
Freeze all delegations for this owner. Required when
scope targets by owner.Freeze all delegations on this wallet.
Freeze a specific delegation by ID.
A human-readable reason for freezing.
unfreeze_delegations()
Unfreeze previously frozen delegations, restoring operator access. Parameters mirror freeze_delegations().
Policy methods
create_policy()
Create a new policy.
The policy scope. Possible values:
global (applies to all wallets), wallet, delegation.Required when
scope=wallet or scope=delegation. Retrieve it by calling list_wallets().Required when
scope=delegation. Retrieve it by calling list_delegations().The policy name. Max 255 characters.
The policy type. Possible values:
transfer (governs token transfers), contract_call (governs smart contract calls).The policy rule configuration as a JSON object. Structure depends on
policy_type.The policy priority. Higher values take precedence when multiple policies match the same operation.
Whether this policy is active.
True: the policy is evaluated. False: the policy is disabled.get_policy()
Get details of a specific policy.
list_policies()
List all policies for the authenticated principal.
Filter by scope. Possible values:
global, wallet, delegation.Required when
scope=wallet or scope=delegation.Filter by delegation ID. Only applicable when
scope=delegation.Filter by policy type. Possible values:
transfer, contract_call.When
True, includes inactive policies in the results.The number of items to skip.
The maximum number of items to return.
update_policy()
Update an existing policy.
deactivate_policy()
Deactivate a policy without deleting it. Deactivated policies are not evaluated.
dry_run_policy()
Simulate policy evaluation without executing any transaction. Returns whether the operation would be allowed or denied.
The wallet ID to evaluate policies against.
Optional delegation ID to evaluate within a specific delegation context.
The type of operation to simulate. Possible values:
transfer, contract_call.The operation amount as a decimal string. For transfers, must be greater than zero.
The Cobo chain ID (for example,
SETH, BASE_ETH, SOL).The Cobo token ID. Required for
operation_type=transfer.The destination address. Required for
operation_type=transfer.The EVM contract address. Required for
operation_type=contract_call on EVM chains.The ABI-encoded calldata for EVM contract calls, as a hex string.
Solana instructions. Required for
operation_type=contract_call on Solana.Override the principal used for evaluation. Defaults to the authenticated principal.
Pending operation methods
list_pending_operations()
List pending operations awaiting human approval.
Filter by pending operation status.
A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip.
The maximum number of items to return.
get_pending_operation()
Get details of a specific pending operation.
The pending operation ID.
approve_pending_operation()
Approve a pending operation, allowing it to proceed.
The pending operation ID.
reject_pending_operation()
Reject a pending operation.
The pending operation ID. Retrieve it from the
transfer_tokens() or contract_call() response when status=pending_approval.A human-readable reason for rejection.
Approval methods
get_approval()
Get the current status and details of an approval request. Poll this to check for status=approved and retrieve the approval_result.
The approval ID. Retrieve it by calling
list_approvals().list_approvals()
List approval requests for the authenticated human principal.
Filter approvals by subject type (for example,
transaction, pact). If omitted, all types are returned.Filter approvals by status. If omitted, all statuses are returned.
A cursor for forward pagination. Pass the
after value from a previous response to retrieve the next page.A cursor for backward pagination. Pass the
before value from a previous response to retrieve the preceding page.Deprecated. Use
after/before cursors instead.The maximum number of items to return. Range: [1, 200].
resolve_approval()
Approve or reject a pending approval request. Only the wallet owner can resolve approvals.
The approval ID. Retrieve it by calling
list_approvals().The resolution action. Possible values:
approve, reject.Optional response payload. May include a
reason string (for rejections) and/or a revised_pact PactSpec object (for approvals that revise the pact before activation).Pact methods
submit_pact()
Submit a pact specification for owner approval. The pact enters pending_approval status and a notification is sent to the Cobo Agentic Wallet app. The operator’s identity is resolved from the authenticated API key.
The wallet ID the pact will operate on.
A natural-language description of what the agent intends to do (for example,
"DCA $500/week into ETH on Base for 3 months"). Shown to the owner during approval.The PactSpec object describing the requested scope, including permissions, policies, and completion conditions.
A short display name for the pact. If omitted, a name is derived from
intent.The unmodified user request, before any agent reformulation. Used for audit purposes.
pact_id, status, and approval_id.
get_pact()
Get pact detail and trigger lazy activation. If the linked approval has been resolved since the last fetch, the pact transitions to active and the response includes api_key.
The pact ID returned by
submit_pact().status, api_key (when active), delegation_id, wallet_id, and spec.
list_pacts()
List pacts visible to the authenticated principal. Agents see pacts they submitted; owners see pacts on wallets they own.
Filter by pact status. Possible values:
pending_approval, active, revoked, expired.Filter by wallet ID.
A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip before returning results.
The maximum number of items to return.
When
True, includes the default pact in results.list_pact_events()
Get the lifecycle event history for a pact (for example, submitted, approved, activated, revoked).
The pact ID. Retrieve it by calling
submit_pact() or list_pacts().A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip before returning results.
The maximum number of items to return.
revoke_pact()
Revoke an active pact. Only the wallet owner can revoke. This revokes the underlying delegation and invalidates the pact-scoped API key.
The pact ID. Retrieve it by calling
list_pacts().status=revoked.
withdraw_pact()
Withdraw a pending pact that has not yet been approved.
The pact ID. Retrieve it by calling
list_pacts().update_policies()
Update the policies attached to an active pact.
The pact ID.
The new list of policy objects to apply.
update_completion_conditions()
Update the completion conditions for an active pact.
The pact ID.
The new list of completion condition objects.
Identity methods
provision_agent()
Provision an agent by creating an API key and binding it to an owner.
Supply token to use the pairing code from the Cobo Agentic Wallet app. If token is omitted, provisioning runs in agent-first mode — the response contains a temporary activation_secret that the human uses to complete binding.
The pairing code from the Cobo Agentic Wallet app.
An alternative invitation code.
A display name for the agent.
get_agent_status()
Get the provisioning and activation status of a specific agent. Accepts either the internal UUID or the external ID.
list_my_agents()
List all agent principals owned by the authenticated principal.
A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip.
The maximum number of items to return.
create_principal()
Create a new principal (human or agent identity). Requires service credential authentication. If a principal with the same external_id already exists, the existing record is returned.
An external identifier for the principal, unique within your system.
The principal type. Possible values:
human, agent.A display name for the principal.
Arbitrary key-value metadata to associate with the principal.
list_principals()
List all principals. Requires service credential authentication.
A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip.
The maximum number of items to return.
Filter by type. Possible values:
human, agent.update_principal()
Update a principal’s metadata or display name.
The principal ID to update.
Update payload containing the fields to change.
create_api_key()
Create a new API key for a principal.
When called with a principal API key, the key is created for the authenticated principal. When called with a service credential, principal_id is required.
The raw API key value is only returned once. Store it securely — it cannot be retrieved again.
The principal to create the key for. Required when using a service credential.
A display name for the API key.
Permission scopes for the key. Defaults to
["*"] (full access). Use resource:action format (for example, ["wallet:read", "wallet:write"]).Expiry time for the key. If omitted, the key does not expire.
list_api_keys()
List all API keys for the authenticated principal.
A cursor for forward pagination.
A cursor for backward pagination.
The number of items to skip.
The maximum number of items to return.
revoke_api_key()
Permanently revoke an API key. Once revoked, the key cannot be used for authentication.
The API key ID to revoke.
Audit methods
list_audit_logs()
Retrieve audit logs for the authenticated principal. Uses cursor-based pagination — pass next_cursor from the previous response as cursor to retrieve the next page.
Filter by wallet ID.
Filter by the principal that performed the action.
Filter by action name (for example,
transfer.initiate, delegation.create).Filter by result. Possible values:
allowed, denied, pending, error.Filter logs created at or after this timestamp (ISO 8601).
Filter logs created before this timestamp (ISO 8601).
Pagination cursor. Pass the
next_cursor from a previous response.The maximum number of items to return. Range: [1, 200].
Metadata methods
list_chains()
List supported chains. Uses cursor-based pagination.
The wallet type. Use
MPC.A comma-separated list of Cobo chain IDs to filter by (for example,
SETH,BASE_ETH). If omitted, all chains are returned.The maximum number of items to return. Range: [1, 500].
A cursor for backward pagination. Pass the
before value from a previous response to retrieve the preceding page.A cursor for forward pagination. Pass the
after value from a previous response to retrieve the next page.list_assets()
List supported tokens (assets). Uses cursor-based pagination.
The wallet type. Use
MPC.A comma-separated list of Cobo chain IDs to filter by (for example,
SETH,BASE_ETH). If omitted, tokens for all chains are returned.A comma-separated list of token IDs to filter by (for example,
SETH,SETH_USDC). If omitted, all tokens are returned.The maximum number of items to return. Range: [1, 500].
A cursor for backward pagination. Pass the
before value from a previous response to retrieve the preceding page.A cursor for forward pagination. Pass the
after value from a previous response to retrieve the next page.get_chain_info_by_chain_id()
Get detailed information about a specific chain by its Cobo chain ID.
The Cobo chain ID (for example,
SETH, BASE_ETH, SOL).search_tokens()
Search for token candidates matching a symbol across supported chains.
The token symbol to search for (for example,
USDC, ETH).Faucet methods
deposit()
Request a test token deposit to a specified address. Only available on testnets.
The destination address to receive test tokens.
The token to request (for example,
SETH_USDC). Use list_tokens() to see available tokens.list_tokens()
List all tokens available from the faucet.
Coin price methods
get_asset_coin_prices()
Get current prices for one or more tokens.
Comma-separated Cobo token IDs (for example,
SETH,SETH_USDC).The fiat currency for prices (for example,
USD). Defaults to USD if omitted.