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.
pip install enclavefrom enclave.client import Client
import enclave.models
client = Client("", "", enclave.models.PROD)
print(client.wait_until_ready()) # should print Truebuy_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
)
)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.
Supports Python 3.8+.
