Skip to main content
Skip to main content

Python SDK

warning

The Silhouette API and SDK are in beta and under active development. More operations and features will be added.

The official Python SDK lets you trade programmatically while keeping your strategy, size, and intent private. Build trading bots or automate strategies - all with shielded execution.

Installation

pip install silhouette-python-sdk

The package is available on PyPI.

Quick Start

import os
from silhouette import SilhouetteApiClient

# Initialize the client with your private key
# Never hardcode your private key - use environment variables
client = SilhouetteApiClient(
base_url="https://api.silhouette.exchange",
private_key=os.environ["SILHOUETTE_PRIVATE_KEY"],
auto_auth=True,
)

# Check your balances
balances = client.user.get_balances()
print(balances)

# Place an order
order = client.order.create_order(
side="buy",
order_type="limit",
base_token="HYPE",
quote_token="USDC",
amount="1.0",
price="0.001",
)
print(f"Order placed: {order['orderId']}")

Resources