Add an official Toss Securities Open API client alongside the existing unofficial tossctl wrapper. The package ships read-only helpers backed by the official REST API (https://openapi.tossinvest.com): OAuth2 client_credentials token issuance with an in-memory token cache, bearer + X-Tossinvest-Account header handling, TossApiError/TossCredentialsError with secret/token redaction, and 429 Retry-After/backoff retry. Credentials are read from TOSSINVEST_CLIENT_ID/TOSSINVEST_CLIENT_SECRET (optional TOSSINVEST_ACCOUNT/TOSSINVEST_API_BASE_URL) and sent directly to Toss, never through a shared proxy. Order mutation remains out of scope; the tossctl path is retained as a documented fallback. Closes #306
1,021 B
| toss-securities |
|---|
| minor |
Add an official Toss Securities Open API client alongside the existing unofficial tossctl wrapper. The package now ships read-only helpers backed by the official REST API (https://openapi.tossinvest.com): OAuth 2.0 Client Credentials token issuance with an in-memory token cache, bearer + X-Tossinvest-Account header handling, TossApiError/TossCredentialsError envelopes with secret/token redaction, and 429 Retry-After/backoff retry. New read-only helpers cover prices, orderbook, trades, price limits, candles, stocks, stock warnings, exchange rate, market calendars, accounts, holdings, open orders, order detail, buying power, sellable quantity, and commissions. Credentials are read from TOSSINVEST_CLIENT_ID/TOSSINVEST_CLIENT_SECRET (optional TOSSINVEST_ACCOUNT/TOSSINVEST_API_BASE_URL) and sent directly to Toss, never through a shared proxy. Order mutation (create/modify/cancel) remains out of scope. The tossctl path is retained as a documented fallback.