조회 (query)¶
시세, 잔고, 계좌, 종목 정보 등 각종 조회 기능을 담당하는 모듈입니다.
파라미터 타입 안내¶
모든 고정 선택지 파라미터는 의미 있는 문자열 키를 사용합니다. API 내부 코드(숫자)로의 변환은 라이브러리가 자동으로 처리합니다.
계좌·잔고 조회 파라미터¶
| 타입 | 값 | 의미 |
|---|---|---|
AllStockType |
"all" / "single" |
전체종목구분 |
ExchangeType |
"all" / "krx" / "nxt" |
거래소구분 |
SellType |
"all" / "sell" / "buy" |
매도수구분 |
TradeSide |
"sell" / "buy" |
매매구분 (전체 없음) |
UnfilledTradeType |
"all" / "sell" / "buy" |
미체결 매매구분 |
DepositQueryType |
"normal" / "estimated" |
예수금 조회구분 |
DelistedQueryType |
"all" / "exclude_delisted" |
상장폐지 조회구분 |
BalanceQueryType |
"combined" / "individual" |
계좌평가잔고 조회구분 |
FilledQueryType |
"all" / "by_stock" |
체결 조회구분 |
OrderHistoryQueryType |
"asc" / "desc" / "unfilled" / "filled_only" |
주문체결내역 조회구분 |
StockBondType |
"all" / "stock" / "bond" |
주식채권구분 |
MarketType |
"all" / "kospi" / "kosdaq" / "otcbb" / "ecn" |
시장구분 |
ExecutionQueryType |
"all" / "filled" |
주문체결현황 조회구분 |
GoodsType |
"all" / "domestic_stock" / "fund" / "overseas_stock" / "financial" |
상품구분 |
SingleStockType |
"today_buy_sell" / "today_sell_all" |
단주구분 |
CashCreditType |
"all" / "cash" / "credit" |
현금신용구분 |
GoldOrderQueryType |
"asc" / "desc" |
금현물 주문 조회구분 |
GoldTransactionType |
"all" / "deposit_withdraw" / "withdraw" / "trade" / "buy" / "sell" / "deposit" / "payment" |
금현물 거래내역 구분 |
TransactionType |
"all" / "deposit_withdraw" / "withdraw" / "trade" / "buy" / "sell" / "deposit" / "payment" |
위탁종합거래내역 구분 |
FlagType |
"off" / "on" |
이진 플래그 (포함/미포함 등) |
시세·종목정보 조회 파라미터¶
| 타입 | 값 | 의미 |
|---|---|---|
MrkcondExchangeType |
"krx" / "nxt" / "all" |
거래소구분 (시세·종목정보용) |
MrktType3 |
"all" / "kospi" / "kosdaq" |
시장구분 (3코드) |
MrktType3Ext |
"all" / "kospi" / "kosdaq" / "kospi200" |
시장구분 (가격급등락용) |
StkMarketType |
"kospi" / "kosdaq" / "etf" / "elw" / "konex" / "gold" 등 |
종목 리스트 시장구분 |
SectorMarketType |
"kospi" / "kosdaq" / "kospi200" / "kospi100" / "krx100" |
업종코드 시장구분 |
DisplayType |
"qty" / "amount" |
일별주가 표시구분 |
NewStockRightsType |
"all" / "rights_cert" / "rights_deed" |
신주인수권구분 |
InstitutionTradeType |
"sell" / "buy" |
기관 매매구분 (순매도/순매수) |
EstimatedPriceType |
"buy" / "sell" |
추정단가구분 |
CreditQueryType |
"loan" / "short" |
신용매매동향 조회구분 |
HighLowSelectType |
"high" / "low" |
신고저 / 고저 구분 |
PERType |
"low_pbr" / "high_pbr" / "low_per" / "high_per" / "low_roe" / "high_roe" |
PER 구분 |
TodayPrevType |
"today" / "prev" |
당일전일구분 |
TickMinType |
"tick" / "minute" |
틱/분 구분 |
AfterTradeType |
"net_buy" / "buy" / "sell" |
장마감후 매매구분 |
AfterAmtQtyType |
"amount" / "qty" |
장마감후 금액수량구분 |
InvestorType |
"foreign" / "institution" / "trust" / "insurance" / "bank" / "pension" / "gov" / "other_corp" |
투자자별 (장중) |
InvestorType2 |
"individual" / "foreign" / "financial_inv" / "trust" / "private_fund" / … |
투자자구분 (투자자별일별매매종목) |
AmtQtyType |
"amount" / "qty" |
금액수량구분 (종목별투자자) |
InvestorTradeType |
"net_buy" / "buy" / "sell" |
매매구분 (종목별투자자) |
UnitType |
"thousand" / "single" |
단위구분 (천주/단주) |
순위정보 파라미터¶
| 타입 | 값 | 의미 |
|---|---|---|
RkinfoMarketType |
"all" / "kospi" / "kosdaq" |
순위정보 시장구분 |
RkinfoStexType |
"krx" / "nxt" / "all" |
순위정보 거래소구분 |
RkinfoBidSortType |
"net_buy_qty" / "net_sell_qty" / "buy_ratio" / "sell_ratio" |
호가잔량상위 정렬구분 |
RkinfoBidTradeType |
"buy" / "sell" |
호가잔량급증 매매구분 |
RkinfoSurgeSort2Type |
"surge_qty" / "surge_ratio" |
급증 정렬구분 |
RkinfoPriceChangeSortType |
"rise_ratio" / "rise_gap" / "fall_ratio" / "fall_gap" / "flat" |
등락률상위 정렬구분 |
RkinfoBaseDateType |
"today" / "prev" |
기준일구분 |
RkinfoSortCndType |
"qty" / "amount" |
동일순매매 정렬조건 |
RkinfoOrgType |
"foreign" / "foreign_corp" / "financial_inv" / "trust" / "other_finance" / "bank" / "insurance" / "pension" / "gov" / "other_corp" / "institution" |
장중투자자 기관구분 |
NetTradeType |
"net_buy" / "net_sell" |
순매매구분 |
ForeignPeriodTradeType |
"net_sell" / "net_buy" / "both" |
외국인 기간별 매매구분 |
ForeignConsecTradeType |
"net_sell" / "net_buy" |
외국인 연속 순매매구분 |
ForeignBrokerTradeType |
"net_buy" / "net_sell" / "buy" / "sell" |
외국계 창구 매매구분 |
SortAmtQtyType |
"amount" / "qty" |
금액·수량 정렬구분 |
BrokerMarketType |
"all" / "kospi" / "kosdaq" / "single" |
거래원 순간거래량 시장구분 |
TimeRangeType |
"start" / "period" |
시간구분 (시작일/기간) |
TradeUnitType |
"single" / "thousand" |
거래 단위구분 |
MarketOpenType |
"all" / "intraday" / "pre" / "post" |
장운영구분 |
AfterHoursSortType |
"up_rate" / "up_gap" / "down_rate" / "down_gap" / "flat" |
시간외단일가 등락율 정렬기준 |
ForeignInstitutionQueryDateType |
"exclude_today" / "include_today" |
외국인·기관 조회일자구분 |
차트 파라미터¶
| 타입 | 값 | 의미 |
|---|---|---|
ChartTickScope |
"1" / "3" / "5" / "10" / "30" |
틱 범위 (틱차트·업종틱) |
ChartMinScope |
"1" / "3" / "5" / "10" / "15" / "30" / "45" / "60" |
분봉 범위 (주식·업종) |
ChartAdjustedPrice |
"adjusted" / "raw" |
수정주가 반영 여부 |
ChartAmtQtyType |
"amount" / "qty" |
금액수량구분 (투자자 차트) |
ChartTradeType |
"net_buy" / "buy" / "sell" |
매매구분 (투자자 차트) |
ChartUnitType |
"thousand" / "single" |
단위구분 (종목별투자자기관별차트) |
ChartSectorMarket |
"kospi" / "kosdaq" / "kospi200" |
업종차트 시장구분 |
API 레퍼런스¶
kiwoompy.query
¶
조회 모듈 — 계좌·잔고·손익·주문체결·시세·종목정보·순위정보·차트·업종·기관/외국인·공매도·대차거래·ETF·ELW·테마·프로그램매매 조회.
AfterHoursSortType
¶
시간외 단일가 등락율 순위 정렬기준.
"up_rate": 상승률 — API"1""up_gap": 상승폭 — API"2""down_rate": 하락률 — API"3""down_gap": 하락폭 — API"4""flat": 보합 — API"5"
AllStockType
¶
전체종목구분.
"all": 전체 — API"0""single": 종목 — API"1"
BalanceQueryType
¶
계좌평가잔고 조회구분.
"combined": 합산 — API"1""individual": 개별 — API"2"
BrokerMarketType
¶
거래원 순간거래량 시장구분.
"all": 전체 — API"0""kospi": 코스피 — API"1""kosdaq": 코스닥 — API"2""single": 종목 — API"3"
CashCreditType
¶
당일매매일지 현금신용구분.
"all": 전체 — API"0""cash": 현금매매만 — API"1""credit": 신용매매만 — API"2"
DelistedQueryType
¶
상장폐지 조회구분.
"all": 전체 — API"0""exclude_delisted": 상장폐지종목제외 — API"1"
DepositQueryType
¶
예수금 조회구분.
"normal": 일반조회 — API"2""estimated": 추정조회 — API"3"
DomesticExchange
¶
국내거래소구분.
- "KRX": 한국거래소
- "NXT": 넥스트트레이드
- "%": 전체
- "SOR": 최선주문집행
ExchangeType
¶
거래소구분.
"all": 통합 — API"0""krx": 한국거래소 — API"1""nxt": 넥스트트레이드 — API"2"
ExecutionQueryType
¶
주문체결현황 조회구분.
"all": 전체 — API"0""filled": 체결 — API"1"
FilledQueryType
¶
체결조회 조회구분.
"all": 전체 — API"0""by_stock": 종목 — API"1"
FlagType
¶
이진 플래그 구분 (체크/미체크, 포함/미포함 등).
"off": 미체크/미포함 — API"0""on": 체크/포함 — API"1"
ForeignBrokerTradeType
¶
외국계 창구 매매구분.
"net_buy": 순매수 — API"1""net_sell": 순매도 — API"2""buy": 매수 — API"3""sell": 매도 — API"4"
ForeignConsecTradeType
¶
외국인 연속 순매매구분.
"net_sell": 연속순매도 — API"1""net_buy": 연속순매수 — API"2"
ForeignInstitutionQueryDateType
¶
외국인·기관 매매 상위 조회일자구분.
"exclude_today": 조회일자 미포함 — API"0""include_today": 조회일자 포함 — API"1"
ForeignPeriodTradeType
¶
외국인 기간별 매매구분.
"net_sell": 순매도 — API"1""net_buy": 순매수 — API"2""both": 순매매 — API"3"
GoldOrderQueryType
¶
금현물 주문 조회구분.
"asc": 주문순 — API"1""desc": 역순 — API"2"
GoldTransactionType
¶
GoldTransactionType = Literal['all', 'deposit_withdraw', 'withdraw', 'trade', 'buy', 'sell', 'deposit', 'payment']
금현물 거래내역 구분.
"all": 전체 — API"0""deposit_withdraw": 입출금 — API"1""withdraw": 출고 — API"2""trade": 매매 — API"3""buy": 매수 — API"4""sell": 매도 — API"5""deposit": 입금 — API"6""payment": 출금 — API"7"
GoodsType
¶
위탁종합거래내역 상품구분.
"all": 전체 — API"0""domestic_stock": 국내주식 — API"1""fund": 수익증권 — API"2""overseas_stock": 해외주식 — API"3""financial": 금융상품 — API"4"
MarketOpenType
¶
장운영구분.
"all": 전체 — API"0""intraday": 장중 — API"1""pre": 장전시간외 — API"2""post": 장후시간외 — API"3"
MarketType
¶
시장구분.
"all": 전체 — API"0""kospi": 코스피 — API"1""kosdaq": 코스닥 — API"2""otcbb": OTCBB — API"3""ecn": ECN — API"4"
NetTradeType
¶
순매매구분.
"net_buy": 순매수 — API"1""net_sell": 순매도 — API"2"
OrderHistoryQueryType
¶
주문체결내역상세 조회구분.
"asc": 주문순 — API"1""desc": 역순 — API"2""unfilled": 미체결 — API"3""filled_only": 체결내역만 — API"4"
SellType
¶
매도수구분.
"all": 전체 — API"0""sell": 매도 — API"1""buy": 매수 — API"2"
SingleStockType
¶
당일매매일지 단주구분.
"today_buy_sell": 당일매수에 대한 당일매도 — API"1""today_sell_all": 당일매도 전체 — API"2"
SortAmtQtyType
¶
금액·수량 정렬구분.
"amount": 금액 — API"1""qty": 수량 — API"2"
StockBondType
¶
주식채권구분.
"all": 전체 — API"0""stock": 주식 — API"1""bond": 채권 — API"2"
TimeRangeType
¶
시간구분 (시작일/기간).
"start": 시작일 — API"0""period": 기간 — API"1"
TradeSide
¶
매매구분 (전체 없음).
"sell": 매도 — API"1""buy": 매수 — API"2"
TradeUnitType
¶
거래 단위구분.
"single": 단주 — API"1""thousand": 천주 — API"1000"
TransactionType
¶
TransactionType = Literal['all', 'deposit_withdraw', 'withdraw', 'trade', 'buy', 'sell', 'deposit', 'payment']
위탁종합거래내역 구분.
"all": 전체 — API"0""deposit_withdraw": 입출금 — API"1""withdraw": 출고 — API"2""trade": 매매 — API"3""buy": 매수 — API"4""sell": 매도 — API"5""deposit": 입금 — API"6""payment": 출금 — API"7"
UnfilledTradeType
¶
미체결 매매구분.
"all": 전체 — API"0""sell": 매도 — API"1""buy": 매수 — API"2"
KiwoomQuery
¶
키움 REST API 조회 클라이언트.
계좌·잔고·손익·주문체결 등 조회성 TR을 담당한다.
모든 메서드는 KiwoomApi를 통해 HTTP 요청을 전송하며,
응답을 dataclass로 파싱하여 반환한다.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api
|
KiwoomApi
|
인증 토큰이 설정된 |
required |
Source code in src/kiwoompy/query.py
credit_loan_availability
¶
종목의 신용융자 가능 여부를 조회한다 (kt20017).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stk_cd
|
str
|
종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
CreditLoanAvailability
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
credit_loan_stocks
¶
credit_loan_stocks(mrkt_deal_tp: CreditMarketType, *, crd_stk_grde_tp: CreditStockGradeType = '%', stk_cd: str = '') -> CreditLoanStocks
신용융자 가능종목을 조회한다 (kt20016).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
mrkt_deal_tp
|
CreditMarketType
|
시장거래구분.
|
required |
crd_stk_grde_tp
|
CreditStockGradeType
|
신용종목등급구분 (기본값 |
'%'
|
stk_cd
|
str
|
종목코드. 빈 문자열이면 전체 조회. |
''
|
Returns:
| Type | Description |
|---|---|
CreditLoanStocks
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
get_account_balance
¶
get_account_balance(query_type: BalanceQueryType = 'combined', exchange: Literal['KRX', 'NXT'] = 'KRX') -> AccountBalance
계좌평가잔고내역을 조회한다 (kt00018).
보유 종목별 매입금액·평가금액·평가손익·수익률을 포함한 계좌 전체 잔고 현황을 반환한다.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_type
|
BalanceQueryType
|
조회구분. |
'combined'
|
exchange
|
Literal['KRX', 'NXT']
|
국내거래소구분. |
'KRX'
|
Returns:
| Type | Description |
|---|---|
AccountBalance
|
계좌평가잔고내역 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 | |
get_account_evaluation
¶
get_account_evaluation(query_type: DelistedQueryType = 'all', exchange: Literal['KRX', 'NXT'] = 'KRX') -> AccountEvaluation
계좌평가현황을 조회한다 (kt00004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_type
|
DelistedQueryType
|
상장폐지조회구분. |
'all'
|
exchange
|
Literal['KRX', 'NXT']
|
국내거래소구분. |
'KRX'
|
Returns:
| Type | Description |
|---|---|
AccountEvaluation
|
계좌평가현황 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_account_numbers
¶
현재 토큰에 연결된 계좌번호 목록을 조회한다 (ka00001).
Returns:
| Type | Description |
|---|---|
AccountNumbers
|
계좌번호 목록 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_account_return
¶
계좌수익률을 조회한다 (ka10085).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exchange
|
ExchangeType
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
list[AccountReturnItem]
|
계좌수익률 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_after_hours_rank
¶
get_after_hours_rank(market: 'RkinfoMarketType', sort_base: AfterHoursSortType, stock_cond: str, trade_qty_cond: str, credit_cond: str, trade_amt: str) -> AfterHoursRank
시간외 단일가 등락율 순위를 조회한다 (ka10098).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
sort_base
|
AfterHoursSortType
|
정렬기준.
|
required |
stock_cond
|
str
|
종목조건 ( |
required |
trade_qty_cond
|
str
|
거래량조건 ( |
required |
credit_cond
|
str
|
신용조건 ( |
required |
trade_amt
|
str
|
거래대금 ( |
required |
Returns:
| Type | Description |
|---|---|
AfterHoursRank
|
시간외단일가등락율순위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_afterclose_investor_trading
¶
get_afterclose_investor_trading(market_type: 'MrktType3', trade_type: 'AfterTradeType', amount_qty_type: 'AfterAmtQtyType' = 'amount', exchange: 'MrkcondExchangeType' = 'all') -> AfterCloseInvestorTrading
장마감 후 투자자별 매매 상위 종목을 조회한다 (ka10066).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market_type
|
'MrktType3'
|
시장구분. |
required |
trade_type
|
'AfterTradeType'
|
매매구분. |
required |
amount_qty_type
|
'AfterAmtQtyType'
|
금액수량구분. |
'amount'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
AfterCloseInvestorTrading
|
장마감후투자자별매매 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_afterhours_orderbook
¶
시간외단일가 호가 및 현재가를 조회한다 (ka10087).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (6자리). |
required |
Returns:
| Type | Description |
|---|---|
AfterhoursOrderbook
|
시간외단일가 호가 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_all_sector_index
¶
전 업종 지수를 조회한다 (ka20003).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드 ( |
required |
Returns:
| Type | Description |
|---|---|
AllSectorIndex
|
class: |
Source code in src/kiwoompy/query.py
get_bid_qty_surge
¶
get_bid_qty_surge(market: 'RkinfoMarketType', trade_type: 'RkinfoBidTradeType', sort_type: 'RkinfoSurgeSort2Type', time_min: str, trade_qty_type: str, stock_cond: str, exchange: 'RkinfoStexType') -> BidQtySurge
호가잔량 급증 종목을 조회한다 (ka10021).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
trade_type
|
'RkinfoBidTradeType'
|
매매구분. |
required |
sort_type
|
'RkinfoSurgeSort2Type'
|
정렬구분. |
required |
time_min
|
str
|
시간구분 (분 입력, 예: |
required |
trade_qty_type
|
str
|
거래량구분.
|
required |
stock_cond
|
str
|
종목조건 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
BidQtySurge
|
호가잔량급증 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_bid_qty_upper
¶
get_bid_qty_upper(market: 'RkinfoMarketType', sort_type: 'RkinfoBidSortType', trade_qty_type: str, stock_cond: str, credit_cond: str, exchange: 'RkinfoStexType') -> BidQtyUpper
호가잔량 상위 종목을 조회한다 (ka10020).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
sort_type
|
'RkinfoBidSortType'
|
정렬구분.
|
required |
trade_qty_type
|
str
|
거래량구분.
|
required |
stock_cond
|
str
|
종목조건.
|
required |
credit_cond
|
str
|
신용조건.
|
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
BidQtyUpper
|
호가잔량상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_broker_instant_volume
¶
get_broker_instant_volume(broker_code: str, market_type: BrokerMarketType = 'all', stock_code: str = '', volume_type: str = '0', price_type: str = '0', exchange: 'MrkcondExchangeType' = 'all') -> BrokerInstantVolume
특정 거래원의 순간거래량을 조회한다 (ka10052).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
broker_code
|
str
|
회원사코드 (3자리). |
required |
market_type
|
BrokerMarketType
|
시장구분. |
'all'
|
stock_code
|
str
|
종목코드. |
''
|
volume_type
|
str
|
수량구분. |
'0'
|
price_type
|
str
|
가격구분. |
'0'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
BrokerInstantVolume
|
거래원순간거래량 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_broker_list
¶
키움 API 회원사 리스트를 조회한다 (ka10102).
Returns:
| Type | Description |
|---|---|
BrokerList
|
회원사 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_broker_stock_trend
¶
get_broker_stock_trend(broker_code: str, stock_code: str, start_date: str, end_date: str) -> BrokerStockTrend
특정 증권사의 종목별 매매동향을 조회한다 (ka10078).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
broker_code
|
str
|
회원사코드 (3자리). |
required |
stock_code
|
str
|
거래소별 종목코드. |
required |
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
Returns:
| Type | Description |
|---|---|
BrokerStockTrend
|
증권사별종목매매동향 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_broker_supply_analysis
¶
get_broker_supply_analysis(stock_code: str, broker_code: str, start_date: str, end_date: str, period: str = '5', sort_base: str = '1', query_date_type: str = '0', time_point_type: str = '0', exchange: 'MrkcondExchangeType' = 'all') -> BrokerSupplyAnalysis
특정 거래원의 종목 매물대 분석 데이터를 조회한다 (ka10043).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
broker_code
|
str
|
회원사코드 (3자리). |
required |
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
period
|
str
|
기간. |
'5'
|
sort_base
|
str
|
정렬기준. |
'1'
|
query_date_type
|
str
|
조회기간구분. |
'0'
|
time_point_type
|
str
|
시점구분. |
'0'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
BrokerSupplyAnalysis
|
거래원매물대분석 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_broker_trade_upper
¶
get_broker_trade_upper(broker_code: str, trade_qty_type: str, trade_type: NetTradeType, period: str, exchange: 'RkinfoStexType') -> BrokerTradeUpper
증권사별 매매 상위 종목을 조회한다 (ka10039).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
broker_code
|
str
|
회원사코드 (ka10102로 조회, 예: |
required |
trade_qty_type
|
str
|
거래량구분 ( |
required |
trade_type
|
NetTradeType
|
매매구분. |
required |
period
|
str
|
기간. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
BrokerTradeUpper
|
증권사별매매상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_credit_orderable_quantity
¶
신용보증금율별주문가능수량을 조회한다 (kt00012).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목번호. |
required |
price
|
str
|
매수가격. 공백 허용. |
''
|
Returns:
| Type | Description |
|---|---|
CreditOrderableQuantity
|
신용보증금율별주문가능수량 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_credit_ratio_upper
¶
get_credit_ratio_upper(market: 'RkinfoMarketType', trade_qty_type: str, stock_cond: str, updown_incls: FlagType, credit_cond: str, exchange: 'RkinfoStexType') -> CreditRatioUpper
신용비율 상위 종목을 조회한다 (ka10033).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
trade_qty_type
|
str
|
거래량구분 ( |
required |
stock_cond
|
str
|
종목조건 ( |
required |
updown_incls
|
FlagType
|
상하한포함. |
required |
credit_cond
|
str
|
신용조건 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
CreditRatioUpper
|
신용비율상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_credit_trading_trend
¶
get_credit_trading_trend(stock_code: str, date: str, query_type: 'CreditQueryType' = 'loan') -> CreditTradingTrend
신용 매매동향(융자·대주 잔고 추이)을 조회한다 (ka10013).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
date
|
str
|
조회일자 ( |
required |
query_type
|
'CreditQueryType'
|
조회구분. |
'loan'
|
Returns:
| Type | Description |
|---|---|
CreditTradingTrend
|
신용매매동향 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_account_return
¶
일별계좌수익률상세현황을 조회한다 (kt00016).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
from_dt
|
str
|
평가시작일 ( |
required |
to_dt
|
str
|
평가종료일 ( |
required |
Returns:
| Type | Description |
|---|---|
DailyAccountReturn
|
일별계좌수익률상세현황 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_balance_return
¶
일별잔고수익률을 조회한다 (ka01690).
모의투자를 지원하지 않는 TR이다.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_date
|
str
|
조회일자 ( |
required |
Returns:
| Type | Description |
|---|---|
DailyBalanceReturn
|
일별잔고수익률 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_estimated_asset
¶
일별추정예탁자산현황을 조회한다 (kt00002).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_dt
|
str
|
시작조회기간 ( |
required |
end_dt
|
str
|
종료조회기간 ( |
required |
Returns:
| Type | Description |
|---|---|
list[DailyEstimatedAssetItem]
|
일별추정예탁자산 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_institution_stocks
¶
get_daily_institution_stocks(start_date: str, end_date: str, trade_type: 'InstitutionTradeType', market_type: 'MrktType3', exchange: 'MrkcondExchangeType' = 'all') -> DailyInstitutionStocks
기관 순매도·순매수 상위 종목을 조회한다 (ka10044).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
trade_type
|
'InstitutionTradeType'
|
매매구분. |
required |
market_type
|
'MrktType3'
|
시장구분. |
required |
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
DailyInstitutionStocks
|
일별기관매매종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_main_broker
¶
종목의 당일 주요 거래원(매도/매수 상위 5개)을 조회한다 (ka10040).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
DailyMainBroker
|
당일주요거래원 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 5500 5501 5502 5503 5504 5505 5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 | |
get_daily_prices
¶
get_daily_prices(stock_code: str, query_date: str, display_type: 'DisplayType' = 'qty') -> DailyPrices
일별 주가 및 투자자별 순매수 데이터를 조회한다 (ka10086).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
query_date
|
str
|
조회일자 ( |
required |
display_type
|
'DisplayType'
|
표시구분. |
'qty'
|
Returns:
| Type | Description |
|---|---|
DailyPrices
|
일별주가 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_realized_profit
¶
일자별실현손익을 조회한다 (ka10074).
실현손익이 발생한 일자에 대해서만 데이터가 채워진다.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_dt
|
str
|
시작일자 ( |
required |
end_dt
|
str
|
종료일자 ( |
required |
Returns:
| Type | Description |
|---|---|
DailyRealizedProfit
|
일자별실현손익 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_realized_profit_detail
¶
당일실현손익상세를 조회한다 (ka10077).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드. |
required |
Returns:
| Type | Description |
|---|---|
DailyRealizedProfitDetail
|
당일실현손익상세 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_status
¶
계좌별당일현황을 조회한다 (kt00017).
Returns:
| Type | Description |
|---|---|
DailyAccountStatus
|
계좌별당일현황 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_top_exit
¶
종목의 당일 상위 이탈원 리스트를 조회한다 (ka10053).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
DailyTopExit
|
당일상위이탈원 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_trade_journal
¶
get_daily_trade_journal(single_stock_type: SingleStockType, cash_credit_type: CashCreditType, base_date: str = '') -> DailyTradeJournal
당일매매일지를 조회한다 (ka10170).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
single_stock_type
|
SingleStockType
|
단주구분.
|
required |
cash_credit_type
|
CashCreditType
|
현금신용구분.
|
required |
base_date
|
str
|
기준일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
DailyTradeJournal
|
당일매매일지 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_daily_trade_qty_upper
¶
get_daily_trade_qty_upper(market: 'RkinfoMarketType', sort_type: str, stock_cond: str, credit_type: str, trade_qty_type: str, price_type: str, trade_amt_type: str, market_open_type: MarketOpenType, exchange: 'RkinfoStexType') -> DailyTradeQtyUpper
당일거래량 상위 종목을 조회한다 (ka10030).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
sort_type
|
str
|
정렬구분. |
required |
stock_cond
|
str
|
관리종목포함 ( |
required |
credit_type
|
str
|
신용구분 ( |
required |
trade_qty_type
|
str
|
거래량구분 ( |
required |
price_type
|
str
|
가격구분 ( |
required |
trade_amt_type
|
str
|
거래대금구분 ( |
required |
market_open_type
|
MarketOpenType
|
장운영구분. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
DailyTradeQtyUpper
|
당일거래량상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 | |
get_daily_trading_detail
¶
일별 거래상세(거래량·거래대금·투자자별 순매수 등)를 조회한다 (ka10015).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
start_date
|
str
|
시작일자 ( |
required |
Returns:
| Type | Description |
|---|---|
DailyTradingDetail
|
일별거래상세 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_deposit
¶
예수금상세현황을 조회한다 (kt00001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_type
|
DepositQueryType
|
조회구분. |
'normal'
|
Returns:
| Type | Description |
|---|---|
DepositDetail
|
예수금상세현황 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_elw_access_rate
¶
ELW 근접율을 조회한다 (ka30011).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ELW 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
ElwAccessRate
|
class: |
Source code in src/kiwoompy/query.py
get_elw_bal_rank
¶
get_elw_bal_rank(sort_type: NetTradeType, right_type: 'ElwRightType', exclude_ended: FlagType) -> ElwBalRank
ELW 잔량 순위를 조회한다 (ka30010).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sort_type
|
NetTradeType
|
정렬구분 ( |
required |
right_type
|
'ElwRightType'
|
권리구분 ( |
required |
exclude_ended
|
FlagType
|
거래종료제외 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwBalRank
|
class: |
Source code in src/kiwoompy/query.py
get_elw_broker_net_trade
¶
get_elw_broker_net_trade(issuer_code: str, volume_type: str, trade_type: NetTradeType, duration: str, exclude_ended: FlagType) -> ElwBrokerNetTrade
거래원별 ELW 순매매 상위 종목을 조회한다 (ka30002).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
issuer_code
|
str
|
발행사코드 3자리 (예: |
required |
volume_type
|
str
|
거래량구분 ( |
required |
trade_type
|
NetTradeType
|
매매구분 ( |
required |
duration
|
str
|
기간 ( |
required |
exclude_ended
|
FlagType
|
거래종료ELW제외 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwBrokerNetTrade
|
class: |
Source code in src/kiwoompy/query.py
get_elw_daily_sens
¶
ELW 일별 민감도 지표를 조회한다 (ka10048).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ELW 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
ElwDailySens
|
class: |
Source code in src/kiwoompy/query.py
get_elw_detail
¶
ELW 종목 상세 정보를 조회한다 (ka30012).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ELW 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
ElwDetail
|
class: |
Source code in src/kiwoompy/query.py
8020 8021 8022 8023 8024 8025 8026 8027 8028 8029 8030 8031 8032 8033 8034 8035 8036 8037 8038 8039 8040 8041 8042 8043 8044 8045 8046 8047 8048 8049 8050 8051 8052 8053 8054 8055 8056 8057 8058 8059 8060 8061 8062 8063 8064 8065 8066 8067 8068 8069 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 8082 8083 8084 8085 8086 8087 8088 8089 8090 8091 8092 8093 8094 8095 8096 8097 8098 8099 8100 | |
get_elw_fluc_rank
¶
get_elw_fluc_rank(sort_type: 'ElwSortType', right_type: 'ElwRightType', exclude_ended: str) -> ElwFlucRank
ELW 등락율 순위를 조회한다 (ka30009).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sort_type
|
'ElwSortType'
|
정렬구분 ( |
required |
right_type
|
'ElwRightType'
|
권리구분 ( |
required |
exclude_ended
|
str
|
거래종료제외 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwFlucRank
|
class: |
Source code in src/kiwoompy/query.py
get_elw_gap
¶
get_elw_gap(issuer_code: str, base_asset_code: str, right_type: 'ElwRightType', lp_code: str, exclude_ended: str) -> ElwGap
ELW 괴리율을 조회한다 (ka30004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
issuer_code
|
str
|
발행사코드 12자리 (전체: |
required |
base_asset_code
|
str
|
기초자산코드 12자리 (전체: |
required |
right_type
|
'ElwRightType'
|
권리구분 ( |
required |
lp_code
|
str
|
LP코드 12자리 (전체: |
required |
exclude_ended
|
str
|
거래종료ELW제외 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwGap
|
class: |
Source code in src/kiwoompy/query.py
get_elw_lp_daily
¶
ELW LP 보유 일별 추이를 조회한다 (ka30003).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_asset_code
|
str
|
기초자산코드 (예: |
required |
base_date
|
str
|
기준일자 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwLpDaily
|
class: |
Source code in src/kiwoompy/query.py
get_elw_price_surge
¶
get_elw_price_surge(fluc_type: 'ElwFlucType', time_type: str, time: str, volume_type: str, issuer_code: str, base_asset_code: str, right_type: 'ElwRightType', lp_code: str, exclude_ended: str) -> ElwPriceSurge
ELW 가격급등락 종목을 조회한다 (ka30001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fluc_type
|
'ElwFlucType'
|
등락구분 ( |
required |
time_type
|
str
|
시간구분 ( |
required |
time
|
str
|
시간 (분 또는 일, 예: |
required |
volume_type
|
str
|
거래량구분 ( |
required |
issuer_code
|
str
|
발행사코드 12자리 (전체: |
required |
base_asset_code
|
str
|
기초자산코드 12자리 (전체: |
required |
right_type
|
'ElwRightType'
|
권리구분 ( |
required |
lp_code
|
str
|
LP코드 12자리 (전체: |
required |
exclude_ended
|
str
|
거래종료ELW제외 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwPriceSurge
|
class: |
Source code in src/kiwoompy/query.py
7598 7599 7600 7601 7602 7603 7604 7605 7606 7607 7608 7609 7610 7611 7612 7613 7614 7615 7616 7617 7618 7619 7620 7621 7622 7623 7624 7625 7626 7627 7628 7629 7630 7631 7632 7633 7634 7635 7636 7637 7638 7639 7640 7641 7642 7643 7644 7645 7646 7647 7648 7649 7650 7651 7652 7653 7654 7655 7656 7657 7658 7659 | |
get_elw_search
¶
get_elw_search(issuer_code: str, base_asset_code: str, right_type: 'ElwRightType', lp_code: str, sort_type: 'ElwSortType') -> ElwSearch
ELW 조건검색을 수행한다 (ka30005).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
issuer_code
|
str
|
발행사코드 12자리 (전체: |
required |
base_asset_code
|
str
|
기초자산코드 12자리 (전체: |
required |
right_type
|
'ElwRightType'
|
권리구분 ( |
required |
lp_code
|
str
|
LP코드 12자리 (전체: |
required |
sort_type
|
'ElwSortType'
|
정렬구분 ( |
required |
Returns:
| Type | Description |
|---|---|
ElwSearch
|
class: |
Source code in src/kiwoompy/query.py
7811 7812 7813 7814 7815 7816 7817 7818 7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 | |
get_elw_sens
¶
ELW 민감도 지표를 조회한다 (ka10050).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ELW 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
ElwSens
|
class: |
Source code in src/kiwoompy/query.py
get_estimated_asset
¶
추정자산을 조회한다 (kt00003).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_type
|
DelistedQueryType
|
상장폐지조회구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
EstimatedAsset
|
추정자산 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_etf_all_quote
¶
get_etf_all_quote(tax_type: str, nav_compare: str, asset_manager: str, tax_yn: str, tracking_index: str, exchange: 'ExchangeType') -> EtfAllQuote
ETF 전체 시세를 조회한다 (ka40004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tax_type
|
str
|
과세유형 ( |
required |
nav_compare
|
str
|
NAV대비 ( |
required |
asset_manager
|
str
|
운용사코드 ( |
required |
tax_yn
|
str
|
과세여부 ( |
required |
tracking_index
|
str
|
추적지수 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
EtfAllQuote
|
class: |
Source code in src/kiwoompy/query.py
get_etf_daily_fill
¶
ETF 일자별 체결을 조회한다 (ka40008).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfDailyFill
|
class: |
Source code in src/kiwoompy/query.py
get_etf_daily_trend
¶
ETF 일별 추이를 조회한다 (ka40003).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfDailyTrend
|
class: |
Source code in src/kiwoompy/query.py
get_etf_info
¶
ETF 종목 기본정보를 조회한다 (ka40002).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfInfo
|
class: |
Source code in src/kiwoompy/query.py
get_etf_nav
¶
ETF NAV 데이터를 조회한다 (ka40009).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfNav
|
class: |
Source code in src/kiwoompy/query.py
get_etf_return
¶
ETF 수익율을 조회한다 (ka40001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
index_code
|
str
|
ETF 대상지수코드 (예: |
required |
duration
|
'EtfDuration'
|
기간 ( |
required |
Returns:
| Type | Description |
|---|---|
EtfReturn
|
class: |
Source code in src/kiwoompy/query.py
get_etf_time_fill
¶
ETF 시간대별 체결을 조회한다 (ka40007).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfTimeFill
|
class: |
Source code in src/kiwoompy/query.py
get_etf_time_trend
¶
ETF 시간대별 추이를 조회한다 (ka40006).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfTimeTrend
|
class: |
Source code in src/kiwoompy/query.py
get_etf_time_trend2
¶
ETF 시간대별 추이(외인순매수 포함)를 조회한다 (ka40010).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
ETF 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
EtfTimeTrend2
|
class: |
Source code in src/kiwoompy/query.py
get_execution_balance
¶
체결잔고를 조회한다 (kt00005).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
exchange
|
Literal['KRX', 'NXT']
|
국내거래소구분. |
'KRX'
|
Returns:
| Type | Description |
|---|---|
ExecutionBalance
|
체결잔고 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_execution_info
¶
주식 체결 내역을 조회한다 (ka10003).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
Returns:
| Type | Description |
|---|---|
ExecutionInfo
|
체결정보 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_execution_strength_by_day
¶
체결강도 추이(일별)를 조회한다 (ka10047).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (6자리). |
required |
Returns:
| Type | Description |
|---|---|
ExecutionStrength
|
체결강도 일별 시계열 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_execution_strength_by_time
¶
체결강도 추이(시간별)를 조회한다 (ka10046).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (6자리). |
required |
Returns:
| Type | Description |
|---|---|
ExecutionStrength
|
체결강도 시계열 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_expected_trade_upper
¶
get_expected_trade_upper(market: 'RkinfoMarketType', sort_type: str, trade_qty_cond: str, stock_cond: str, credit_cond: str, price_cond: str, exchange: 'RkinfoStexType') -> ExpectedTradeUpper
예상체결 등락률 상위 종목을 조회한다 (ka10029).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
sort_type
|
str
|
정렬구분.
|
required |
trade_qty_cond
|
str
|
거래량조건 ( |
required |
stock_cond
|
str
|
종목조건 ( |
required |
credit_cond
|
str
|
신용조건 ( |
required |
price_cond
|
str
|
가격조건 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
ExpectedTradeUpper
|
예상체결등락률상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
4803 4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 | |
get_filled_orders
¶
get_filled_orders(query_type: FilledQueryType, sell_type: SellType, exchange: ExchangeType = 'all', stock_code: str = '', order_no: str = '') -> list[FilledOrderItem]
체결 주문 목록을 조회한다 (ka10076).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_type
|
FilledQueryType
|
조회구분. |
required |
sell_type
|
SellType
|
매도수구분. |
required |
exchange
|
ExchangeType
|
거래소구분. |
'all'
|
stock_code
|
str
|
종목코드. 공백 허용. |
''
|
order_no
|
str
|
주문번호. 입력한 주문번호보다 과거에 체결된 내역을 조회한다. |
''
|
Returns:
| Type | Description |
|---|---|
list[FilledOrderItem]
|
체결 주문 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_foreign_broker_trade_upper
¶
get_foreign_broker_trade_upper(market: 'RkinfoMarketType', period: str, trade_type: ForeignBrokerTradeType, sort_type: SortAmtQtyType, exchange: 'RkinfoStexType') -> ForeignBrokerTradeUpper
외국계 창구 매매 상위 종목을 조회한다 (ka10037).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
period
|
str
|
기간. |
required |
trade_type
|
ForeignBrokerTradeType
|
매매구분. |
required |
sort_type
|
SortAmtQtyType
|
정렬구분. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
ForeignBrokerTradeUpper
|
외국계창구매매상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_foreign_consec_trade_upper
¶
get_foreign_consec_trade_upper(market: 'RkinfoMarketType', trade_type: ForeignConsecTradeType, base_date: 'RkinfoBaseDateType', exchange: 'RkinfoStexType') -> ForeignConsecTradeUpper
외국인 연속 순매매 상위 종목을 조회한다 (ka10035).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
trade_type
|
ForeignConsecTradeType
|
매매구분. |
required |
base_date
|
'RkinfoBaseDateType'
|
기준일구분. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
ForeignConsecTradeUpper
|
외인연속순매매상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_foreign_institution_trade_upper
¶
get_foreign_institution_trade_upper(market: 'RkinfoMarketType', amt_qty_type: SortAmtQtyType, query_date_type: ForeignInstitutionQueryDateType, exchange: 'RkinfoStexType', date: str = '') -> ForeignInstitutionTradeUpper
외국인·기관 매매 상위 종목을 조회한다 (ka90009).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
amt_qty_type
|
SortAmtQtyType
|
금액수량구분. |
required |
query_date_type
|
ForeignInstitutionQueryDateType
|
조회일자구분. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
date
|
str
|
날짜 |
''
|
Returns:
| Type | Description |
|---|---|
ForeignInstitutionTradeUpper
|
외국인기관매매상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_foreign_limit_exhaust_upper
¶
get_foreign_limit_exhaust_upper(market: 'RkinfoMarketType', period: str, exchange: 'RkinfoStexType') -> ForeignLimitExhaustUpper
외국인 한도소진율 증가 상위 종목을 조회한다 (ka10036).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
period
|
str
|
기간. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
ForeignLimitExhaustUpper
|
외인한도소진율증가상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_foreign_period_trade_upper
¶
get_foreign_period_trade_upper(market: 'RkinfoMarketType', trade_type: ForeignPeriodTradeType, period: str, exchange: 'RkinfoStexType') -> ForeignPeriodTradeUpper
외국인 기간별 매매 상위 종목을 조회한다 (ka10034).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
trade_type
|
ForeignPeriodTradeType
|
매매구분. |
required |
period
|
str
|
기간. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
ForeignPeriodTradeUpper
|
외인기간별매매상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_foreign_trade_trend
¶
종목별 외국인 매매동향을 조회한다 (ka10008).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
ForeignTrade
|
class: |
Source code in src/kiwoompy/query.py
get_high_low_per
¶
고PER·저PER·PBR·ROE 상위 종목을 조회한다 (ka10026).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
per_type
|
'PERType'
|
PER구분.
|
required |
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
HighLowPER
|
고저PER 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_high_low_stocks
¶
get_high_low_stocks(high_low_type: 'HighLowSelectType', market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all', period: str = '5', stock_condition: str = '0', volume_type: str = '00000', credit_condition: str = '0', include_limit: str = '0', high_low_close_type: str = '1') -> HighLowStocks
신고가·신저가 종목을 조회한다 (ka10016).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
high_low_type
|
'HighLowSelectType'
|
신고저구분. |
required |
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
period
|
str
|
기간 (일). 5·10·20·60·250 중 선택. |
'5'
|
stock_condition
|
str
|
종목조건. |
'0'
|
volume_type
|
str
|
거래량구분. |
'00000'
|
credit_condition
|
str
|
신용조건. |
'0'
|
include_limit
|
str
|
상하한포함. |
'0'
|
high_low_close_type
|
str
|
고저종구분. |
'1'
|
Returns:
| Type | Description |
|---|---|
HighLowStocks
|
신고저가 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_inst_frgn_consecutive_trade
¶
get_inst_frgn_consecutive_trade(duration: 'FrgnDuration', market: str, stock_or_sector: 'FrgnStockSectType', amt_qty: 'SectAmtQtyType', exchange: 'SectExchangeType' = 'krx', start_date: str = '', end_date: str = '') -> InstFrgnConsecutiveTrade
기관·외국인 연속 매매 현황을 조회한다 (ka10131).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
duration
|
'FrgnDuration'
|
기간 ( |
required |
market
|
str
|
장구분 코드 ( |
required |
stock_or_sector
|
'FrgnStockSectType'
|
종목업종구분 ( |
required |
amt_qty
|
'SectAmtQtyType'
|
금액수량구분 ( |
required |
exchange
|
'SectExchangeType'
|
거래소구분 ( |
'krx'
|
start_date
|
str
|
시작일자 ( |
''
|
end_date
|
str
|
종료일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
InstFrgnConsecutiveTrade
|
class: |
Source code in src/kiwoompy/query.py
6872 6873 6874 6875 6876 6877 6878 6879 6880 6881 6882 6883 6884 6885 6886 6887 6888 6889 6890 6891 6892 6893 6894 6895 6896 6897 6898 6899 6900 6901 6902 6903 6904 6905 6906 6907 6908 6909 6910 6911 6912 6913 6914 6915 6916 6917 6918 6919 6920 6921 6922 6923 6924 6925 6926 6927 6928 6929 6930 6931 6932 6933 6934 6935 6936 | |
get_institution_trade
¶
종목별 기관 매매 현황을 조회한다 (ka10009).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
InstitutionTrade
|
class: |
Source code in src/kiwoompy/query.py
get_intra_investor_chart
¶
get_intra_investor_chart(market: 'ChartSectorMarket', stock_code: str, amt_qty_type: 'ChartAmtQtyType', trade_type: 'ChartTradeType') -> IntraInvestorChart
장중 투자자별 매매 차트 데이터를 조회한다 (ka10064).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'ChartSectorMarket'
|
시장구분 ( |
required |
stock_code
|
str
|
거래소별 종목코드. |
required |
amt_qty_type
|
'ChartAmtQtyType'
|
금액수량구분 ( |
required |
trade_type
|
'ChartTradeType'
|
매매구분 ( |
required |
Returns:
| Type | Description |
|---|---|
IntraInvestorChart
|
class: |
Source code in src/kiwoompy/query.py
get_intraday_investor_trading
¶
get_intraday_investor_trading(market_type: 'MrktType3', investor: 'InvestorType', exchange: 'MrkcondExchangeType' = 'all', foreign_all: FlagType = 'off', simultaneous_net_buy: FlagType = 'off') -> IntradayInvestorTrading
장중 투자자별 매매 상위 종목을 조회한다 (ka10063).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market_type
|
'MrktType3'
|
시장구분. |
required |
investor
|
'InvestorType'
|
투자자별.
|
required |
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
foreign_all
|
FlagType
|
외국계전체. |
'off'
|
simultaneous_net_buy
|
FlagType
|
동시순매수구분. |
'off'
|
Returns:
| Type | Description |
|---|---|
IntradayInvestorTrading
|
장중투자자별매매 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_investor_chart
¶
get_investor_chart(date: str, stock_code: str, amt_qty_type: 'ChartAmtQtyType', trade_type: 'ChartTradeType', unit_type: 'ChartUnitType') -> InvestorChart
종목별 투자자기관별 차트 데이터를 조회한다 (ka10060).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
조회일자 ( |
required |
stock_code
|
str
|
거래소별 종목코드. |
required |
amt_qty_type
|
'ChartAmtQtyType'
|
금액수량구분 ( |
required |
trade_type
|
'ChartTradeType'
|
매매구분 ( |
required |
unit_type
|
'ChartUnitType'
|
단위구분 ( |
required |
Returns:
| Type | Description |
|---|---|
InvestorChart
|
class: |
Source code in src/kiwoompy/query.py
get_investor_daily_stocks
¶
get_investor_daily_stocks(start_date: str, end_date: str, trade_type: 'InstitutionTradeType', investor_type: 'InvestorType2', market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all') -> InvestorDailyStocks
투자자별 일별 매매 상위 종목을 조회한다 (ka10058).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
trade_type
|
'InstitutionTradeType'
|
매매구분. |
required |
investor_type
|
'InvestorType2'
|
투자자구분.
|
required |
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
InvestorDailyStocks
|
투자자별일별매매종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_investor_trade_upper
¶
get_investor_trade_upper(trade_type: NetTradeType, market: 'RkinfoMarketType', org_type: 'RkinfoOrgType') -> InvestorTradeUpper
장중 투자자별 매매 상위 종목을 조회한다 (ka10065).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trade_type
|
NetTradeType
|
매매구분. |
required |
market
|
'RkinfoMarketType'
|
시장구분. |
required |
org_type
|
'RkinfoOrgType'
|
기관구분.
|
required |
Returns:
| Type | Description |
|---|---|
InvestorTradeUpper
|
장중투자자별매매상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_limit_stocks
¶
get_limit_stocks(up_down_type: str, market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all', sort_type: str = '1', stock_condition: str = '0', volume_type: str = '00000', credit_condition: str = '0', price_condition: str = '0') -> LimitStocks
상한가·하한가 종목을 조회한다 (ka10017).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
up_down_type
|
str
|
상하한구분.
|
required |
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
sort_type
|
str
|
정렬구분. |
'1'
|
stock_condition
|
str
|
종목조건. |
'0'
|
volume_type
|
str
|
거래량구분. |
'00000'
|
credit_condition
|
str
|
신용조건. |
'0'
|
price_condition
|
str
|
매매금구분. |
'0'
|
Returns:
| Type | Description |
|---|---|
LimitStocks
|
상하한가 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_margin_detail
¶
증거금세부내역을 조회한다 (kt00013).
Returns:
| Type | Description |
|---|---|
MarginDetail
|
증거금세부내역 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_market_summary
¶
종목의 종합 시세표(현재가·호가·예상체결 등)를 조회한다 (ka10007).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
Returns:
| Type | Description |
|---|---|
MarketSummary
|
시세표성정보 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_near_high_low
¶
get_near_high_low(high_low_type: 'HighLowSelectType', approach_rate: str, market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all', volume_type: str = '00000', stock_condition: str = '0', credit_condition: str = '0') -> NearHighLow
고가·저가 근접 종목을 조회한다 (ka10018).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
high_low_type
|
'HighLowSelectType'
|
고저구분. |
required |
approach_rate
|
str
|
근접율. |
required |
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
volume_type
|
str
|
거래량구분. |
'00000'
|
stock_condition
|
str
|
종목조건. |
'0'
|
credit_condition
|
str
|
신용조건. |
'0'
|
Returns:
| Type | Description |
|---|---|
NearHighLow
|
고저가근접 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_net_buy_broker_rank
¶
get_net_buy_broker_rank(stock_code: str, query_date_type: str, sort_base: str, period: str = '', start_date: str = '', end_date: str = '') -> NetBuyBrokerRank
종목의 순매수 거래원 순위를 조회한다 (ka10042).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (예: |
required |
query_date_type
|
str
|
조회기간구분.
|
required |
sort_base
|
str
|
정렬기준. |
required |
period
|
str
|
기간. |
''
|
start_date
|
str
|
시작일자 |
''
|
end_date
|
str
|
종료일자 |
''
|
Returns:
| Type | Description |
|---|---|
NetBuyBrokerRank
|
순매수거래원순위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_newstock_rights_prices
¶
신주인수권 전체 시세를 조회한다 (ka10011).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
rights_type
|
'NewStockRightsType'
|
신주인수권구분.
|
'all'
|
Returns:
| Type | Description |
|---|---|
NewStockRightsPrices
|
신주인수권 시세 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_next_day_settlement
¶
계좌별익일결제예정내역을 조회한다 (kt00008).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
from_settlement_no
|
str
|
시작결제번호. 공백이면 전체. |
''
|
Returns:
| Type | Description |
|---|---|
NextDaySettlement
|
익일결제예정내역 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_open_price_change
¶
get_open_price_change(sort_type: str = '1', change_condition: str = '1', market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all', volume_condition: str = '0000', include_limit: str = '1', stock_condition: str = '0', credit_condition: str = '0', amount_condition: str = '0') -> OpenPriceChange
시가 대비 등락률 상·하위 종목을 조회한다 (ka10028).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sort_type
|
str
|
정렬구분. |
'1'
|
change_condition
|
str
|
등락조건. |
'1'
|
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
volume_condition
|
str
|
거래량조건. |
'0000'
|
include_limit
|
str
|
상하한포함. |
'1'
|
stock_condition
|
str
|
종목조건. |
'0'
|
credit_condition
|
str
|
신용조건. |
'0'
|
amount_condition
|
str
|
거래대금조건. |
'0'
|
Returns:
| Type | Description |
|---|---|
OpenPriceChange
|
시가대비등락률 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_order_execution_status
¶
get_order_execution_status(stock_bond_type: StockBondType, market_type: MarketType, sell_type: SellType, query_type: ExecutionQueryType, exchange: DomesticExchange = 'KRX', order_date: str = '', stock_code: str = '', from_order_no: str = '') -> OrderExecutionStatus
계좌별주문체결현황을 조회한다 (kt00009).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_bond_type
|
StockBondType
|
주식채권구분. |
required |
market_type
|
MarketType
|
시장구분.
|
required |
sell_type
|
SellType
|
매도수구분. |
required |
query_type
|
ExecutionQueryType
|
조회구분. |
required |
exchange
|
DomesticExchange
|
국내거래소구분. 기본값 |
'KRX'
|
order_date
|
str
|
주문일자 ( |
''
|
stock_code
|
str
|
종목코드. 공백이면 전체. |
''
|
from_order_no
|
str
|
시작주문번호. 공백이면 전체. |
''
|
Returns:
| Type | Description |
|---|---|
OrderExecutionStatus
|
주문체결현황 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 | |
get_order_history_detail
¶
get_order_history_detail(query_type: OrderHistoryQueryType, stock_bond_type: StockBondType, sell_type: SellType, exchange: DomesticExchange = '%', order_date: str = '', stock_code: str = '', from_order_no: str = '') -> list[OrderHistoryDetailItem]
계좌별주문체결내역상세를 조회한다 (kt00007).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query_type
|
OrderHistoryQueryType
|
조회구분.
|
required |
stock_bond_type
|
StockBondType
|
주식채권구분. |
required |
sell_type
|
SellType
|
매도수구분. |
required |
exchange
|
DomesticExchange
|
국내거래소구분. 기본값 |
'%'
|
order_date
|
str
|
주문일자 ( |
''
|
stock_code
|
str
|
종목코드. 공백이면 전체 종목. |
''
|
from_order_no
|
str
|
시작주문번호. 공백이면 전체 주문. |
''
|
Returns:
| Type | Description |
|---|---|
list[OrderHistoryDetailItem]
|
주문체결내역 상세 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 | |
get_orderable_amount
¶
get_orderable_amount(stock_code: str, trade_type: TradeSide, price: str, io_amount: str = '', trade_qty: str = '', expected_buy_price: str = '') -> OrderableAmount
주문인출가능금액을 조회한다 (kt00010).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목번호. |
required |
trade_type
|
TradeSide
|
매매구분. |
required |
price
|
str
|
매수가격 (단위: 원). |
required |
io_amount
|
str
|
입출금액. 공백 허용. |
''
|
trade_qty
|
str
|
매매수량. 공백 허용. |
''
|
expected_buy_price
|
str
|
예상매수단가. 공백 허용. |
''
|
Returns:
| Type | Description |
|---|---|
OrderableAmount
|
주문인출가능금액 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_orderable_quantity
¶
증거금율별주문가능수량을 조회한다 (kt00011).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목번호. |
required |
price
|
str
|
매수가격. 공백 허용. |
''
|
Returns:
| Type | Description |
|---|---|
OrderableQuantity
|
증거금율별주문가능수량 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_orderbook
¶
주식 10차 호가 및 잔량을 조회한다 (ka10004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드.
KRX: |
required |
Returns:
| Type | Description |
|---|---|
Orderbook
|
호가 정보 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_prev_trade_qty_upper
¶
get_prev_trade_qty_upper(market: 'RkinfoMarketType', query_type: str, rank_start: str, rank_end: str, exchange: 'RkinfoStexType') -> PrevTradeQtyUpper
전일거래량 상위 종목을 조회한다 (ka10031).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
query_type
|
str
|
조회구분. |
required |
rank_start
|
str
|
순위시작 ( |
required |
rank_end
|
str
|
순위끝 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
PrevTradeQtyUpper
|
전일거래량상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_price_change_upper
¶
get_price_change_upper(market: 'RkinfoMarketType', sort_type: 'RkinfoPriceChangeSortType', trade_qty_cond: str, stock_cond: str, credit_cond: str, updown_incls: str, price_cond: str, trade_amt_cond: str, exchange: 'RkinfoStexType') -> PriceChangeUpper
전일대비 등락률 상위 종목을 조회한다 (ka10027).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
sort_type
|
'RkinfoPriceChangeSortType'
|
정렬구분.
|
required |
trade_qty_cond
|
str
|
거래량조건 ( |
required |
stock_cond
|
str
|
종목조건 ( |
required |
credit_cond
|
str
|
신용조건 ( |
required |
updown_incls
|
str
|
상하한포함. |
required |
price_cond
|
str
|
가격조건 ( |
required |
trade_amt_cond
|
str
|
거래대금조건 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
PriceChangeUpper
|
전일대비등락률상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
4731 4732 4733 4734 4735 4736 4737 4738 4739 4740 4741 4742 4743 4744 4745 4746 4747 4748 4749 4750 4751 4752 4753 4754 4755 4756 4757 4758 4759 4760 4761 4762 4763 4764 4765 4766 4767 4768 4769 4770 4771 4772 4773 4774 4775 4776 4777 4778 4779 4780 4781 4782 4783 4784 4785 4786 4787 4788 4789 4790 4791 4792 4793 4794 4795 4796 4797 | |
get_price_surge_stocks
¶
get_price_surge_stocks(surge_type: str, time_type: str, time_value: str, market_type: 'MrktType3Ext' = 'all', exchange: 'MrkcondExchangeType' = 'all', volume_type: str = '00000', stock_condition: str = '0', credit_condition: str = '0', price_condition: str = '0', include_limit: str = '1') -> PriceSurgeStocks
가격 급등·급락 종목을 조회한다 (ka10019).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
surge_type
|
str
|
등락구분. |
required |
time_type
|
str
|
시간구분. |
required |
time_value
|
str
|
시간(분 또는 일). 예) |
required |
market_type
|
'MrktType3Ext'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
volume_type
|
str
|
거래량구분. |
'00000'
|
stock_condition
|
str
|
종목조건. |
'0'
|
credit_condition
|
str
|
신용조건. |
'0'
|
price_condition
|
str
|
가격조건. |
'0'
|
include_limit
|
str
|
상하한포함. |
'1'
|
Returns:
| Type | Description |
|---|---|
PriceSurgeStocks
|
가격급등락 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 | |
get_program_acc_trend
¶
get_program_acc_trend(date: str, amt_qty_type: str, market_type: str, exchange: 'ExchangeType') -> ProgramAccTrend
프로그램 매매 누적 추이를 조회한다 (ka90007).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
날짜 ( |
required |
amt_qty_type
|
str
|
금액수량구분 ( |
required |
market_type
|
str
|
시장구분 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
ProgramAccTrend
|
class: |
Source code in src/kiwoompy/query.py
get_program_arbitrage_bal
¶
프로그램 매매 차익 잔고 추이를 조회한다 (ka90006).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
날짜 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
ProgramArbitrageBal
|
class: |
Source code in src/kiwoompy/query.py
get_program_top50
¶
get_program_top50(trade_upper_type: str, amt_qty_type: str, market_type: str, exchange: 'ExchangeType') -> ProgramTop50
프로그램 순매수 상위 50 종목을 조회한다 (ka90003).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
trade_upper_type
|
str
|
매매상위구분 ( |
required |
amt_qty_type
|
str
|
금액수량구분 ( |
required |
market_type
|
str
|
시장구분 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
ProgramTop50
|
class: |
Source code in src/kiwoompy/query.py
get_program_trend_by_day
¶
get_program_trend_by_day(date: str, amt_qty_type: str, market_type: str, min_tic_type: str, exchange: 'ExchangeType') -> ProgramTrend
프로그램 매매 추이(일자별)를 조회한다 (ka90010).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
날짜 ( |
required |
amt_qty_type
|
str
|
금액수량구분 ( |
required |
market_type
|
str
|
시장구분 ( |
required |
min_tic_type
|
str
|
분틱구분 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
ProgramTrend
|
class: |
Source code in src/kiwoompy/query.py
get_program_trend_by_time
¶
get_program_trend_by_time(date: str, amt_qty_type: str, market_type: str, min_tic_type: str, exchange: 'ExchangeType') -> ProgramTrend
프로그램 매매 추이(시간대별)를 조회한다 (ka90005).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
날짜 ( |
required |
amt_qty_type
|
str
|
금액수량구분 ( |
required |
market_type
|
str
|
시장구분 ( |
required |
min_tic_type
|
str
|
분틱구분 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
ProgramTrend
|
class: |
Source code in src/kiwoompy/query.py
get_qty_ratio_surge
¶
get_qty_ratio_surge(market: 'RkinfoMarketType', ratio_type: str, time_min: str, trade_qty_type: str, stock_cond: str, exchange: 'RkinfoStexType') -> QtyRatioSurge
잔량율 급증 종목을 조회한다 (ka10022).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
ratio_type
|
str
|
비율구분. |
required |
time_min
|
str
|
시간구분 (분 입력, 예: |
required |
trade_qty_type
|
str
|
거래량구분.
|
required |
stock_cond
|
str
|
종목조건 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
QtyRatioSurge
|
잔량율급증 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_realized_profit_by_date
¶
일자별종목별실현손익(일자 기준)을 조회한다 (ka10072).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_dt
|
str
|
시작일자 ( |
required |
stock_code
|
str
|
종목코드. 공백이면 전체 종목. |
''
|
Returns:
| Type | Description |
|---|---|
list[RealizedProfitByDateItem]
|
일자별종목별실현손익 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_realized_profit_by_period
¶
get_realized_profit_by_period(start_dt: str, end_dt: str, stock_code: str = '') -> list[RealizedProfitByPeriodItem]
일자별종목별실현손익(기간 기준)을 조회한다 (ka10073).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_dt
|
str
|
시작일자 ( |
required |
end_dt
|
str
|
종료일자 ( |
required |
stock_code
|
str
|
종목코드. 공백이면 전체 종목. |
''
|
Returns:
| Type | Description |
|---|---|
list[RealizedProfitByPeriodItem]
|
일자별종목별실현손익 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_same_net_trade_rank
¶
get_same_net_trade_rank(start_date: str, market: 'RkinfoMarketType', trade_type: NetTradeType, sort_cnd: 'RkinfoSortCndType', unit_type: TradeUnitType, exchange: 'RkinfoStexType', end_date: str = '') -> SameNetTradeRank
기관·외국인 동일 순매매 순위를 조회한다 (ka10062).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
str
|
시작일자 |
required |
market
|
'RkinfoMarketType'
|
시장구분. |
required |
trade_type
|
NetTradeType
|
매매구분. |
required |
sort_cnd
|
'RkinfoSortCndType'
|
정렬조건. |
required |
unit_type
|
TradeUnitType
|
단위구분. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
end_date
|
str
|
종료일자 |
''
|
Returns:
| Type | Description |
|---|---|
SameNetTradeRank
|
동일순매매순위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
5614 5615 5616 5617 5618 5619 5620 5621 5622 5623 5624 5625 5626 5627 5628 5629 5630 5631 5632 5633 5634 5635 5636 5637 5638 5639 5640 5641 5642 5643 5644 5645 5646 5647 5648 5649 5650 5651 5652 5653 5654 5655 5656 5657 5658 5659 5660 5661 5662 5663 5664 5665 5666 5667 5668 5669 5670 5671 5672 5673 5674 5675 5676 | |
get_sector_daily_price
¶
업종 현재가 일별 데이터를 조회한다 (ka20009).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'SectMrktType'
|
시장구분 ( |
required |
sector_code
|
str
|
업종코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
SectorDailyPrice
|
class: |
Source code in src/kiwoompy/query.py
get_sector_day_chart
¶
업종 일봉 차트 데이터를 조회한다 (ka20006).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
Returns:
| Type | Description |
|---|---|
SectorDayChart
|
class: |
Source code in src/kiwoompy/query.py
get_sector_investor_net_buy
¶
get_sector_investor_net_buy(market: 'SectMrktType', amt_qty: 'SectAmtQtyType', base_date: str = '', exchange: 'SectExchangeType' = 'all') -> SectorInvestorNetBuy
업종별 투자자 순매수 현황을 조회한다 (ka10051).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'SectMrktType'
|
시장구분 ( |
required |
amt_qty
|
'SectAmtQtyType'
|
금액수량구분 ( |
required |
base_date
|
str
|
기준일자 ( |
''
|
exchange
|
'SectExchangeType'
|
거래소구분 ( |
'all'
|
Returns:
| Type | Description |
|---|---|
SectorInvestorNetBuy
|
class: |
Source code in src/kiwoompy/query.py
get_sector_list
¶
시장별 업종코드 리스트를 조회한다 (ka10101).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market_type
|
'SectorMarketType'
|
시장구분.
|
'kospi'
|
Returns:
| Type | Description |
|---|---|
SectorList
|
업종코드 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_sector_min_chart
¶
get_sector_min_chart(sector_code: str, min_scope: 'ChartMinScope', base_date: str = '') -> SectorMinChart
업종 분봉 차트 데이터를 조회한다 (ka20005).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드. |
required |
min_scope
|
'ChartMinScope'
|
분봉 범위 ( |
required |
base_date
|
str
|
기준일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
SectorMinChart
|
class: |
Source code in src/kiwoompy/query.py
get_sector_month_chart
¶
업종 월봉 차트 데이터를 조회한다 (ka20008).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
Returns:
| Type | Description |
|---|---|
SectorMonthChart
|
class: |
Source code in src/kiwoompy/query.py
get_sector_price
¶
업종 현재가 정보를 조회한다 (ka20001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'SectMrktType'
|
시장구분 ( |
required |
sector_code
|
str
|
업종코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
SectorPrice
|
class: |
Source code in src/kiwoompy/query.py
get_sector_program
¶
업종 프로그램 매매 정보를 조회한다 (ka10010).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (예: |
required |
Returns:
| Type | Description |
|---|---|
SectorProgram
|
class: |
Source code in src/kiwoompy/query.py
get_sector_stock_prices
¶
get_sector_stock_prices(market: 'SectMrktType', sector_code: str, exchange: 'SectExchangeType' = 'krx') -> SectorStockPrices
업종 내 구성 종목별 주가를 조회한다 (ka20002).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'SectMrktType'
|
시장구분 ( |
required |
sector_code
|
str
|
업종코드 (예: |
required |
exchange
|
'SectExchangeType'
|
거래소구분 ( |
'krx'
|
Returns:
| Type | Description |
|---|---|
SectorStockPrices
|
class: |
Source code in src/kiwoompy/query.py
get_sector_tick_chart
¶
업종 틱 차트 데이터를 조회한다 (ka20004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드 (예: |
required |
tick_scope
|
'ChartTickScope'
|
틱 범위 ( |
required |
Returns:
| Type | Description |
|---|---|
SectorTickChart
|
class: |
Source code in src/kiwoompy/query.py
get_sector_week_chart
¶
업종 주봉 차트 데이터를 조회한다 (ka20007).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
Returns:
| Type | Description |
|---|---|
SectorWeekChart
|
class: |
Source code in src/kiwoompy/query.py
get_sector_year_chart
¶
업종 년봉 차트 데이터를 조회한다 (ka20019).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sector_code
|
str
|
업종코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
Returns:
| Type | Description |
|---|---|
SectorYearChart
|
class: |
Source code in src/kiwoompy/query.py
get_short_sell_trend
¶
get_short_sell_trend(stock_code: str, start_date: str, end_date: str, time_type: TimeRangeType = 'period') -> ShortSellTrend
종목별 공매도 추이를 조회한다 (ka10014).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (예: |
required |
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
time_type
|
TimeRangeType
|
시간구분 ( |
'period'
|
Returns:
| Type | Description |
|---|---|
ShortSellTrend
|
class: |
Source code in src/kiwoompy/query.py
get_split_order_detail
¶
미체결 분할주문 상세를 조회한다 (ka10088).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
order_no
|
str
|
주문번호. |
required |
Returns:
| Type | Description |
|---|---|
list[SplitOrderDetailItem]
|
미체결 분할주문 상세 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_broker_rank
¶
get_stock_broker_rank(stock_code: str, query_type: str, period: str = '', start_date: str = '', end_date: str = '') -> StockBrokerRank
종목별 증권사 순위를 조회한다 (ka10038).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (예: |
required |
query_type
|
str
|
조회구분. |
required |
period
|
str
|
기간. |
''
|
start_date
|
str
|
시작일자 |
''
|
end_date
|
str
|
종료일자 |
''
|
Returns:
| Type | Description |
|---|---|
StockBrokerRank
|
종목별증권사순위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_brokers
¶
주식 매도·매수 상위 5개 거래원을 조회한다 (ka10002).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
Returns:
| Type | Description |
|---|---|
StockBrokers
|
매도·매수 거래원 정보 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_daily_program
¶
get_stock_daily_program(stock_code: str, amt_qty_type: str = '', date: str = '') -> StockDailyProgram
종목 일별 프로그램 매매 추이를 조회한다 (ka90013).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (예: |
required |
amt_qty_type
|
str
|
금액수량구분 ( |
''
|
date
|
str
|
날짜 ( |
''
|
Returns:
| Type | Description |
|---|---|
StockDailyProgram
|
class: |
Source code in src/kiwoompy/query.py
get_stock_day_chart
¶
get_stock_day_chart(stock_code: str, base_date: str, adjusted: 'ChartAdjustedPrice' = 'adjusted') -> StockDayChart
주식 일봉 차트 데이터를 조회한다 (ka10081).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
adjusted
|
'ChartAdjustedPrice'
|
수정주가 반영 여부. |
'adjusted'
|
Returns:
| Type | Description |
|---|---|
StockDayChart
|
class: |
Source code in src/kiwoompy/query.py
get_stock_detail
¶
단일 종목의 상세 정보를 조회한다 (ka10100).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (6자리 단축코드). |
required |
Returns:
| Type | Description |
|---|---|
StockDetail
|
종목 상세정보 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_info
¶
주식 기본정보(현재가·재무지표·시가총액 등)를 조회한다 (ka10001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
Returns:
| Type | Description |
|---|---|
StockInfo
|
주식기본정보 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_institution_trend
¶
get_stock_institution_trend(stock_code: str, start_date: str, end_date: str, org_price_type: 'EstimatedPriceType' = 'buy', for_price_type: 'EstimatedPriceType' = 'buy') -> StockInstitutionTrend
종목별 기관·외인 매매 추이를 조회한다 (ka10045).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
org_price_type
|
'EstimatedPriceType'
|
기관추정단가구분. |
'buy'
|
for_price_type
|
'EstimatedPriceType'
|
외인추정단가구분. |
'buy'
|
Returns:
| Type | Description |
|---|---|
StockInstitutionTrend
|
종목별기관매매추이 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_investor_by_day
¶
get_stock_investor_by_day(date: str, stock_code: str, trade_type: 'InvestorTradeType' = 'net_buy', amount_qty_type: 'AmtQtyType' = 'amount', unit_type: 'UnitType' = 'thousand') -> StockInvestorByDay
종목별 투자자·기관별 일별 매매 현황을 조회한다 (ka10059).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
조회일자 ( |
required |
stock_code
|
str
|
거래소별 종목코드. |
required |
trade_type
|
'InvestorTradeType'
|
매매구분. |
'net_buy'
|
amount_qty_type
|
'AmtQtyType'
|
금액수량구분. |
'amount'
|
unit_type
|
'UnitType'
|
단위구분. |
'thousand'
|
Returns:
| Type | Description |
|---|---|
StockInvestorByDay
|
종목별투자자기관별 일별 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_investor_total
¶
get_stock_investor_total(stock_code: str, start_date: str, end_date: str, trade_type: 'InvestorTradeType' = 'net_buy', amount_qty_type: 'AmtQtyType' = 'amount', unit_type: 'UnitType' = 'thousand') -> StockInvestorTotal
종목별 투자자·기관별 기간 합계를 조회한다 (ka10061).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
start_date
|
str
|
시작일자 ( |
required |
end_date
|
str
|
종료일자 ( |
required |
trade_type
|
'InvestorTradeType'
|
매매구분. |
'net_buy'
|
amount_qty_type
|
'AmtQtyType'
|
금액수량구분. |
'amount'
|
unit_type
|
'UnitType'
|
단위구분. |
'thousand'
|
Returns:
| Type | Description |
|---|---|
StockInvestorTotal
|
투자자·기관별 합계 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_list
¶
시장별 상장 종목 리스트를 조회한다 (ka10099).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market_type
|
'StkMarketType'
|
시장구분.
|
'kospi'
|
Returns:
| Type | Description |
|---|---|
StockList
|
종목정보 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_loan_history
¶
일자별 대차거래 내역을 조회한다 (ka90012).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
조회일자 ( |
required |
market
|
'SlbMrktType'
|
시장구분 ( |
required |
Returns:
| Type | Description |
|---|---|
StockLoanHistory
|
class: |
Source code in src/kiwoompy/query.py
get_stock_loan_top10
¶
대차거래 상위 10종목을 조회한다 (ka10069).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
str
|
시작일자 ( |
required |
market
|
'SlbMrktType'
|
시장구분 ( |
required |
end_date
|
str
|
종료일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
StockLoanTop10
|
class: |
Source code in src/kiwoompy/query.py
get_stock_loan_trend
¶
전체 대차거래 추이를 조회한다 (ka10068).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_date
|
str
|
시작일자 ( |
''
|
end_date
|
str
|
종료일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
StockLoanTrend
|
class: |
Source code in src/kiwoompy/query.py
get_stock_loan_trend_by_stock
¶
get_stock_loan_trend_by_stock(stock_code: str, start_date: str = '', end_date: str = '') -> StockLoanByStock
종목별 대차거래 추이를 조회한다 (ka20068).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
종목코드 (예: |
required |
start_date
|
str
|
시작일자 ( |
''
|
end_date
|
str
|
종료일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
StockLoanByStock
|
class: |
Source code in src/kiwoompy/query.py
get_stock_min_chart
¶
get_stock_min_chart(stock_code: str, min_scope: 'ChartMinScope', adjusted: 'ChartAdjustedPrice' = 'adjusted', base_date: str = '') -> StockMinChart
주식 분봉 차트 데이터를 조회한다 (ka10080).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
min_scope
|
'ChartMinScope'
|
분봉 범위 ( |
required |
adjusted
|
'ChartAdjustedPrice'
|
수정주가 반영 여부. |
'adjusted'
|
base_date
|
str
|
기준일자 ( |
''
|
Returns:
| Type | Description |
|---|---|
StockMinChart
|
class: |
Source code in src/kiwoompy/query.py
get_stock_minutes
¶
주식 시·분 시세를 조회한다 (ka10006).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
Returns:
| Type | Description |
|---|---|
StockMinutes
|
시분 시세 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_month_chart
¶
get_stock_month_chart(stock_code: str, base_date: str, adjusted: 'ChartAdjustedPrice' = 'adjusted') -> StockMonthChart
주식 월봉 차트 데이터를 조회한다 (ka10083).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
adjusted
|
'ChartAdjustedPrice'
|
수정주가 반영 여부. |
'adjusted'
|
Returns:
| Type | Description |
|---|---|
StockMonthChart
|
class: |
Source code in src/kiwoompy/query.py
get_stock_periods
¶
주식의 일·주·월·시·분 OHLCV 데이터를 조회한다 (ka10005).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
Returns:
| Type | Description |
|---|---|
StockPeriods
|
기간별 OHLCV 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_stock_program_status
¶
get_stock_program_status(date: str, market_type: str, exchange: 'ExchangeType') -> StockProgramStatus
종목별 프로그램 매매 현황을 조회한다 (ka90004).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date
|
str
|
일자 ( |
required |
market_type
|
str
|
시장구분 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
Returns:
| Type | Description |
|---|---|
StockProgramStatus
|
class: |
Source code in src/kiwoompy/query.py
get_stock_tick_chart
¶
get_stock_tick_chart(stock_code: str, tick_scope: 'ChartTickScope', adjusted: 'ChartAdjustedPrice' = 'adjusted') -> StockTickChart
주식 틱 차트 데이터를 조회한다 (ka10079).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드 (예: |
required |
tick_scope
|
'ChartTickScope'
|
틱 범위 ( |
required |
adjusted
|
'ChartAdjustedPrice'
|
수정주가 반영 여부 ( |
'adjusted'
|
Returns:
| Type | Description |
|---|---|
StockTickChart
|
class: |
Source code in src/kiwoompy/query.py
get_stock_time_program
¶
종목 시간별 프로그램 매매 추이를 조회한다 (ka90008).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
amt_qty_type
|
str
|
금액수량구분 ( |
required |
stock_code
|
str
|
종목코드 (예: |
required |
date
|
str
|
날짜 ( |
required |
Returns:
| Type | Description |
|---|---|
StockTimeProgram
|
class: |
Source code in src/kiwoompy/query.py
get_stock_week_chart
¶
get_stock_week_chart(stock_code: str, base_date: str, adjusted: 'ChartAdjustedPrice' = 'adjusted') -> StockWeekChart
주식 주봉 차트 데이터를 조회한다 (ka10082).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
adjusted
|
'ChartAdjustedPrice'
|
수정주가 반영 여부. |
'adjusted'
|
Returns:
| Type | Description |
|---|---|
StockWeekChart
|
class: |
Source code in src/kiwoompy/query.py
get_stock_year_chart
¶
get_stock_year_chart(stock_code: str, base_date: str, adjusted: 'ChartAdjustedPrice' = 'adjusted') -> StockYearChart
주식 년봉 차트 데이터를 조회한다 (ka10094).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
base_date
|
str
|
기준일자 ( |
required |
adjusted
|
'ChartAdjustedPrice'
|
수정주가 반영 여부. |
'adjusted'
|
Returns:
| Type | Description |
|---|---|
StockYearChart
|
class: |
Source code in src/kiwoompy/query.py
get_supply_concentration
¶
get_supply_concentration(concentration_rate: str, supply_count: str, cycle_type: str = '50', market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all', current_price_entry: str = '0') -> SupplyConcentration
매물대가 집중된 종목을 조회한다 (ka10025).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
concentration_rate
|
str
|
매물집중비율 (0~100). |
required |
supply_count
|
str
|
매물대수 (숫자 입력). |
required |
cycle_type
|
str
|
주기구분.
|
'50'
|
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
current_price_entry
|
str
|
현재가진입. |
'0'
|
Returns:
| Type | Description |
|---|---|
SupplyConcentration
|
매물대집중 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_theme_group
¶
get_theme_group(search_type: 'ThemeSearchType', days: str, profit_type: str, exchange: 'ExchangeType', stock_code: str = '', theme_name: str = '') -> ThemeGroup
테마 그룹별 정보를 조회한다 (ka90001).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
search_type
|
'ThemeSearchType'
|
검색구분 ( |
required |
days
|
str
|
날짜구분 — n일 전 ( |
required |
profit_type
|
str
|
등락수익구분 ( |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
stock_code
|
str
|
검색 종목코드 (종목검색 시 사용, 기본값: |
''
|
theme_name
|
str
|
검색 테마명 (테마검색 시 사용, 기본값: |
''
|
Returns:
| Type | Description |
|---|---|
ThemeGroup
|
class: |
Source code in src/kiwoompy/query.py
get_theme_stocks
¶
테마 구성 종목을 조회한다 (ka90002).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theme_group_code
|
str
|
테마그룹코드 (예: |
required |
exchange
|
'ExchangeType'
|
거래소구분 ( |
required |
days
|
str
|
날짜구분 — n일 전 (기본값: |
''
|
Returns:
| Type | Description |
|---|---|
ThemeStocks
|
class: |
Source code in src/kiwoompy/query.py
get_today_prev_execution
¶
get_today_prev_execution(stock_code: str, day_type: 'TodayPrevType' = 'today', tick_min: 'TickMinType' = 'tick', time: str = '') -> TodayPrevExecution
당일·전일 체결 데이터를 조회한다 (ka10084).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
day_type
|
'TodayPrevType'
|
당일전일구분. |
'today'
|
tick_min
|
'TickMinType'
|
틱분. |
'tick'
|
time
|
str
|
조회시간 (4자리 |
''
|
Returns:
| Type | Description |
|---|---|
TodayPrevExecution
|
당일전일체결 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_today_prev_execution_qty
¶
get_today_prev_execution_qty(stock_code: str, day_type: 'TodayPrevType' = 'today') -> TodayPrevExecutionQty
당일·전일 체결량 시계열을 조회한다 (ka10055).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
str
|
거래소별 종목코드. |
required |
day_type
|
'TodayPrevType'
|
당일전일구분. |
'today'
|
Returns:
| Type | Description |
|---|---|
TodayPrevExecutionQty
|
당일전일체결량 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_trade_amt_upper
¶
get_trade_amt_upper(market: 'RkinfoMarketType', include_managed: FlagType, exchange: 'RkinfoStexType') -> TradeAmtUpper
거래대금 상위 종목을 조회한다 (ka10032).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
include_managed
|
FlagType
|
관리종목포함. |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
Returns:
| Type | Description |
|---|---|
TradeAmtUpper
|
거래대금상위 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_trade_qty_surge
¶
get_trade_qty_surge(market: 'RkinfoMarketType', sort_type: str, time_type: str, trade_qty_type: str, stock_cond: str, price_type: str, exchange: 'RkinfoStexType', time: str = '') -> TradeQtySurge
거래량 급증 종목을 조회한다 (ka10023).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market
|
'RkinfoMarketType'
|
시장구분. |
required |
sort_type
|
str
|
정렬구분.
|
required |
time_type
|
str
|
시간구분. |
required |
trade_qty_type
|
str
|
거래량구분 ( |
required |
stock_cond
|
str
|
종목조건 ( |
required |
price_type
|
str
|
가격구분 ( |
required |
exchange
|
'RkinfoStexType'
|
거래소구분. |
required |
time
|
str
|
분 입력 ( |
''
|
Returns:
| Type | Description |
|---|---|
TradeQtySurge
|
거래량급증 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 | |
get_transaction_history
¶
get_transaction_history(start_dt: str, end_dt: str, trade_type: TransactionType, goods_type: GoodsType, exchange: DomesticExchange = '%', stock_code: str = '', currency_code: str = '', foreign_exchange_code: str = '') -> list[TransactionHistoryItem]
위탁종합거래내역을 조회한다 (kt00015).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start_dt
|
str
|
시작일자 ( |
required |
end_dt
|
str
|
종료일자 ( |
required |
trade_type
|
TransactionType
|
구분.
|
required |
goods_type
|
GoodsType
|
상품구분.
|
required |
exchange
|
DomesticExchange
|
국내거래소구분. 기본값 |
'%'
|
stock_code
|
str
|
종목코드. 공백 허용. |
''
|
currency_code
|
str
|
통화코드. 공백 허용. |
''
|
foreign_exchange_code
|
str
|
해외거래소코드. 공백 허용. |
''
|
Returns:
| Type | Description |
|---|---|
list[TransactionHistoryItem]
|
위탁종합거래내역 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 | |
get_unfilled_orders
¶
get_unfilled_orders(all_stock_type: AllStockType, trade_type: UnfilledTradeType, exchange: ExchangeType = 'all', stock_code: str = '') -> list[UnfilledOrderItem]
미체결 주문 목록을 조회한다 (ka10075).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
all_stock_type
|
AllStockType
|
전체종목구분. |
required |
trade_type
|
UnfilledTradeType
|
매매구분. |
required |
exchange
|
ExchangeType
|
거래소구분. |
'all'
|
stock_code
|
str
|
종목코드. |
''
|
Returns:
| Type | Description |
|---|---|
list[UnfilledOrderItem]
|
미체결 주문 목록. |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_vi_triggered_stocks
¶
get_vi_triggered_stocks(market_type: 'MrktType3' = 'all', exchange: 'MrkcondExchangeType' = 'all', stock_code: str = '', trigger_type: str = '0', trigger_direction: str = '0', pre_market_type: str = '0', skip_stocks: str = '000000000') -> VIStocks
변동성완화장치(VI) 발동 종목을 조회한다 (ka10054).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
stock_code
|
str
|
종목코드. 공백이면 전체 시장 조회. |
''
|
trigger_type
|
str
|
발동구분. |
'0'
|
trigger_direction
|
str
|
발동방향. |
'0'
|
pre_market_type
|
str
|
장전구분. |
'0'
|
skip_stocks
|
str
|
제외종목 (9자리). 전종목포함: |
'000000000'
|
Returns:
| Type | Description |
|---|---|
VIStocks
|
VI 발동종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_volume_updated_stocks
¶
get_volume_updated_stocks(market_type: 'MrktType3' = 'all', cycle_type: str = '5', volume_type: str = '5', exchange: 'MrkcondExchangeType' = 'all') -> VolumeUpdatedStocks
기간 대비 거래량이 갱신된 종목을 조회한다 (ka10024).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
market_type
|
'MrktType3'
|
시장구분. |
'all'
|
cycle_type
|
str
|
주기구분. |
'5'
|
volume_type
|
str
|
거래량구분.
|
'5'
|
exchange
|
'MrkcondExchangeType'
|
거래소구분. |
'all'
|
Returns:
| Type | Description |
|---|---|
VolumeUpdatedStocks
|
거래량갱신 종목 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
get_watchlist_info
¶
관심종목 정보(현재가·호가·시가총액 등)를 조회한다 (ka10095).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_codes
|
str
|
종목코드. 여러 종목은 |
required |
Returns:
| Type | Description |
|---|---|
WatchlistInfo
|
관심종목 정보 리스트 |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류 또는 조회 실패. |
Source code in src/kiwoompy/query.py
gold_bid
¶
금현물 호가를 조회한다 (ka50101).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
tick_scope
|
str
|
틱범위. |
required |
Returns:
| Type | Description |
|---|---|
GoldBid
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_contract_trend
¶
금현물체결추이를 조회한다 (ka50010).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
Returns:
| Type | Description |
|---|---|
GoldContractTrend
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_daily_chart
¶
gold_daily_chart(stock_code: GoldStockCode, base_date: str, adjust_price: str = '1') -> GoldDailyChart
금현물일봉차트를 조회한다 (ka50081).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
base_date
|
str
|
기준일자 ( |
required |
adjust_price
|
str
|
수정주가구분. |
'1'
|
Returns:
| Type | Description |
|---|---|
GoldDailyChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_daily_minute_chart
¶
금현물당일분봉차트를 조회한다 (ka50092).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
tick_scope
|
str
|
틱범위(분). |
required |
Returns:
| Type | Description |
|---|---|
GoldDailyMinuteChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_daily_tick_chart
¶
금현물당일틱차트를 조회한다 (ka50091).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
tick_scope
|
str
|
틱범위. |
required |
Returns:
| Type | Description |
|---|---|
GoldDailyTickChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_daily_trend
¶
금현물일별추이를 조회한다 (ka50012).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
base_date
|
str
|
기준일자 ( |
required |
Returns:
| Type | Description |
|---|---|
GoldDailyTrend
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_expected_contract
¶
금현물예상체결을 조회한다 (ka50087).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
Returns:
| Type | Description |
|---|---|
GoldExpectedContract
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_investor_status
¶
금현물투자자현황을 조회한다 (ka52301).
Returns:
| Type | Description |
|---|---|
GoldInvestorStatus
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_market_info
¶
금현물 시세정보를 조회한다 (ka50100).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
Returns:
| Type | Description |
|---|---|
GoldMarketInfo
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_minute_chart
¶
gold_minute_chart(stock_code: GoldStockCode, tick_scope: str, adjust_price: str = '1') -> GoldMinuteChart
금현물분봉차트를 조회한다 (ka50080).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
tick_scope
|
str
|
틱범위(분). |
required |
adjust_price
|
str
|
수정주가구분. |
'1'
|
Returns:
| Type | Description |
|---|---|
GoldMinuteChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_monthly_chart
¶
gold_monthly_chart(stock_code: GoldStockCode, base_date: str, adjust_price: str = '1') -> GoldMonthlyChart
금현물월봉차트를 조회한다 (ka50083).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
base_date
|
str
|
기준일자 ( |
required |
adjust_price
|
str
|
수정주가구분. |
'1'
|
Returns:
| Type | Description |
|---|---|
GoldMonthlyChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_tick_chart
¶
gold_tick_chart(stock_code: GoldStockCode, tick_scope: str, adjust_price: str = '1') -> GoldTickChart
금현물틱차트를 조회한다 (ka50079).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
tick_scope
|
str
|
틱범위. |
required |
adjust_price
|
str
|
수정주가구분. |
'1'
|
Returns:
| Type | Description |
|---|---|
GoldTickChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |
Source code in src/kiwoompy/query.py
gold_weekly_chart
¶
gold_weekly_chart(stock_code: GoldStockCode, base_date: str, adjust_price: str = '1') -> GoldWeeklyChart
금현물주봉차트를 조회한다 (ka50082).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stock_code
|
GoldStockCode
|
금현물 종목코드.
|
required |
base_date
|
str
|
기준일자 ( |
required |
adjust_price
|
str
|
수정주가구분. |
'1'
|
Returns:
| Type | Description |
|---|---|
GoldWeeklyChart
|
class: |
Raises:
| Type | Description |
|---|---|
KiwoomAuthError
|
토큰 미발급 또는 인증 실패. |
KiwoomApiError
|
서버 오류. |