This repository contains the official Python SDK for Cobo WaaS API, enabling developers to integrate with Cobo's Custodial and/or MPC services seamlessly using the Python programming language.
To access the API documentation, navigate to the API references.
For more information on Cobo's Python SDK, refer to the Python SDK Guide.
Ensure that you have created an account and configured Cobo's Custodial and/or MPC services. For detailed instructions, please refer to the Quickstart guide.
Python 3.7 or newer.
The source code is only required for those looking to modify the package.
If you just want to use it, please run the following commands:
pip install --upgrade cobo-custody
Install from source with:
python setup.py install
from cobo_custody.signer.local_signer import generate_new_key api_secret, api_key = generate_new_key() print(api_secret) print(api_key)
For more information on the API key, please click here.
ApiSigner can be instantiated through
from cobo_custody.signer.local_signer import LocalSigner LocalSigner("API_SECRET")
In certain scenarios, the private key may be restricted from export, such as when it is stored in AWS Key Management Service (KMS). In such cases, please pass in a custom implementation using the ApiSigner interface:
from cobo_custody.client import Client from cobo_custody.config import DEV_ENV from cobo_custody.signer.local_signer import LocalSigner client = Client(signer=signer, env=DEV_ENV, debug=True)
from cobo_custody.signer.local_signer import generate_new_key from cobo_custody.client import Client from cobo_custody.config import DEV_ENV from cobo_custody.signer.local_signer import LocalSigner api_secret, api_key = generate_new_key() singer = LocalSigner("api_secret") client = Client(signer=singer, env=DEV_ENV, debug=True) res = client.get_account_info() print(res)