챠트 데이터 웹소켓으로 연결

This commit is contained in:
2026-02-26 13:51:12 +09:00
parent 82346fcc46
commit 77e7464884
4 changed files with 82 additions and 5 deletions

View File

@@ -128,7 +128,8 @@ class MarketData(Base):
stock_code = Column(String(20), nullable=False, index=True)
price = Column(Numeric(15, 2), nullable=False)
change_rate = Column(Numeric(10, 4))
volume = Column(Integer)
# real‑time volume may also exceed int32; switch to bigint for safety
volume = Column(BigInteger)
high_price = Column(Numeric(15, 2))
low_price = Column(Numeric(15, 2))
open_price = Column(Numeric(15, 2))
@@ -190,7 +191,8 @@ class StockAnalysis(Base):
# 가격 정보
current_price = Column(Integer, nullable=False)
change_rate = Column(Numeric(10, 4))
volume = Column(Integer)
# volumes can exceed 32‑bit limits (e.g. 3 billion+), use bigint to avoid overflow
volume = Column(BigInteger)
# 기술적 지표
rsi = Column(Numeric(10, 4))