Skip to main content

Cobo Custody restful api

Project description

The Official Python SDK for Cobo WaaS API

pypi License: GPL v2 GitHub Release

About

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.

Documentation

To access the API documentation, navigate to the API references.

For more information on Cobo's Python SDK, refer to the Python SDK Guide.

Usage

Before You Begin

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.

Requirements

Python 3.7 or newer.

Installation

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

Code Sample

Generate Key Pair

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.

Initialize ApiSigner

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:

Initialize RestClient

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)

Complete Code Sample

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cobo_custody-0.41.tar.gz (16.8 kB view details)

Uploaded Source

File details

Details for the file cobo_custody-0.41.tar.gz.

File metadata

  • Download URL: cobo_custody-0.41.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.8.10

File hashes

Hashes for cobo_custody-0.41.tar.gz
Algorithm Hash digest
SHA256 fd37c3df6d8563403c51b9cdfbf43f799ca33d3fca03c2e5549d86a9163dabb1
MD5 9d0d709e65263a0176228a10c3f83e7a
BLAKE2b-256 b61d1e4b008bfb195d3a90e58b49c69dff2f5be9866ba6b01284ad15f3fb8721

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page