All notable changes to the API2Trade Python SDK are documented here.
Format follows Keep a Changelog. Versioning follows Semantic Versioning.
Api2TradeClient— single entry point for all API operationsAccountsResource—register(),register_full(),check_connect(),summary(),delete()MarketResource—quote(),quotes()(multi-symbol convenience)OrdersResource—send(),modify(),close(),close_all(),positions()- Automatic retry with exponential back-off on retryable broker rejections (requote, server busy, etc.)
HistoryResource—get(),get_page(),iter_all(),last_n_days(),summary_stats()StreamingClient— async WebSocket client with auto-reconnect and ping/pong keepalive- Callback style via
client.stream() - Async generator style via
client.stream_iter()
- Callback style via
- Typed models:
AccountSummary,Quote,Position,OrderResult,OrderHistoryItem,PaginatedHistory,ConnectStatus,Tick OrderTypeenum (BUY_MARKET, SELL_MARKET, BUY_LIMIT, SELL_LIMIT, BUY_STOP, SELL_STOP)RetCodeenum with all 37 broker return codes +is_retryable()+description()helpers- Exception hierarchy:
Api2TradeError→AuthenticationError,AccountNotFoundError,RateLimitError,ServerError,ConnectionError,BrokerRejectionError - HTTP transport: connection pooling, session reuse, configurable timeouts and retries
- Pro plan Basic Auth support alongside Single plan API key auth
- Environment variable configuration (
API2TRADE_API_KEY,API2TRADE_ACCOUNT_ID, etc.) - Context manager support (
with Api2TradeClient(...) as client:) - 6 runnable examples covering every major use case
- Full unit test suite (models, exceptions, all resources) with mocked HTTP