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(
    client.perps.OrderParams(
        market="BTC-USD.P",
        side=enclave.models.BUY,
        price=Decimal(42_000),
        size=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.4.tar.gz (15.7 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.4-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: enclave-0.3.4.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.18 Linux/6.11.0-1018-azure

File hashes

Hashes for enclave-0.3.4.tar.gz
Algorithm Hash digest
SHA256 e389e4e518ef523539d508462b7eb23b82a100984385fe82733c37522b215ed2
MD5 99bb1635ca45b196a9ec393c8d43160e
BLAKE2b-256 a2691032dcb5c6f9bf106f0e49b0a8dc24f570eca1df9ca63c366c328fd6ce2e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: enclave-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.8.18 Linux/6.11.0-1018-azure

File hashes

Hashes for enclave-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 95d7eca7f8a05c1c6c8285273ae7b17749f3390bf701bf4d8ad4a8f86caaa3ad
MD5 fa1f391732eaa07f7ab58bec90e2f235
BLAKE2b-256 2a48f589c4f61f5a7a57d5d891640e74cdfcfa837b8fb16500142afdc6c956c1

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