Appearance
Usage Patterns
Strategy Bootstrapping
python
from trading_sdk import TradingClient
client = TradingClient(strategy_id="AQC-P1A2B3C4")
account = client.get_account()
positions = client.get_positions()Signal to Order
python
price = client.get_price("AAPL")
if price and price < 150:
client.buy_limit("AAPL", 10, price=149.5)Options Selection by Delta
python
opt = client.get_option_by_delta(
symbol="SPX",
expiry="20250115",
target_delta=0.25,
right="P",
trading_class="SPXW"
)
if opt:
client.place_order(
symbol="SPX",
quantity=1,
side="SELL",
order_type="MKT",
conid=opt["conid"]
)Bracketed Entry
python
client.place_bracket_order(
symbol="AAPL",
quantity=10,
side="BUY",
entry_price=150.0,
stop_loss=145.0,
take_profit=160.0,
force=True
)Streaming Quotes
python
import asyncio
async def on_quote(data):
print(data)
asyncio.run(client.stream_quotes(["AAPL"], on_quote))