Skip to content

Enclave-Markets/enclave-python

Repository files navigation

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+.

About

Enclave Markets Python SDK

Resources

License

Stars

Watchers

Forks

Contributors 7

Languages