Skip to main content

Connect to Enclave Markets API

Project description

Enclave Python

This is the official Python SDK for Enclave Markets.

It provides a simple interface for interacting with the Enclave API.

Find our easy Colab Demo here.

Installation

pip install enclave

Usage

from enclave.client import Client
import enclave.models

client = Client("", "", enclave.models.PROD)
print(client.wait_until_ready()) # should print True

Perps Order

buy_order = client.perps.add_order(
    "BTC-USD.P",
    enclave.models.BUY,
    Decimal(42_000),
    Decimal(0.1),
    order_type=enclave.models.LIMIT,
)

Examples

See the examples directory for more examples.

Rest API examples can be found in intro.py. Run from the root directory with python -m examples.intro.

Websocket API examples can be found in wsintro.py. Run from the root directory with python -m examples.wsintro.

Hosted demo on Google Colab for ease of use, including expected output.

Support

Supports Python 3.8+.

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

enclave-0.3.0.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

enclave-0.3.0-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file enclave-0.3.0.tar.gz.

File metadata

  • Download URL: enclave-0.3.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.5.0

File hashes

Hashes for enclave-0.3.0.tar.gz
Algorithm Hash digest
SHA256 57041f83dd590d8b553c1c1beae2b7f7a5f55b7c1faa6700aa6eac94a46eda1a
MD5 1599b3377ccb0949adf8d208c14d58c1
BLAKE2b-256 86a466773ea344a61f598857ff83c0e959af1abd6b00e53a5ef3a2c03b4cc180

See more details on using hashes here.

File details

Details for the file enclave-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: enclave-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.2 Darwin/23.5.0

File hashes

Hashes for enclave-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dee26b7e0ed2d0ece10a7bd59e5bb39d073ae573ed463ce4b9bd5e2269eb13f
MD5 873efbd9f6ae5435fc7c6ea506d75117
BLAKE2b-256 97a33e65a80437172734d3cd6150946e1e595b88d4872c851bd1f72abf834a3d

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