Appearance
Getting Started
Install
bash
pip install https://api.alpha-techlab.com/download/python-sdkImport and Initialize
python
from trading_sdk import TradingClient
client = TradingClient(
strategy_id="AQC-P1A2B3C4",
base_url="https://api.alpha-techlab.com"
)Strategy ID
Strategy IDs route orders and data to paper vs live accounts.
- Paper:
AQC-Pxxxxxx - Live:
AQC-Lxxxxxx
The SDK sends this as the X-Strategy-Id header on every request.
Local Development
python
client = TradingClient(
strategy_id="AQC-P1A2B3C4",
base_url="http://localhost:8000"
)Async Client
Use AsyncTradingClient inside asyncio loops:
python
import asyncio
from trading_sdk import AsyncTradingClient
async def main():
client = AsyncTradingClient(strategy_id="AQC-P1A2B3C4")
quote = await client.get_quote("SPY")
print(quote)
await client.close()
asyncio.run(main())