Changelog¶
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.0 - 2026-03-23¶
Added¶
- ChartData model —
ChartCandle,ChartDataPydantic 모델로 OHLCV 캔들 데이터 타입 안전 접근 - Enhanced OrderBook —
OrderBookLevel로 10단계 호가 구조화 (asks,bids) - 5 new exceptions —
RateLimitError,InvalidOrderError,InsufficientBalanceError,WebSocketError,ValidationError - WebSocket heartbeat — ping/pong으로 연결 상태 확인 (
heartbeat_interval파라미터) - Exponential backoff + jitter — WebSocket 재연결 시 서버 부하 분산
- 8 new examples — 실시간 모니터링, 손절매, 차트 분석, 주문 관리 등
Changed¶
chart()리턴 타입:dict→ChartData(.raw로 원본 접근 가능)OrderBook.from_api()— 구조화된 호가 파싱 (.raw호환 유지)ValidationError—PyDBSecError+ValueError다중 상속- Development Status: Alpha → Production/Stable
0.5.2 - 2026-03-23¶
Added¶
- Input validation, async tests, sell/cancel/chart/order_book tests
0.5.1 - 2026-03-21¶
Changed¶
- Repository migrated from STOA-company to Jaeminyx-Stoa
- Updated all URLs, docs, and package metadata
0.5.0 - 2026-03-18¶
Added¶
- MCP Helper Functions — Anthropic API 연동, MCP 클라이언트, 응답 파싱
get_anthropic_tools()— Claude API tool 정의 생성execute_tool()— agentic loop에서 tool 로컬 실행DBSecMCPClient— typed async MCP 클라이언트parse_stock_price(),parse_balance(),parse_order_result(),parse_order_book()— 응답 파싱- npm wrapper —
npx pydbsec-mcp로 zero-config MCP 서버 실행 - Documentation — 제품 소개 랜딩 페이지, MCP 가이드, CLI/WebSocket/Rate Limiting 문서
- STOA Company 브랜딩 — docs footer, 히어로 섹션
Fixed¶
- Badge 렌더링 (마크다운 → HTML img 태그)
0.4.0 - 2026-03-17¶
Added¶
- MCP Server — AI 어시스턴트 (Claude Desktop, Cursor 등)에서 DB증권 API 직접 호출
pip install pydbsec[mcp]→pydbsec-mcp실행- Tools: get_stock_price, get_balance, get_portfolio_summary, place_order, get_order_book, get_chart
- stdio transport (Claude Desktop config에 추가하여 사용)
0.3.0 - 2026-03-17¶
Added¶
- CLI tool —
pydbseccommand for terminal-based API access pydbsec price 005930— stock price lookuppydbsec balance/pydbsec balance --overseas— balance inquirypydbsec portfolio— unified KR+US portfolio summarypydbsec buy/sell— order placement--jsonflag for raw JSON output- Credentials via
DBSEC_APP_KEY/DBSEC_APP_SECRETenv vars or--key/--secretflags - Rate limiting (enabled by default) — token bucket per endpoint, respects DB Securities rate limits
portfolio_summary()— unified domestic+overseas balance in a single call- Configurable logging —
PyDBSec(log_level=logging.DEBUG)
Fixed¶
- All 60 mypy strict type errors resolved (0 errors on 19 source files)
base_urlpropagation toTokenManager- Async token refresh event loop blocking
0.2.0 - 2026-03-17¶
Added¶
- WebSocket real-time data:
DBSecWebSocketasync client for live market data - Production
wss://openapi.dbsec.co.kr:7070, sandbox:17070 - TR codes: S00 (체결가), S01 (호가), IS0/IS1 (주문접수/체결), W00/W01 (ELW), U00 (업종지수)
- Async iterator protocol (
async for msg in ws) - Auto-reconnect with configurable retry
- Optional dependency:
pip install pydbsec[ws] PyDBSec.ws/AsyncPyDBSec.wslazy property for WebSocket access
Fixed¶
base_urlnot propagated toTokenManager— token requests now use custom base_url- Async token refresh blocked event loop — now uses
asyncio.to_thread()
Changed¶
- HTTP clients use persistent connection pools (
httpx.Client/AsyncClient) - Pagination results merged into single
dict(Out1/Out2 lists concatenated) - Return type simplified to
dict[str, Any](no moredict | list[dict]union) - Error codes extracted to constants (
ERROR_TOKEN_EXPIRED, etc.)
0.1.0 - 2026-03-17¶
Added¶
PyDBSecsynchronous clientAsyncPyDBSecasynchronous client- OAuth2 token management with auto-refresh and thread-safe locking
- httpx-based HTTP client with automatic pagination (
cont_yn/cont_key) - Domestic (국내) API: balance, price, order_book, buy/sell/cancel, chart, deposit, orderable_quantity, transaction_history, trading_history, daily_trade_report, tickers
- Overseas (해외) API: balance, price, order_book, buy/sell/cancel, chart, deposit, orderable_quantity, transaction_history, tickers
- Futures (선물) API: balance
- Pydantic v2 typed response models:
DomesticBalance,OverseasBalance,FuturesBalance,StockPrice,OrderBook,OrderResult - Custom exceptions:
PyDBSecError,TokenError,TokenExpiredError,APIError - Context manager support (
with/async with) py.typedmarker (PEP 561)- GitHub Actions CI (Python 3.10–3.13)
- PyPI trusted publishing workflow