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.1.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

enclave-0.3.1-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: enclave-0.3.1.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.7 Darwin/24.4.0

File hashes

Hashes for enclave-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b7138ed9c5f71c8c08f578b29e7c26060b3e6eba9d3abf7452775bbf8e0874cd
MD5 27fe8e63e0a1ddbe15e13ed09d0ac574
BLAKE2b-256 46175bb9d1bfd7e7c118548f7636fc2f30ce52dfab4857b7fc9c34ea360bf04d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: enclave-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.7 Darwin/24.4.0

File hashes

Hashes for enclave-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c71679138cada435be128c3d083266368993f28a106d4678529d42f19beb2973
MD5 f7621f4523be0c27b26f6bbd797f2ad8
BLAKE2b-256 a0ac7d18395769199fe5d7e7ee84ae18e1235d1918e018eaa148c6b4af87a867

See more details on using hashes here.

Supported by

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