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
Release history Release notifications | RSS feed
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 hashes)
Built Distribution
enclave-0.3.0-py3-none-any.whl
(19.1 kB
view hashes)