import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import logging
logging.basicConfig(
format='%(asctime)s [%(levelname)s] %(message)s - %(filename)s:%(lineno)d',
level=logging.DEBUG)
logging.getLogger('matplotlib').setLevel(logging.WARNING)
from koapy import KiwoomOpenApiPlusEntrypoint
2021-07-20 10:24:37,545 [DEBUG] Checking module path from config - GetAPIModulePath.py:14 2021-07-20 10:24:37,547 [DEBUG] Checking module path in-directly in 64bit - GetAPIModulePath.py:45 2021-07-20 10:24:42,795 [DEBUG] Reading file C:\OpenAPI\data\nkrealtime.dat - KiwoomOpenApiPlusRealType.py:116
entrypoint = KiwoomOpenApiPlusEntrypoint()
2021-07-20 10:24:45,351 [DEBUG] Testing if client is ready... - KiwoomOpenApiPlusEntrypoint.py:56 2021-07-20 10:24:55,355 [DEBUG] Client is not ready, creating a new server - KiwoomOpenApiPlusEntrypoint.py:58
์ฃผ์ํ ๊ธฐ๋ฅ๋ค์ ํด๋น ์ํธ๋ฆฌํฌ์ธํธ์ ๋ฉค๋ฒํจ์๋ก์จ ์ ๊ณต๋๋ค.
์๋ฅผ ๋ค์ด ์๋์ ๊ฐ์ด ์๋ฒ ์ ์ ์ด์ ์๋ ์คํ ๊ฐ๋ฅํ ์๋ ํจ์๋ฅผ ํ์ฉํ๋ฉด OpenAPI ๊ฐ ์ ์์ ์ผ๋ก ๋ก๋๋์๋์ง ๊ฐ์ ์ ์ผ๋ก ํ์ธ ๊ฐ๋ฅํ๋ค.
module_path = entrypoint.GetAPIModulePath()
module_path
'C:\\OpenAPI'
entrypoint.EnsureConnected()
0
์๋ ๋ก๊ทธ์ธ ์ค์ ์ด ๋์ด์๋ ๊ฒฝ์ฐ ๋ก๊ทธ์ธ์ด ์๋์ผ๋ก ์ฒ๋ฆฌ๋๋ฉฐ, ๊ทธ๋ ์ง ์์ ๊ฒฝ์ฐ์๋ ์๋์ผ๋ก ์์ด๋, ๋น๋ฐ๋ฒํธ ๋ฑ ๋ก๊ทธ์ธ ์ ๋ณด๋ฅผ ์ ๋ ฅํด ์ฒ๋ฆฌํด์ฃผ์ด์ผ ํ๋ค.
๋ง์ฝ์ ํจ์ ์ธ์๋ก credential
์ ๋ณด๋ฅผ ์ฃผ๋ ๊ฒฝ์ฐ pywinauto
๋ฅผ ํ์ฉํ์ฌ ์๋์ผ๋ก ๋ก๊ทธ์ธ ์ฒ๋ฆฌ๋ฅผ ์งํํ๋ค.
์์ ์ธ๊ธํ ํค์์ฆ๊ถ์์ ๊ธฐ๋ณธ์ผ๋ก ์ ๊ณตํ๋ ์๋ ๋ก๊ทธ์ธ์ด ์๋๋ผ ๊ธฐ์กด์ ์๋์ผ๋ก ์ฒ๋ฆฌํ๋ ๊ณผ์ ์ ๋งคํฌ๋ก ํํ๋ก ์๋์ผ๋ก ์ฒ๋ฆฌํ๋ ๋ฐฉ์์ด๋ค.
์ฐธ๊ณ ๋ก pywinauto
์ฌ์ฉ์ ์ํด์๋ ๊ด๋ฆฌ์ ๊ถํ์ด ํ์ํ๋ค.
credential = {
'user_id': 'id',
'user_password': 'password',
'cert_password': 'password',
'is_simulation': True,
'account_passwords': {
'0000000000': '0000',
}
}
entrypoint.EnsureConnected(credential)
0
์ฐธ๊ณ ๋ก ์ฌ๊ธฐ์๋ ์ด๋ฏธ ๋ก๊ทธ์ธ์ด ๋์ด์๋ ์ํฉ์ด๋ฏ๋ก ์์ ํจ์๊ฐ ์ถ๊ฐ์ ์ธ ๋ก๊ทธ์ธ์ฒ๋ฆฌ๋ฅผ ์งํํ์ง๋ ์๊ฒ ๋๋ค.
๋ค์ ํ๋ฒ ๊ธฐ๋ณธ ํจ์๋ฅผ ํตํด ์ ์์ํ๋ฅผ ํ์ธํด๋ณด์. ์๋ ๊ฐ์ด 1 ์ธ ๊ฒฝ์ฐ ์ ์ ์ ์ ์ํ์ด๋ค. ์ ์๋์ด ์์ง ์์ ๊ฒฝ์ฐ๋ผ๋ฉด 0 ์ ๋ฐํํ๋ค.
entrypoint.GetConnectState()
1
์ดํ ์์๋ค์์ ์ฌ์ฉํ๊ธฐ ์ํด ์ผ์ฑ์ ์์ ์ฝ๋๋ฅผ ํ์ธํ๋ค.
codes = entrypoint.GetCodeListByMarketAsList('0')
names = [entrypoint.GetMasterCodeName(code) for code in codes]
codes_by_name = dict(zip(names, codes))
์์์ GetCodeListByMarketAsList()
ํจ์๋ ๊ธฐ์กด์ GetCodeListByMarket()
ํจ์ ํธ์ถ์ ๋์ค๋ ๋ฌธ์์ด ํํ์ ๊ฒฐ๊ณผ๋ฅผ ํธ์๋ฅผ ์ํด ๋ฆฌ์คํธ ํํ๋ก ๋ณํํด์ ์ ๊ณตํ๋ค.
code = samsung_code = codes_by_name['์ผ์ฑ์ ์']
code
'005930'
๋ช๊ฐ์ง ์์ฃผ ์ฐ์ด๋ TR ๋ค์ ๋ํด์๋ ์์ฒญ ๋ฐ ๊ฒฐ๊ณผ ์ด๋ฒคํธ ์ฒ๋ฆฌ๊น์ง ์๋ฃํด์ ๊ฒฐ๊ณผ๋ฌผ๋ง ๋ฐํํ๋ ์์ํจ์๋ฅผ ์ ๊ณตํ๊ณ ์๋ค.
info = entrypoint.GetStockBasicInfoAsDict(code) # opt10001
info
{'์ข ๋ชฉ์ฝ๋': '005930', '์ข ๋ชฉ๋ช ': '์ผ์ฑ์ ์', '๊ฒฐ์ฐ์': '12', '์ก๋ฉด๊ฐ': '100', '์๋ณธ๊ธ': '7780', '์์ฅ์ฃผ์': '5969783', '์ ์ฉ๋น์จ': '+0.16', '์ฐ์ค์ต๊ณ ': '+96800', '์ฐ์ค์ต์ ': '-78400', '์๊ฐ์ด์ก': '4698219', '์๊ฐ์ด์ก๋น์ค': '', '์ธ์ธ์์ง๋ฅ ': '+53.43', '๋์ฉ๊ฐ': '63200', 'PER': '20.49', 'EPS': '3841', 'ROE': '10.0', 'PBR': '2.00', 'EV': '5.51', 'BPS': '39406', '๋งค์ถ์ก': '2368070', '์์ ์ด์ต': '359939', '๋น๊ธฐ์์ด์ต': '264078', '250์ต๊ณ ': '+96800', '250์ต์ ': '-53700', '์๊ฐ': '-78500', '๊ณ ๊ฐ': '-78900', '์ ๊ฐ': '-78400', '์ํ๊ฐ': '+102500', 'ํํ๊ฐ': '-55300', '๊ธฐ์ค๊ฐ': '79000', '์์์ฒด๊ฒฐ๊ฐ': '-0', '์์์ฒด๊ฒฐ์๋': '0', '250์ต๊ณ ๊ฐ์ผ': '20210111', '250์ต๊ณ ๊ฐ๋๋น์จ': '-18.70', '250์ต์ ๊ฐ์ผ': '20200724', '250์ต์ ๊ฐ๋๋น์จ': '+46.55', 'ํ์ฌ๊ฐ': '-78700', '๋๋น๊ธฐํธ': '5', '์ ์ผ๋๋น': '-300', '๋ฑ๋ฝ์จ': '-0.38', '๊ฑฐ๋๋': '4672311', '๊ฑฐ๋๋๋น': '-35.52', '์ก๋ฉด๊ฐ๋จ์': '์', '์ ํต์ฃผ์': '4454030', '์ ํต๋น์จ': '74.6'}
data = entrypoint.GetDailyStockDataAsDataFrame(code) # opt10081
2021-07-20 10:25:07,842 [DEBUG] Received 600 records from 2021-07-20 00:00:00 to 2019-02-19 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:08,204 [DEBUG] Received 600 records from 2019-02-18 00:00:00 to 2016-09-01 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:08,568 [DEBUG] Received 600 records from 2016-08-31 00:00:00 to 2014-03-26 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:08,919 [DEBUG] Received 600 records from 2014-03-25 00:00:00 to 2011-10-25 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:25,825 [DEBUG] Received 600 records from 2011-10-24 00:00:00 to 2009-06-03 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:26,184 [DEBUG] Received 600 records from 2009-06-02 00:00:00 to 2006-12-27 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:26,571 [DEBUG] Received 600 records from 2006-12-26 00:00:00 to 2004-08-02 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:26,937 [DEBUG] Received 600 records from 2004-07-30 00:00:00 to 2002-02-22 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:27,289 [DEBUG] Received 600 records from 2002-02-21 00:00:00 to 1999-09-07 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:43,822 [DEBUG] Received 600 records from 1999-09-06 00:00:00 to 1997-07-11 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:44,184 [DEBUG] Received 600 records from 1997-07-10 00:00:00 to 1995-06-24 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:44,549 [DEBUG] Received 600 records from 1995-06-23 00:00:00 to 1993-06-15 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:44,953 [DEBUG] Received 600 records from 1993-06-14 00:00:00 to 1991-05-29 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:25:45,340 [DEBUG] Received 600 records from 1991-05-28 00:00:00 to 1989-05-04 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:01,829 [DEBUG] Received 600 records from 1989-05-03 00:00:00 to 1987-04-14 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:02,197 [DEBUG] Received 600 records from 1987-04-13 00:00:00 to 1985-03-29 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:02,228 [DEBUG] Received 69 records from 1985-03-28 00:00:00 to 1985-01-04 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599
data
์ข ๋ชฉ์ฝ๋ | ํ์ฌ๊ฐ | ๊ฑฐ๋๋ | ๊ฑฐ๋๋๊ธ | ์ผ์ | ์๊ฐ | ๊ณ ๊ฐ | ์ ๊ฐ | ์์ ์ฃผ๊ฐ๊ตฌ๋ถ | ์์ ๋น์จ | ๋์ ์ข ๊ตฌ๋ถ | ์์ ์ข ๊ตฌ๋ถ | ์ข ๋ชฉ์ ๋ณด | ์์ ์ฃผ๊ฐ์ด๋ฒคํธ | ์ ์ผ์ข ๊ฐ | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 005930 | 78700 | 4672315 | 367197 | 20210720 | 78500 | 78900 | 78400 | |||||||
1 | 79000 | 13155414 | 1039019 | 20210719 | 79100 | 79200 | 78800 | ||||||||
2 | 79800 | 10859399 | 865953 | 20210716 | 80100 | 80100 | 79500 | ||||||||
3 | 80600 | 13766279 | 1102123 | 20210715 | 79800 | 80600 | 79500 | ||||||||
4 | 79500 | 11575636 | 918601 | 20210714 | 79400 | 79600 | 79100 | ||||||||
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
9664 | 8010 | 4970 | 1 | 19850109 | 8240 | 8240 | 7950 | ||||||||
9665 | 8300 | 12930 | 4 | 19850108 | 8400 | 8400 | 8300 | ||||||||
9666 | 8410 | 11810 | 3 | 19850107 | 8400 | 8500 | 8390 | ||||||||
9667 | 8390 | 1660 | 0 | 19850105 | 8400 | 8440 | 8390 | ||||||||
9668 | 8450 | 1710 | 0 | 19850104 | 8500 | 8500 | 8450 |
9669 rows ร 15 columns
๋ฐ์ดํฐ๊ฐ ์ต๋ํ ์๋ ๊ทธ๋๋ก (์ฃผ๋ก ๋ฌธ์์ด ํํ๋ก) ๋ฐํ๋๊ธฐ ๋๋ฌธ์ ํ์ํ๋ค๋ฉด ํ์ ๋ณํ์ ๊ฑฐ์ณ ์ฌ์ฉํ๋ค.
dates = pd.to_datetime(data['์ผ์'], format='%Y%m%d')
closes = pd.to_numeric(data['ํ์ฌ๊ฐ'])
plt.plot(dates, closes)
[<matplotlib.lines.Line2D at 0x17cb8832730>]
์ฃผ๊ฐ ๋ฐ์ดํฐ์์ ์์ ์ฃผ๊ฐ๊ฐ ํ์ํ ๊ฒฝ์ฐ์๋ adjusted_price=True
ํ๋ผ๋ฏธํฐ๋ฅผ ์ค์ ํด ํธ์ถํ๋ค.
data_adjusted = entrypoint.GetDailyStockDataAsDataFrame(code, adjusted_price=True)
2021-07-20 10:26:02,984 [DEBUG] Received 600 records from 2021-07-20 00:00:00 to 2019-02-19 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:03,362 [DEBUG] Received 600 records from 2019-02-18 00:00:00 to 2016-09-01 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:19,849 [DEBUG] Received 600 records from 2016-08-31 00:00:00 to 2014-03-26 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:20,206 [DEBUG] Received 600 records from 2014-03-25 00:00:00 to 2011-10-25 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:20,561 [DEBUG] Received 600 records from 2011-10-24 00:00:00 to 2009-06-03 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:21,000 [DEBUG] Received 600 records from 2009-06-02 00:00:00 to 2006-12-27 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:21,372 [DEBUG] Received 600 records from 2006-12-26 00:00:00 to 2004-08-02 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:37,880 [DEBUG] Received 600 records from 2004-07-30 00:00:00 to 2002-02-22 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:38,237 [DEBUG] Received 600 records from 2002-02-21 00:00:00 to 1999-09-07 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:38,609 [DEBUG] Received 600 records from 1999-09-06 00:00:00 to 1997-07-11 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:39,012 [DEBUG] Received 600 records from 1997-07-10 00:00:00 to 1995-06-24 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:39,369 [DEBUG] Received 600 records from 1995-06-23 00:00:00 to 1993-06-15 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:55,853 [DEBUG] Received 600 records from 1993-06-14 00:00:00 to 1991-05-29 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:56,338 [DEBUG] Received 600 records from 1991-05-28 00:00:00 to 1989-05-04 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:56,663 [DEBUG] Received 600 records from 1989-05-03 00:00:00 to 1987-04-14 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:57,031 [DEBUG] Received 600 records from 1987-04-13 00:00:00 to 1985-03-29 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599 2021-07-20 10:26:57,067 [DEBUG] Received 69 records from 1985-03-28 00:00:00 to 1985-01-04 00:00:00 for code 005930 - KiwoomOpenApiPlusServiceClientStubWrapper.py:599
dates = pd.to_datetime(data_adjusted['์ผ์'], format='%Y%m%d')
closes = pd.to_numeric(data_adjusted['ํ์ฌ๊ฐ'])
plt.plot(dates, closes)
[<matplotlib.lines.Line2D at 0x17cbc5f70d0>]
๋ง์ฝ์ ํ์ํ TR ์ ๋ํ ํธ์ํจ์๊ฐ ์ ๊ณต๋์ง ์๋ ๊ฒฝ์ฐ๋ผ๋ฉด ์๋์ฒ๋ผ ์ง์ TR ์์ฒญ์ ํ์ํ ์ ๋ ฅ๊ฐ์ ์ค์ ํด ์์ฒญํ๊ณ , ์ดํ ์คํธ๋ฆผ ํํ๋ก ๋ค์ด์ค๋ ์ด๋ฒคํธ ๋ํ ์ง์ ์ฒ๋ฆฌํด์ฃผ๋ ๋ฐฉ์์ผ๋ก ์ฌ์ฉํ ์ ์๋ค.
rqname = '์ฃผ์๊ธฐ๋ณธ์ ๋ณด์์ฒญ'
trcode = 'opt10001'
screen_no = '0001' # ํ๋ฉด๋ฒํธ, 0000 ์ ์ ์ธํ 4์๋ฆฌ ์ซ์ ์์๋ก ์ง์
inputs = {'์ข
๋ชฉ์ฝ๋': code}
output = {}
logging.info('Requesting data for request name: %s', rqname)
for event in entrypoint.TransactionCall(rqname, trcode, screen_no, inputs):
logging.info('Got event for request: %s', rqname)
names = event.single_data.names
values = event.single_data.values
for name, value in zip(names, values):
output[name] = value
2021-07-20 10:26:57,296 [INFO] Requesting data for request name: ์ฃผ์๊ธฐ๋ณธ์ ๋ณด์์ฒญ - <ipython-input-27-84e17a5232d0>:1 2021-07-20 10:27:13,444 [INFO] Got event for request: ์ฃผ์๊ธฐ๋ณธ์ ๋ณด์์ฒญ - <ipython-input-27-84e17a5232d0>:3
output
{'์ข ๋ชฉ์ฝ๋': '005930', '์ข ๋ชฉ๋ช ': '์ผ์ฑ์ ์', '๊ฒฐ์ฐ์': '12', '์ก๋ฉด๊ฐ': '100', '์๋ณธ๊ธ': '7780', '์์ฅ์ฃผ์': '5969783', '์ ์ฉ๋น์จ': '+0.16', '์ฐ์ค์ต๊ณ ': '+96800', '์ฐ์ค์ต์ ': '-78400', '์๊ฐ์ด์ก': '4698219', '์๊ฐ์ด์ก๋น์ค': '', '์ธ์ธ์์ง๋ฅ ': '+53.43', '๋์ฉ๊ฐ': '63200', 'PER': '20.49', 'EPS': '3841', 'ROE': '10.0', 'PBR': '2.00', 'EV': '5.51', 'BPS': '39406', '๋งค์ถ์ก': '2368070', '์์ ์ด์ต': '359939', '๋น๊ธฐ์์ด์ต': '264078', '250์ต๊ณ ': '+96800', '250์ต์ ': '-53700', '์๊ฐ': '-78500', '๊ณ ๊ฐ': '-78900', '์ ๊ฐ': '-78400', '์ํ๊ฐ': '+102500', 'ํํ๊ฐ': '-55300', '๊ธฐ์ค๊ฐ': '79000', '์์์ฒด๊ฒฐ๊ฐ': '-0', '์์์ฒด๊ฒฐ์๋': '0', '250์ต๊ณ ๊ฐ์ผ': '20210111', '250์ต๊ณ ๊ฐ๋๋น์จ': '-18.70', '250์ต์ ๊ฐ์ผ': '20200724', '250์ต์ ๊ฐ๋๋น์จ': '+46.55', 'ํ์ฌ๊ฐ': '-78700', '๋๋น๊ธฐํธ': '5', '์ ์ผ๋๋น': '-300', '๋ฑ๋ฝ์จ': '-0.38', '๊ฑฐ๋๋': '4698491', '๊ฑฐ๋๋๋น': '-35.72', '์ก๋ฉด๊ฐ๋จ์': '์', '์ ํต์ฃผ์': '4454030', '์ ํต๋น์จ': '74.6'}
์์ ์ฝ๋์์ TransactionCall()
ํจ์์ ๊ฒฝ์ฐ ๋ฐํ๋๋ ์คํธ๋ฆผ์ event
๊ฐ์ฒด๋ ListenResponse
ํ์
์ gRPC ๋ฉ์์ง ํํ๋ก ๋ฐํ๋๋ค.
from pprint import PrettyPrinter
from google.protobuf.json_format import MessageToDict
pp = PrettyPrinter()
def pprint_event(event):
pp.pprint(MessageToDict(event, preserving_proto_field_name=True))
pprint_event(event)
{'arguments': [{'string_value': '0001'}, {'string_value': '์ฃผ์๊ธฐ๋ณธ์ ๋ณด์์ฒญ'}, {'string_value': 'opt10001'}, {'string_value': ''}, {'string_value': '0'}], 'name': 'OnReceiveTrData', 'single_data': {'names': ['์ข ๋ชฉ์ฝ๋', '์ข ๋ชฉ๋ช ', '๊ฒฐ์ฐ์', '์ก๋ฉด๊ฐ', '์๋ณธ๊ธ', '์์ฅ์ฃผ์', '์ ์ฉ๋น์จ', '์ฐ์ค์ต๊ณ ', '์ฐ์ค์ต์ ', '์๊ฐ์ด์ก', '์๊ฐ์ด์ก๋น์ค', '์ธ์ธ์์ง๋ฅ ', '๋์ฉ๊ฐ', 'PER', 'EPS', 'ROE', 'PBR', 'EV', 'BPS', '๋งค์ถ์ก', '์์ ์ด์ต', '๋น๊ธฐ์์ด์ต', '250์ต๊ณ ', '250์ต์ ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ํ๊ฐ', 'ํํ๊ฐ', '๊ธฐ์ค๊ฐ', '์์์ฒด๊ฒฐ๊ฐ', '์์์ฒด๊ฒฐ์๋', '250์ต๊ณ ๊ฐ์ผ', '250์ต๊ณ ๊ฐ๋๋น์จ', '250์ต์ ๊ฐ์ผ', '250์ต์ ๊ฐ๋๋น์จ', 'ํ์ฌ๊ฐ', '๋๋น๊ธฐํธ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๊ฑฐ๋๋', '๊ฑฐ๋๋๋น', '์ก๋ฉด๊ฐ๋จ์', '์ ํต์ฃผ์', '์ ํต๋น์จ'], 'values': ['005930', '์ผ์ฑ์ ์', '12', '100', '7780', '5969783', '+0.16', '+96800', '-78400', '4698219', '', '+53.43', '63200', '20.49', '3841', '10.0', '2.00', '5.51', '39406', '2368070', '359939', '264078', '+96800', '-53700', '-78500', '-78900', '-78400', '+102500', '-55300', '79000', '-0', '0', '20210111', '-18.70', '20200724', '+46.55', '-78700', '5', '-300', '-0.38', '4698491', '-35.72', '์', '4454030', '74.6']}}
ํด๋น ๋ฉ์์ง์ ํํ๋ koapy/backend/kiwoom_open_api_plus/grpc/KiwoomOpenApiPlusService.proto
ํ์ผ์ ๋ด์ฉ, ๊ตฌ์ฒด์ ์ผ๋ก ์๋์ ๊ฐ์ ๋ฉ์์ง์ ์ ์ ๋ถ๋ถ์ ์ฐธ๊ณ ํ๊ธฐ ๋ฐ๋๋ค.
message ListenResponse {
string name = 1;
repeated Argument arguments = 2;
SingleData single_data = 3;
MultiData multi_data = 4;
}
๊ฐ TR ์ ๋ฐ๋ผ ์ฑ๊ธ๋ฐ์ดํฐ/๋ฉํฐ๋ฐ์ดํฐ๊ฐ ์ ํ์ ์ผ๋ก ์ค์ ๋์ด ๋ฐํ๋๋๋ฐ, ๊ทธ๋ฌํ ์
๋ ฅ/์ถ๋ ฅ๊ณผ ๊ด๋ จ๋ ์ ๋ณด๋ค์ KOAStudio ํ๋ก๊ทธ๋จ์ ํ์ฉํ๊ฑฐ๋ ์๋๋ฉด ์๋์ฒ๋ผ KiwoomOpenApiPlusTrInfo
๋ฅผ ํตํด ํ๋ก๊ทธ๋จ ๋ด์์ ํ์ธํ ์ ์๋ค.
from koapy import KiwoomOpenApiPlusTrInfo
2021-07-20 10:27:13,508 [DEBUG] Reading files under C:\OpenAPI\data - KiwoomOpenApiPlusTrInfo.py:218 2021-07-20 10:27:13,509 [DEBUG] Reading file OPT10001.dat inside C:\OpenAPI\data\opt10001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,511 [DEBUG] Reading file OPT10059.dat inside C:\OpenAPI\data\opt10001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,512 [DEBUG] Reading file OPT10087.dat inside C:\OpenAPI\data\opt10001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,513 [DEBUG] Reading file OPT50037.dat inside C:\OpenAPI\data\opt10001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,514 [DEBUG] Reading file OPT90005.dat inside C:\OpenAPI\data\opt10001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,515 [DEBUG] Reading file OPT10002.dat inside C:\OpenAPI\data\opt10002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,516 [DEBUG] Reading file OPT10003.dat inside C:\OpenAPI\data\opt10003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,518 [DEBUG] Reading file OPT10004.dat inside C:\OpenAPI\data\opt10004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,520 [DEBUG] Reading file OPT10005.dat inside C:\OpenAPI\data\opt10005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,522 [DEBUG] Reading file OPT10006.dat inside C:\OpenAPI\data\opt10006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,524 [DEBUG] Reading file OPT10007.dat inside C:\OpenAPI\data\opt10007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,525 [DEBUG] Reading file OPT10008.dat inside C:\OpenAPI\data\opt10008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,527 [DEBUG] Reading file OPT10009.dat inside C:\OpenAPI\data\opt10009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,529 [DEBUG] Reading file OPT10010.dat inside C:\OpenAPI\data\opt10010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,530 [DEBUG] Reading file OPT10011.dat inside C:\OpenAPI\data\opt10011.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,531 [DEBUG] Reading file OPT10012.dat inside C:\OpenAPI\data\opt10012.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,533 [DEBUG] Reading file OPT10013.dat inside C:\OpenAPI\data\opt10013.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,534 [DEBUG] Reading file OPT10014.dat inside C:\OpenAPI\data\opt10014.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,535 [DEBUG] Reading file OPT10015.dat inside C:\OpenAPI\data\opt10015.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,537 [DEBUG] Reading file OPT10016.dat inside C:\OpenAPI\data\opt10016.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,538 [DEBUG] Reading file OPT10017.dat inside C:\OpenAPI\data\opt10017.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,539 [DEBUG] Reading file OPT10018.dat inside C:\OpenAPI\data\opt10018.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,541 [DEBUG] Reading file OPT10019.dat inside C:\OpenAPI\data\opt10019.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,543 [DEBUG] Reading file OPT10020.dat inside C:\OpenAPI\data\opt10020.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,544 [DEBUG] Reading file OPT10021.dat inside C:\OpenAPI\data\opt10021.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,546 [DEBUG] Reading file OPT10022.dat inside C:\OpenAPI\data\opt10022.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,547 [DEBUG] Reading file OPT10023.dat inside C:\OpenAPI\data\opt10023.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,548 [DEBUG] Reading file OPT10024.dat inside C:\OpenAPI\data\opt10024.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,549 [DEBUG] Reading file OPT10025.dat inside C:\OpenAPI\data\opt10025.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,550 [DEBUG] Reading file OPT10026.dat inside C:\OpenAPI\data\opt10026.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,552 [DEBUG] Reading file OPT10027.dat inside C:\OpenAPI\data\opt10027.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,553 [DEBUG] Reading file OPT10028.dat inside C:\OpenAPI\data\opt10028.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,554 [DEBUG] Reading file OPT10029.dat inside C:\OpenAPI\data\opt10029.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,555 [DEBUG] Reading file OPT10030.dat inside C:\OpenAPI\data\opt10030.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,556 [DEBUG] Reading file OPT10031.dat inside C:\OpenAPI\data\opt10031.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,557 [DEBUG] Reading file OPT10032.dat inside C:\OpenAPI\data\opt10032.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,558 [DEBUG] Reading file OPT10033.dat inside C:\OpenAPI\data\opt10033.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,559 [DEBUG] Reading file OPT10034.dat inside C:\OpenAPI\data\opt10034.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,560 [DEBUG] Reading file OPT10035.dat inside C:\OpenAPI\data\opt10035.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,562 [DEBUG] Reading file OPT10036.dat inside C:\OpenAPI\data\opt10036.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,563 [DEBUG] Reading file OPT10037.dat inside C:\OpenAPI\data\opt10037.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,564 [DEBUG] Reading file OPT10038.dat inside C:\OpenAPI\data\opt10038.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,565 [DEBUG] Reading file OPT10039.dat inside C:\OpenAPI\data\opt10039.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,566 [DEBUG] Reading file OPT10040.dat inside C:\OpenAPI\data\opt10040.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,567 [DEBUG] Reading file OPT10041.dat inside C:\OpenAPI\data\opt10041.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,568 [DEBUG] Reading file OPT10042.dat inside C:\OpenAPI\data\opt10042.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,569 [DEBUG] Reading file OPT10043.dat inside C:\OpenAPI\data\opt10043.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,571 [DEBUG] Reading file OPT10044.dat inside C:\OpenAPI\data\opt10044.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,572 [DEBUG] Reading file OPT10045.dat inside C:\OpenAPI\data\opt10045.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,573 [DEBUG] Reading file OPT10046.dat inside C:\OpenAPI\data\opt10046.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,574 [DEBUG] Reading file OPT10047.dat inside C:\OpenAPI\data\opt10047.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,575 [DEBUG] Reading file OPT10048.dat inside C:\OpenAPI\data\opt10048.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,575 [DEBUG] Reading file OPT10049.dat inside C:\OpenAPI\data\opt10049.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,576 [DEBUG] Reading file OPT10050.dat inside C:\OpenAPI\data\opt10050.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,577 [DEBUG] Reading file OPT10051.dat inside C:\OpenAPI\data\opt10051.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,578 [DEBUG] Reading file OPT10052.dat inside C:\OpenAPI\data\opt10052.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,579 [DEBUG] Reading file OPT10053.dat inside C:\OpenAPI\data\opt10053.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,581 [DEBUG] Reading file OPT10054.dat inside C:\OpenAPI\data\opt10054.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,582 [DEBUG] Reading file OPT10055.dat inside C:\OpenAPI\data\opt10055.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,583 [DEBUG] Reading file OPT10058.dat inside C:\OpenAPI\data\opt10058.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,585 [DEBUG] Reading file OPT10059.dat inside C:\OpenAPI\data\opt10059.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,586 [DEBUG] Reading file OPT10060.dat inside C:\OpenAPI\data\opt10060.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,588 [DEBUG] Reading file OPT10061.dat inside C:\OpenAPI\data\opt10061.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,589 [DEBUG] Reading file OPT10062.dat inside C:\OpenAPI\data\opt10062.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,590 [DEBUG] Reading file OPT10063.dat inside C:\OpenAPI\data\opt10063.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,591 [DEBUG] Reading file OPT10064.dat inside C:\OpenAPI\data\opt10064.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,592 [DEBUG] Reading file OPT10065.dat inside C:\OpenAPI\data\opt10065.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,593 [DEBUG] Reading file OPT10066.dat inside C:\OpenAPI\data\opt10066.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,594 [DEBUG] Reading file OPT10067.dat inside C:\OpenAPI\data\opt10067.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,595 [DEBUG] Reading file OPT10068.dat inside C:\OpenAPI\data\opt10068.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,596 [DEBUG] Reading file OPT10069.dat inside C:\OpenAPI\data\opt10069.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,597 [DEBUG] Reading file OPT10070.dat inside C:\OpenAPI\data\opt10070.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,599 [DEBUG] Reading file OPT10071.dat inside C:\OpenAPI\data\opt10071.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,600 [DEBUG] Reading file OPT10072.dat inside C:\OpenAPI\data\opt10072.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,601 [DEBUG] Reading file OPT10073.dat inside C:\OpenAPI\data\opt10073.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,602 [DEBUG] Reading file OPT10074.dat inside C:\OpenAPI\data\opt10074.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,603 [DEBUG] Reading file OPT10075.dat inside C:\OpenAPI\data\opt10075.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,605 [DEBUG] Reading file OPT10076.dat inside C:\OpenAPI\data\opt10076.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,606 [DEBUG] Reading file OPT10077.dat inside C:\OpenAPI\data\opt10077.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,607 [DEBUG] Reading file OPT10078.dat inside C:\OpenAPI\data\opt10078.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,608 [DEBUG] Reading file OPT10079.dat inside C:\OpenAPI\data\opt10079.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,609 [DEBUG] Reading file OPT10080.dat inside C:\OpenAPI\data\opt10080.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,611 [DEBUG] Reading file OPT10081.dat inside C:\OpenAPI\data\opt10081.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,612 [DEBUG] Reading file OPT10082.dat inside C:\OpenAPI\data\opt10082.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,613 [DEBUG] Reading file OPT10083.dat inside C:\OpenAPI\data\opt10083.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,614 [DEBUG] Reading file OPT10084.dat inside C:\OpenAPI\data\opt10084.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,615 [DEBUG] Reading file OPT10085.dat inside C:\OpenAPI\data\opt10085.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,616 [DEBUG] Reading file OPT10086.dat inside C:\OpenAPI\data\opt10086.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,617 [DEBUG] Reading file OPT10087.dat inside C:\OpenAPI\data\opt10087.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,618 [DEBUG] Reading file OPT10094.dat inside C:\OpenAPI\data\opt10094.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,620 [DEBUG] Reading file OPT20001.dat inside C:\OpenAPI\data\opt20001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,622 [DEBUG] Reading file OPT20002.dat inside C:\OpenAPI\data\opt20002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,623 [DEBUG] Reading file OPT20003.dat inside C:\OpenAPI\data\opt20003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,624 [DEBUG] Reading file OPT20004.dat inside C:\OpenAPI\data\opt20004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,625 [DEBUG] Reading file OPT20005.dat inside C:\OpenAPI\data\opt20005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,626 [DEBUG] Reading file OPT20006.dat inside C:\OpenAPI\data\opt20006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,627 [DEBUG] Reading file OPT20007.dat inside C:\OpenAPI\data\opt20007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,628 [DEBUG] Reading file OPT20008.dat inside C:\OpenAPI\data\opt20008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,629 [DEBUG] Reading file OPT20009.dat inside C:\OpenAPI\data\opt20009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,630 [DEBUG] Reading file OPT20019.dat inside C:\OpenAPI\data\opt20019.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,631 [DEBUG] Reading file OPT20068.dat inside C:\OpenAPI\data\opt20068.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,632 [DEBUG] Reading file OPT30001.dat inside C:\OpenAPI\data\opt30001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,633 [DEBUG] Reading file OPT30002.dat inside C:\OpenAPI\data\opt30002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,634 [DEBUG] Reading file OPT30003.dat inside C:\OpenAPI\data\opt30003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,635 [DEBUG] Reading file OPT30004.dat inside C:\OpenAPI\data\opt30004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,636 [DEBUG] Reading file OPT30005.dat inside C:\OpenAPI\data\opt30005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,637 [DEBUG] Reading file OPT30006.dat inside C:\OpenAPI\data\opt30006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,638 [DEBUG] Reading file OPT30007.dat inside C:\OpenAPI\data\opt30007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,640 [DEBUG] Reading file OPT30008.dat inside C:\OpenAPI\data\opt30008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,641 [DEBUG] Reading file OPT30009.dat inside C:\OpenAPI\data\opt30009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,642 [DEBUG] Reading file OPT30010.dat inside C:\OpenAPI\data\opt30010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,643 [DEBUG] Reading file OPT30011.dat inside C:\OpenAPI\data\opt30011.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,644 [DEBUG] Reading file OPT30012.dat inside C:\OpenAPI\data\opt30012.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,645 [DEBUG] Reading file OPT40001.dat inside C:\OpenAPI\data\opt40001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,647 [DEBUG] Reading file OPT40002.dat inside C:\OpenAPI\data\opt40002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,648 [DEBUG] Reading file OPT40003.dat inside C:\OpenAPI\data\opt40003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,649 [DEBUG] Reading file OPT40004.dat inside C:\OpenAPI\data\opt40004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,650 [DEBUG] Reading file OPT40005.dat inside C:\OpenAPI\data\opt40005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,651 [DEBUG] Reading file OPT40006.dat inside C:\OpenAPI\data\opt40006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,652 [DEBUG] Reading file OPT40007.dat inside C:\OpenAPI\data\opt40007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,653 [DEBUG] Reading file OPT40008.dat inside C:\OpenAPI\data\opt40008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,654 [DEBUG] Reading file OPT40009.dat inside C:\OpenAPI\data\opt40009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,655 [DEBUG] Reading file OPT40010.dat inside C:\OpenAPI\data\opt40010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,656 [DEBUG] Reading file OPT50001.dat inside C:\OpenAPI\data\opt50001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,658 [DEBUG] Reading file OPT50002.dat inside C:\OpenAPI\data\opt50002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,659 [DEBUG] Reading file OPT50003.dat inside C:\OpenAPI\data\opt50003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,660 [DEBUG] Reading file OPT50004.dat inside C:\OpenAPI\data\opt50004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,661 [DEBUG] Reading file OPT50005.dat inside C:\OpenAPI\data\opt50005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,662 [DEBUG] Reading file OPT50006.dat inside C:\OpenAPI\data\opt50006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,663 [DEBUG] Reading file OPT50007.dat inside C:\OpenAPI\data\opt50007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,664 [DEBUG] Reading file OPT50008.dat inside C:\OpenAPI\data\opt50008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,665 [DEBUG] Reading file OPT50009.dat inside C:\OpenAPI\data\opt50009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,666 [DEBUG] Reading file OPT50010.dat inside C:\OpenAPI\data\opt50010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,667 [DEBUG] Reading file OPT50011.dat inside C:\OpenAPI\data\opt50011.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,669 [DEBUG] Reading file OPT50012.dat inside C:\OpenAPI\data\opt50012.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,670 [DEBUG] Reading file OPT50013.dat inside C:\OpenAPI\data\opt50013.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,671 [DEBUG] Reading file OPT50014.dat inside C:\OpenAPI\data\opt50014.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,672 [DEBUG] Reading file OPT50015.dat inside C:\OpenAPI\data\opt50015.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,673 [DEBUG] Reading file OPT50016.dat inside C:\OpenAPI\data\opt50016.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,675 [DEBUG] Reading file OPT50017.dat inside C:\OpenAPI\data\opt50017.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,676 [DEBUG] Reading file OPT50018.dat inside C:\OpenAPI\data\opt50018.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,677 [DEBUG] Reading file OPT50019.dat inside C:\OpenAPI\data\opt50019.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,678 [DEBUG] Reading file OPT50020.dat inside C:\OpenAPI\data\opt50020.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,679 [DEBUG] Reading file OPT50021.dat inside C:\OpenAPI\data\opt50021.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,681 [DEBUG] Reading file OPT50022.dat inside C:\OpenAPI\data\opt50022.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,683 [DEBUG] Reading file OPT50023.dat inside C:\OpenAPI\data\opt50023.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,684 [DEBUG] Reading file OPT50024.dat inside C:\OpenAPI\data\opt50024.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,685 [DEBUG] Reading file OPT50025.dat inside C:\OpenAPI\data\opt50025.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,686 [DEBUG] Reading file OPT50026.dat inside C:\OpenAPI\data\opt50026.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,687 [DEBUG] Reading file OPT50027.dat inside C:\OpenAPI\data\opt50027.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,688 [DEBUG] Reading file OPT50028.dat inside C:\OpenAPI\data\opt50028.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,689 [DEBUG] Reading file OPT50029.dat inside C:\OpenAPI\data\opt50029.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,690 [DEBUG] Reading file OPT50030.dat inside C:\OpenAPI\data\opt50030.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,691 [DEBUG] Reading file OPT50031.dat inside C:\OpenAPI\data\opt50031.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,692 [DEBUG] Reading file OPT50032.dat inside C:\OpenAPI\data\opt50032.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,693 [DEBUG] Reading file OPT50033.dat inside C:\OpenAPI\data\opt50033.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,695 [DEBUG] Reading file OPT50034.dat inside C:\OpenAPI\data\opt50034.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,696 [DEBUG] Reading file OPT50035.dat inside C:\OpenAPI\data\opt50035.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,697 [DEBUG] Reading file OPT50036.dat inside C:\OpenAPI\data\opt50036.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,698 [DEBUG] Reading file OPT50037.dat inside C:\OpenAPI\data\opt50037.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,699 [DEBUG] Reading file OPT50038.dat inside C:\OpenAPI\data\opt50038.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,700 [DEBUG] Reading file OPT50039.dat inside C:\OpenAPI\data\opt50039.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,701 [DEBUG] Reading file OPT50040.dat inside C:\OpenAPI\data\opt50040.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,702 [DEBUG] Reading file OPT50043.dat inside C:\OpenAPI\data\opt50043.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,703 [DEBUG] Reading file OPT50044.dat inside C:\OpenAPI\data\opt50044.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,704 [DEBUG] Reading file OPT50062.dat inside C:\OpenAPI\data\opt50062.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,705 [DEBUG] Reading file OPT50063.dat inside C:\OpenAPI\data\opt50063.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,706 [DEBUG] Reading file OPT50064.dat inside C:\OpenAPI\data\opt50064.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,707 [DEBUG] Reading file OPT50065.dat inside C:\OpenAPI\data\opt50065.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,708 [DEBUG] Reading file OPT50066.dat inside C:\OpenAPI\data\opt50066.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,709 [DEBUG] Reading file OPT50067.dat inside C:\OpenAPI\data\opt50067.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,710 [DEBUG] Reading file OPT50068.dat inside C:\OpenAPI\data\opt50068.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,711 [DEBUG] Reading file OPT50071.dat inside C:\OpenAPI\data\opt50071.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,712 [DEBUG] Reading file OPT50072.dat inside C:\OpenAPI\data\opt50072.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,713 [DEBUG] Reading file OPT50073.dat inside C:\OpenAPI\data\opt50073.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,714 [DEBUG] Reading file OPT90001.dat inside C:\OpenAPI\data\opt90001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,715 [DEBUG] Reading file OPT90002.dat inside C:\OpenAPI\data\opt90002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,716 [DEBUG] Reading file OPT90003.dat inside C:\OpenAPI\data\opt90003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,717 [DEBUG] Reading file OPT90004.dat inside C:\OpenAPI\data\opt90004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,719 [DEBUG] Reading file OPT90005.dat inside C:\OpenAPI\data\opt90005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,720 [DEBUG] Reading file OPT90006.dat inside C:\OpenAPI\data\opt90006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,721 [DEBUG] Reading file OPT90007.dat inside C:\OpenAPI\data\opt90007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,722 [DEBUG] Reading file OPT90008.dat inside C:\OpenAPI\data\opt90008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,723 [DEBUG] Reading file OPT90009.dat inside C:\OpenAPI\data\opt90009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,724 [DEBUG] Reading file OPT90010.dat inside C:\OpenAPI\data\opt90010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,725 [DEBUG] Reading file OPT90011.dat inside C:\OpenAPI\data\opt90011.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,726 [DEBUG] Reading file OPT90012.dat inside C:\OpenAPI\data\opt90012.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,727 [DEBUG] Reading file OPT90013.dat inside C:\OpenAPI\data\opt90013.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,728 [DEBUG] Reading file OPT99999.dat inside C:\OpenAPI\data\opt99999.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,729 [DEBUG] Reading file OPTFOFID.dat inside C:\OpenAPI\data\optfofid.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,731 [DEBUG] Reading file OPTKWFID.dat inside C:\OpenAPI\data\optkwfid.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,732 [DEBUG] Reading file OPTKWINV.dat inside C:\OpenAPI\data\optkwinv.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,733 [DEBUG] Reading file OPTKWPRO.dat inside C:\OpenAPI\data\optkwpro.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,735 [DEBUG] Reading file OPW00001.dat inside C:\OpenAPI\data\opw00001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,736 [DEBUG] Reading file OPW00002.dat inside C:\OpenAPI\data\opw00002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,737 [DEBUG] Reading file OPW00003.dat inside C:\OpenAPI\data\opw00003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,738 [DEBUG] Reading file OPW00004.dat inside C:\OpenAPI\data\opw00004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,739 [DEBUG] Reading file OPW00005.dat inside C:\OpenAPI\data\opw00005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,741 [DEBUG] Reading file OPW00006.dat inside C:\OpenAPI\data\opw00006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,742 [DEBUG] Reading file OPW00007.dat inside C:\OpenAPI\data\opw00007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,743 [DEBUG] Reading file OPW00008.dat inside C:\OpenAPI\data\opw00008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,744 [DEBUG] Reading file OPW00009.dat inside C:\OpenAPI\data\opw00009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,745 [DEBUG] Reading file OPW00010.dat inside C:\OpenAPI\data\opw00010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,746 [DEBUG] Reading file OPW00011.dat inside C:\OpenAPI\data\opw00011.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,747 [DEBUG] Reading file OPW00012.dat inside C:\OpenAPI\data\opw00012.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,749 [DEBUG] Reading file OPW00013.dat inside C:\OpenAPI\data\opw00013.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,750 [DEBUG] Reading file OPW00014.dat inside C:\OpenAPI\data\opw00014.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,751 [DEBUG] Reading file OPW00015.dat inside C:\OpenAPI\data\opw00015.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,752 [DEBUG] Reading file OPW00016.dat inside C:\OpenAPI\data\opw00016.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,753 [DEBUG] Reading file OPW00017.dat inside C:\OpenAPI\data\opw00017.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,754 [DEBUG] Reading file OPW00018.dat inside C:\OpenAPI\data\opw00018.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,756 [DEBUG] Reading file OPW20001.dat inside C:\OpenAPI\data\opw20001.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,757 [DEBUG] Reading file OPW20002.dat inside C:\OpenAPI\data\opw20002.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,758 [DEBUG] Reading file OPW20003.dat inside C:\OpenAPI\data\opw20003.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,759 [DEBUG] Reading file OPW20004.dat inside C:\OpenAPI\data\opw20004.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,760 [DEBUG] Reading file OPW20005.dat inside C:\OpenAPI\data\opw20005.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,762 [DEBUG] Reading file OPW20006.dat inside C:\OpenAPI\data\opw20006.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,763 [DEBUG] Reading file OPW20007.dat inside C:\OpenAPI\data\opw20007.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,764 [DEBUG] Reading file OPW20008.dat inside C:\OpenAPI\data\opw20008.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,765 [DEBUG] Reading file OPW20009.dat inside C:\OpenAPI\data\opw20009.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,766 [DEBUG] Reading file OPW20010.dat inside C:\OpenAPI\data\opw20010.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,767 [DEBUG] Reading file OPW20011.dat inside C:\OpenAPI\data\opw20011.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,768 [DEBUG] Reading file OPW20012.dat inside C:\OpenAPI\data\opw20012.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,769 [DEBUG] Reading file OPW20013.dat inside C:\OpenAPI\data\opw20013.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,770 [DEBUG] Reading file OPW20014.dat inside C:\OpenAPI\data\opw20014.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,771 [DEBUG] Reading file OPW20015.dat inside C:\OpenAPI\data\opw20015.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,772 [DEBUG] Reading file OPW20016.dat inside C:\OpenAPI\data\opw20016.enc - KiwoomOpenApiPlusTrInfo.py:232 2021-07-20 10:27:13,774 [DEBUG] Reading file OPW20017.dat inside C:\OpenAPI\data\opw20017.enc - KiwoomOpenApiPlusTrInfo.py:232
tr_info = KiwoomOpenApiPlusTrInfo.get_trinfo_by_code('opt10001')
tr_info.inputs
[KiwoomOpenApiPlusTrInfo.Field('์ข ๋ชฉ์ฝ๋', 0, 6, 9001)]
tr_info.single_outputs
[KiwoomOpenApiPlusTrInfo.Field('์ข ๋ชฉ์ฝ๋', 0, 20, 389), KiwoomOpenApiPlusTrInfo.Field('์ข ๋ชฉ๋ช ', 20, 50, 302), KiwoomOpenApiPlusTrInfo.Field('๊ฒฐ์ฐ์', 40, 20, 315), KiwoomOpenApiPlusTrInfo.Field('์ก๋ฉด๊ฐ', 60, 20, 310), KiwoomOpenApiPlusTrInfo.Field('์๋ณธ๊ธ', 80, 20, 309), KiwoomOpenApiPlusTrInfo.Field('์์ฅ์ฃผ์', 100, 20, 312), KiwoomOpenApiPlusTrInfo.Field('์ ์ฉ๋น์จ', 120, 20, 329), KiwoomOpenApiPlusTrInfo.Field('์ฐ์ค์ต๊ณ ', 140, 20, 1006), KiwoomOpenApiPlusTrInfo.Field('์ฐ์ค์ต์ ', 160, 20, 1009), KiwoomOpenApiPlusTrInfo.Field('์๊ฐ์ด์ก', 180, 20, 311), KiwoomOpenApiPlusTrInfo.Field('์๊ฐ์ด์ก๋น์ค', 200, 20, 336), KiwoomOpenApiPlusTrInfo.Field('์ธ์ธ์์ง๋ฅ ', 220, 20, 314), KiwoomOpenApiPlusTrInfo.Field('๋์ฉ๊ฐ', 240, 20, 308), KiwoomOpenApiPlusTrInfo.Field('PER', 260, 20, 1600), KiwoomOpenApiPlusTrInfo.Field('EPS', 280, 20, 1604), KiwoomOpenApiPlusTrInfo.Field('ROE', 300, 20, 1630), KiwoomOpenApiPlusTrInfo.Field('PBR', 320, 20, 1601), KiwoomOpenApiPlusTrInfo.Field('EV', 340, 20, 1608), KiwoomOpenApiPlusTrInfo.Field('BPS', 360, 20, 1605), KiwoomOpenApiPlusTrInfo.Field('๋งค์ถ์ก', 380, 20, 1610), KiwoomOpenApiPlusTrInfo.Field('์์ ์ด์ต', 400, 20, 1611), KiwoomOpenApiPlusTrInfo.Field('๋น๊ธฐ์์ด์ต', 420, 20, 1614), KiwoomOpenApiPlusTrInfo.Field('250์ต๊ณ ', 440, 20, 1000), KiwoomOpenApiPlusTrInfo.Field('250์ต์ ', 460, 20, 1003), KiwoomOpenApiPlusTrInfo.Field('์๊ฐ', 480, 20, 16), KiwoomOpenApiPlusTrInfo.Field('๊ณ ๊ฐ', 500, 20, 17), KiwoomOpenApiPlusTrInfo.Field('์ ๊ฐ', 520, 20, 18), KiwoomOpenApiPlusTrInfo.Field('์ํ๊ฐ', 540, 20, 305), KiwoomOpenApiPlusTrInfo.Field('ํํ๊ฐ', 560, 20, 306), KiwoomOpenApiPlusTrInfo.Field('๊ธฐ์ค๊ฐ', 580, 20, 307), KiwoomOpenApiPlusTrInfo.Field('์์์ฒด๊ฒฐ๊ฐ', 600, 20, 10023), KiwoomOpenApiPlusTrInfo.Field('์์์ฒด๊ฒฐ์๋', 620, 20, 10024), KiwoomOpenApiPlusTrInfo.Field('250์ต๊ณ ๊ฐ์ผ', 640, 20, 1001), KiwoomOpenApiPlusTrInfo.Field('250์ต๊ณ ๊ฐ๋๋น์จ', 660, 20, 1002), KiwoomOpenApiPlusTrInfo.Field('250์ต์ ๊ฐ์ผ', 680, 20, 1004), KiwoomOpenApiPlusTrInfo.Field('250์ต์ ๊ฐ๋๋น์จ', 700, 20, 1005), KiwoomOpenApiPlusTrInfo.Field('ํ์ฌ๊ฐ', 720, 20, 10), KiwoomOpenApiPlusTrInfo.Field('๋๋น๊ธฐํธ', 740, 20, 25), KiwoomOpenApiPlusTrInfo.Field('์ ์ผ๋๋น', 760, 20, 11), KiwoomOpenApiPlusTrInfo.Field('๋ฑ๋ฝ์จ', 780, 20, 12), KiwoomOpenApiPlusTrInfo.Field('๊ฑฐ๋๋', 800, 20, 13), KiwoomOpenApiPlusTrInfo.Field('๊ฑฐ๋๋๋น', 820, 20, 30), KiwoomOpenApiPlusTrInfo.Field('์ก๋ฉด๊ฐ๋จ์', 840, 20, 796), KiwoomOpenApiPlusTrInfo.Field('์ ํต์ฃผ์', 840, 20, 1683), KiwoomOpenApiPlusTrInfo.Field('์ ํต๋น์จ', 840, 20, 1684)]
tr_info.multi_outputs
[]
์กฐ๊ฑด๊ฒ์์ ์ฌ์ฉํ๊ธฐ ์ํด์๋ ๋จผ์ ์๋ฒ์ ์ ์ฅ๋ ์กฐ๊ฑด๋ค์ ๋ถ๋ฌ์์ผ ํ๋ค.
entrypoint.EnsureConditionLoaded()
1
๋ถ๋ฌ์จ ์กฐ๊ฑด๋ค์ ๋ชฉ๋ก์ ์๋ ํจ์๋ก ํ์ธ์ด ๊ฐ๋ฅํ๋ค.
conditions = entrypoint.GetConditionNameListAsList()
conditions
[(0, '๋ํ ์ ํ๊ฐ ์ฐ๋์ฃผ'), (1, '์ค์ํ ์ ํ๊ฐ์ฃผ')]
์ดํ ์์์ ์ ์๋์์ ์ํด์๋ ์๋์์ ์ฌ์ฉ๋๋ ์กฐ๊ฑด๋ค๊ณผ ๊ฐ์ ์ด๋ฆ์ ๊ฐ์ง๋ ์กฐ๊ฑด๋ค์ด ๋ฏธ๋ฆฌ ์ ์ฅ๋์ด ์์ด์ผ ํ๋ค.
์์ ์กฐ๊ฑด์๋ค์ ํค์์์ ์์๋ก ์ ๊ณตํ๋ ์ถ์ฒ์๋ค์ ๊ทธ๋๋ก ์ด๋ฆ์ ๋๊ฐ์ด ํด์ ์ ์ฅํ ๊ฒ๋ค์ด๋ค. ์ฐธ๊ณ ๋ก ์กฐ๊ฑด๋ค์ ํธ์งํ๊ณ ์ ์ฅํ๋๊ฑด ์์ ๋ฌธ HTS ๋ด๋ถ์์๋ง ๊ฐ๋ฅํ๊ธฐ ๋๋ฌธ์ ๋ฐ๋ก HTS ๋ฅผ ์ด์ด ํธ์งํด์ฃผ์ด์ผ ํ๋ค.
์กฐ๊ฑด์์ด ํธ์ง๋ ์ดํ์ ํด๋น ์กฐ๊ฑด์์ ๊ธฐ์กด์ ๋์์ค์ธ OpenAPI ์๋ ๊ฐฑ์ ํ๊ณ ์ถ์ ๊ฒฝ์ฐ, ์๋ ํจ์๋ฅผ ํตํด ํธ์ง๋ ์กฐ๊ฑด์์ ์๋ก ๋ถ๋ฌ์จ๋ค.
entrypoint.LoadCondition()
1
condition_name = '๋ํ ์ ํ๊ฐ ์ฐ๋์ฃผ'
codes, info = entrypoint.GetCodeListByCondition(condition_name, with_info=True)
์์ ํจ์์์ with_info=True
๋ก ํธ์ถํ๊ฒ ๋๋ฉด ์กฐ๊ฑด์ ๋ง์กฑํ๋ ์ฝ๋ ๋ชฉ๋ก (codes
) ๋ฟ๋ง ์๋๋ผ ํด๋น ์ข
๋ชฉ๋ค์ ๋ํ ๊ธฐ๋ณธ์ ๋ณด๋ค๋ (info
) ๊ฐ์ด ๊ฐ์ ธ์ DataFrame ํํ๋ก ์ ๊ณตํ๋ค.
info
์ข ๋ชฉ์ฝ๋ | ์ข ๋ชฉ๋ช | ํ์ฌ๊ฐ | ๊ธฐ์ค๊ฐ | ์ ์ผ๋๋น | ์ ์ผ๋๋น๊ธฐํธ | ๋ฑ๋ฝ์จ | ๊ฑฐ๋๋ | ๊ฑฐ๋๋๊ธ | ์ฒด๊ฒฐ๋ | ... | ELW๋ง๊ธฐ์ผ | ๋ฏธ๊ฒฐ์ ์ฝ์ | ๋ฏธ๊ฒฐ์ ์ ์ผ๋๋น | ์ด๋ก ๊ฐ | ๋ด์ฌ๋ณ๋์ฑ | ๋ธํ | ๊ฐ๋ง | ์ํ | ๋ฒ ๊ฐ | ๋ก | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 000240 | ํ๊ตญ์ค์ปดํผ๋ | -18350 | 18400 | -50 | 5 | -0.27 | 56841 | 1037 | +2 | ... | 00000000 | |||||||||
1 | 001630 | ์ข ๊ทผ๋นํ๋ฉ์ค | -105500 | 106000 | -500 | 5 | -0.47 | 4612 | 485 | -21 | ... | 00000000 | |||||||||
2 | 001800 | ์ค๋ฆฌ์จํ๋ฉ์ค | -16800 | 16850 | -50 | 5 | -0.30 | 65403 | 1091 | +1 | ... | 00000000 | |||||||||
3 | 001880 | DL๊ฑด์ค | -34750 | 35150 | -400 | 5 | -1.14 | 19708 | 683 | -69 | ... | 00000000 | |||||||||
4 | 003230 | ์ผ์์ํ | -93700 | 94100 | -400 | 5 | -0.43 | 23617 | 2201 | +1 | ... | 00000000 | |||||||||
5 | 003550 | LG | -96900 | 97000 | -100 | 5 | -0.10 | 65226 | 6303 | +1 | ... | 00000000 | |||||||||
6 | 003800 | ์์ด์ค์นจ๋ | -47500 | 47850 | -350 | 5 | -0.73 | 211 | 10 | +4 | ... | 00000000 | |||||||||
7 | 004000 | ๋กฏ๋ฐ์ ๋ฐํํ | -72100 | 74500 | -2400 | 5 | -3.22 | 166819 | 12117 | +7 | ... | 00000000 | |||||||||
8 | 006040 | ๋์์ฐ์ | -250500 | 251000 | -500 | 5 | -0.20 | 998 | 249 | +2 | ... | 00000000 | |||||||||
9 | 006390 | ํ์ผํ๋์๋ฉํธ | -35250 | 35550 | -300 | 5 | -0.84 | 9076 | 320 | +5 | ... | 00000000 | |||||||||
10 | 006650 | ๋ํ์ ํ | +283000 | 275500 | +7500 | 2 | +2.72 | 230909 | 65009 | -5 | ... | 00000000 | |||||||||
11 | 008490 | ์ํฅ | -54600 | 55100 | -500 | 5 | -0.91 | 2894 | 158 | +1 | ... | 00000000 | |||||||||
12 | 009970 | ์์๋ฌด์ญํ๋ฉ์ค | -46850 | 47600 | -750 | 5 | -1.58 | 4131 | 194 | -11 | ... | 00000000 | |||||||||
13 | 011780 | ๊ธํธ์์ | -219000 | 223500 | -4500 | 5 | -2.01 | 170090 | 37370 | -56 | ... | 00000000 | |||||||||
14 | 012630 | HDC | -12600 | 12700 | -100 | 5 | -0.79 | 149460 | 1876 | +2 | ... | 00000000 | |||||||||
15 | 013120 | ๋์๊ฐ๋ฐ | -6440 | 6470 | -30 | 5 | -0.46 | 84679 | 542 | +3 | ... | 00000000 | |||||||||
16 | 014830 | ์ ๋๋ | -80700 | 81200 | -500 | 5 | -0.62 | 37012 | 2945 | -10 | ... | 00000000 | |||||||||
17 | 017960 | ํ๊ตญ์นด๋ณธ | 11950 | 11950 | 0 | 3 | 0.00 | 486979 | 5866 | -29 | ... | 00000000 | |||||||||
18 | 020000 | ํ์ฌ | -38950 | 39700 | -750 | 5 | -1.89 | 25477 | 995 | +1 | ... | 00000000 | |||||||||
19 | 021240 | ์ฝ์จ์ด | +78000 | 77800 | +200 | 2 | +0.26 | 53619 | 4180 | -50 | ... | 00000000 | |||||||||
20 | 024720 | ํ๊ตญ์ฝ๋งํ๋ฉ์ค | -28800 | 28950 | -150 | 5 | -0.52 | 43091 | 1255 | -30 | ... | 00000000 | |||||||||
21 | 033290 | ์ฝ์ฐํจ์ | -7670 | 7750 | -80 | 5 | -1.03 | 684770 | 5274 | -2 | ... | 00000000 | |||||||||
22 | 033780 | KT&G | -82900 | 83300 | -400 | 5 | -0.48 | 104402 | 8655 | -5 | ... | 00000000 | |||||||||
23 | 036830 | ์๋ธ๋ ์ธํ๋ฉ์ค | +37250 | 36900 | +350 | 2 | +0.95 | 24305 | 897 | +1 | ... | 00000000 | |||||||||
24 | 049070 | ์ธํ์ค | -29950 | 30150 | -200 | 5 | -0.66 | 38134 | 1133 | +1 | ... | 00000000 | |||||||||
25 | 053210 | ์ค์นด์ด๋ผ์ดํ | -11450 | 11700 | -250 | 5 | -2.14 | 51000 | 581 | -30 | ... | 00000000 | |||||||||
26 | 056190 | ์์ค์ํ์์ด | +40700 | 40650 | +50 | 2 | +0.12 | 16516 | 671 | +11 | ... | 00000000 | |||||||||
27 | 060150 | ์ธ์ ์ด์ํฐ | -12750 | 12850 | -100 | 5 | -0.78 | 159197 | 2021 | +28 | ... | 00000000 | |||||||||
28 | 069080 | ์น์ | 30250 | 30250 | 0 | 3 | 0.00 | 45546 | 1367 | +1 | ... | 00000000 | |||||||||
29 | 084010 | ๋ํ์ ๊ฐ | -21400 | 21450 | -50 | 5 | -0.23 | 114720 | 2409 | +1 | ... | 00000000 | |||||||||
30 | 095660 | ๋ค์ค์์ฆ | -27550 | 27900 | -350 | 5 | -1.25 | 91021 | 2520 | -1 | ... | 00000000 | |||||||||
31 | 096530 | ์จ์ | +78800 | 77400 | +1400 | 2 | +1.81 | 673516 | 53141 | +2 | ... | 00000000 | |||||||||
32 | 102710 | ์ด์์ํํ ํฌ๋๋ก์ง | +35550 | 34900 | +650 | 2 | +1.86 | 61037 | 2162 | -2 | ... | 00000000 | |||||||||
33 | 111770 | ์์๋ฌด์ญ | -40100 | 40700 | -600 | 5 | -1.47 | 36648 | 1469 | +1 | ... | 00000000 | |||||||||
34 | 161890 | ํ๊ตญ์ฝ๋ง | -54600 | 54900 | -300 | 5 | -0.55 | 50520 | 2753 | -50 | ... | 00000000 | |||||||||
35 | 192080 | ๋๋ธ์ ๊ฒ์์ฆ | +62900 | 61000 | +1900 | 2 | +3.11 | 533735 | 34105 | +1 | ... | 00000000 | |||||||||
36 | 192400 | ์ฟ ์ฟ ํ๋ฉ์ค | +125000 | 122000 | +3000 | 2 | +2.46 | 8572 | 1063 | +2 | ... | 00000000 | |||||||||
37 | 204270 | ์ ์ด์คํฐ์จ | -9630 | 9650 | -20 | 5 | -0.21 | 22188 | 213 | +3 | ... | 00000000 | |||||||||
38 | 206640 | ๋ฐ๋ํ ๋ฉ๋ | -22950 | 23300 | -350 | 5 | -1.50 | 144168 | 3331 | +6 | ... | 00000000 | |||||||||
39 | 243070 | ํด์จ์ค | -62600 | 63500 | -900 | 5 | -1.42 | 21906 | 1376 | +166 | ... | 00000000 | |||||||||
40 | 281820 | ์ผ์ด์จํ | +28700 | 28600 | +100 | 2 | +0.35 | 56825 | 1624 | -271 | ... | 00000000 | |||||||||
41 | 284740 | ์ฟ ์ฟ ํ์์ค | +44300 | 44250 | +50 | 2 | +0.11 | 14155 | 626 | -8 | ... | 00000000 | |||||||||
42 | 285130 | SK์ผ๋ฏธ์นผ | +253500 | 253000 | +500 | 2 | +0.20 | 14990 | 3788 | -1 | ... | 00000000 | |||||||||
43 | 294870 | HDCํ๋์ฐ์ ๊ฐ๋ฐ | -31650 | 31950 | -300 | 5 | -0.94 | 169341 | 5333 | +3 | ... | 00000000 | |||||||||
44 | 300720 | ํ์ผ์๋ฉํธ | -172000 | 172500 | -500 | 5 | -0.29 | 7106 | 1210 | -1 | ... | 00000000 |
45 rows ร 63 columns
๊ฐ์ ์กฐ๊ฑด์์ 1๋ถ์ 1๊ฑด ์ ํ์ด๋ฏ๋ก ์์ ์คํ์ ์ ํ์ ํํผํ๊ธฐ ์ํด์ ์๋ก ์ค์ ํ๋ค.
condition_name = '์ค์ํ ์ ํ๊ฐ์ฃผ'
logging.info('Start listening realtime condition stream...')
stream = entrypoint.GetCodeListByConditionAsStream(condition_name)
2021-07-20 10:27:14,498 [INFO] Start listening realtime condition stream... - <ipython-input-44-f04b6a919f1c>:1
์ค์๊ฐ ์กฐ๊ฑด๊ฒ์์ ๊ฒฝ์ฐ ์กฐ๊ฑด์ ๋ง์กฑ/๋ถ๋ง์กฑํ๋ ์ข ๋ชฉ์ด ํธ์ /์ดํํ ๋๋ง๋ค ๊ณ์ํด์ ์ด๋ฒคํธ๋ฅผ ๋ฐํํ๋ค. ์์์์๋ 10์ด ๋์๋ง ์ด๋ฒคํธ๋ฅผ ํ์ธํด๋ณธ๋ค.
import threading
def stop_listening():
logging.info('Stop listening realtime condition events...')
stream.cancel()
threading.Timer(65.0, stop_listening).start() # 65์ด ์ดํ์ gRPC ์ปค๋ฅ์
์ข
๋ฃํ๋๋ก ์ค์
import grpc
events = []
try:
for event in stream:
events.append(event)
pprint_event(event)
except grpc.RpcError as e:
print(e)
{'arguments': [{'string_value': '7079'}, {'string_value': '900290;900310;900340;002170;037710;042420;210540;225220;352700;900280;900250;'}, {'string_value': '์ค์ํ ์ ํ๊ฐ์ฃผ'}, {'long_value': '1'}, {'long_value': '0'}], 'name': 'OnReceiveTrCondition'}
2021-07-20 10:28:19,522 [INFO] Stop listening realtime condition events... - <ipython-input-45-679886c13a31>:4
<_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Locally cancelled by application!" debug_error_string = "None" >
์์์ stream
๊ฒฐ๊ณผ๋ grpc
์ _MultiThreadedRendezvous
๊ฐ์ฒด์ธ๋ฐ ์ฌ์ค ํด๋น ํ์
์ ์ง์ ์ ์ผ๋ก ์ธ๋ถ์ ๋
ธ์ถ๋๋ ํ์
์ ์๋๋ค. ๋์ ์ ํด๋น ํ์
์ ๋ด๋ถ์ ์ผ๋ก grpc.RpcError
, grpc.RpcContext
, grpc.Call
, grpc.Future
์ธํฐํ์ด์ค๋ฅผ ๊ตฌํํ๊ณ ์์ผ๋ฏ๋ก ํด๋น ๊ฐ์ฒด์ ์ฌ์ฉ๋ฒ๊ณผ ๊ด๋ จํด์๋ ๊ฐ๊ฐ์ ์ธํฐํ์ด์ค๋ฅผ ์ฐธ๊ณ ํ์.
์ต์ด ์ด๋ฒคํธ๋ก ๋ฐํ๋๋ ์ฝ๋ ๋ชฉ๋ก๋ค์ ๋ํด์ ์์ ์ผ๋ฐ์กฐ๊ฑด ๊ฒ์ ์์์์์ ๊ฐ์ด ์ข ๋ชฉ๋ค์ ๊ธฐ๋ณธ์ ๋ณด๋ค์ ๋ณ๋๋ก ๊ฐ์ ธ์ค๊ณ ์ถ๋ค๋ฉด ๋๋ต ์๋์ฒ๋ผ ํด๋ณผ ์ ์๋ค.
codes = events[0].arguments[1].string_value.strip(';').split(';')
info = entrypoint.GetStockQuoteInfoAsDataFrame(codes)
info
์ข ๋ชฉ์ฝ๋ | ์ข ๋ชฉ๋ช | ํ์ฌ๊ฐ | ๊ธฐ์ค๊ฐ | ์ ์ผ๋๋น | ์ ์ผ๋๋น๊ธฐํธ | ๋ฑ๋ฝ์จ | ๊ฑฐ๋๋ | ๊ฑฐ๋๋๊ธ | ์ฒด๊ฒฐ๋ | ... | ELW๋ง๊ธฐ์ผ | ๋ฏธ๊ฒฐ์ ์ฝ์ | ๋ฏธ๊ฒฐ์ ์ ์ผ๋๋น | ์ด๋ก ๊ฐ | ๋ด์ฌ๋ณ๋์ฑ | ๋ธํ | ๊ฐ๋ง | ์ํ | ๋ฒ ๊ฐ | ๋ก | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 900290 | GRT | 951 | 951 | 0 | 3 | 0.00 | 0 | 0 | ... | 00000000 | ||||||||||
1 | 900310 | ์ปฌ๋ฌ๋ ์ด | -1975 | 2000 | -25 | 5 | -1.25 | 88017 | 173 | -500 | ... | 00000000 | |||||||||
2 | 900340 | ์์ ํธ๋ | -1500 | 1525 | -25 | 5 | -1.64 | 78495 | 117 | +10 | ... | 00000000 | |||||||||
3 | 002170 | ์ผ์ํต์ | -75000 | 75400 | -400 | 5 | -0.53 | 2332 | 175 | +1 | ... | 00000000 | |||||||||
4 | 037710 | ๊ด์ฃผ์ ์ธ๊ณ | -185500 | 187500 | -2000 | 5 | -1.07 | 241 | 45 | +3 | ... | 00000000 | |||||||||
5 | 042420 | ๋ค์ค์์ฆํ๋ฉ์ค | -29850 | 30150 | -300 | 5 | -1.00 | 14304 | 426 | +3 | ... | 00000000 | |||||||||
6 | 210540 | ๋์์ดํ์ | -15700 | 15950 | -250 | 5 | -1.57 | 25482 | 400 | +5 | ... | 00000000 | |||||||||
7 | 225220 | ์ ๋๋ฃจ์ | -18550 | 18800 | -250 | 5 | -1.33 | 106245 | 1989 | -50 | ... | 00000000 | |||||||||
8 | 352700 | ์จ์คํฌ์ค์ฑ์ง | -20800 | 20900 | -100 | 5 | -0.48 | 23631 | 489 | +30 | ... | 00000000 | |||||||||
9 | 900280 | ๊ณจ๋ ์ผ์ธ๋ฆฌ | -525 | 536 | -11 | 5 | -2.05 | 1378758 | 723 | +50 | ... | 00000000 | |||||||||
10 | 900250 | ํฌ๋ฆฌ์คํ์ ์์ฌ | -1555 | 1560 | -5 | 5 | -0.32 | 101699 | 157 | +17 | ... | 00000000 |
11 rows ร 63 columns
์๋๋ฉด stream
์์ฑ์์ with_info=True
๋ฅผ ์ฃผ๋ ๊ฒฝ์ฐ ๋งค ์กฐ๊ฑด ์ด๋ฒคํธ๋ง๋ค ๋ฐ๋ก ๋ค์ ๊ด์ฌ์ข
๋ชฉ์ ๋ณด์์ฒญ ์ด๋ฒคํธ๋ฅผ ์ด์ด์ ๋ฐํํ๋๋ฐ, ๊ฒฐ๊ตญ์ ์ฝ๊ฐ์ ๋ณ๋ ๋ฐ์ดํฐ ์ฒ๋ฆฌ๊ฐ ํ์ํ๋ค.
condition_name = '์ค์ํ ์ ํ๊ฐ์ฃผ'
logging.info('Start listening realtime condition stream...')
stream = entrypoint.GetCodeListByConditionAsStream(condition_name, with_info=True)
2021-07-20 10:28:19,664 [INFO] Start listening realtime condition stream... - <ipython-input-50-433baeb2b447>:1
์ค์๊ฐ ์กฐ๊ฑด๊ฒ์์ ๊ฒฝ์ฐ ์กฐ๊ฑด์ ๋ง์กฑ/๋ถ๋ง์กฑํ๋ ์ข ๋ชฉ์ด ํธ์ /์ดํํ ๋๋ง๋ค ๊ณ์ํด์ ์ด๋ฒคํธ๋ฅผ ๋ฐํํ๋ค. ์์์์๋ 10์ด ๋์๋ง ์ด๋ฒคํธ๋ฅผ ํ์ธํด๋ณธ๋ค.
import threading
def stop_listening():
logging.info('Stop listening realtime condition events...')
stream.cancel()
threading.Timer(10.0, stop_listening).start() # 10์ด ์ดํ์ gRPC ์ปค๋ฅ์
์ข
๋ฃํ๋๋ก ์ค์
import grpc
events = []
try:
for event in stream:
events.append(event)
pprint_event(event)
except grpc.RpcError as e:
print(e)
{'arguments': [{'string_value': '5505'}, {'string_value': '900290;900310;900340;002170;037710;042420;210540;225220;352700;900280;900250;'}, {'string_value': '์ค์ํ ์ ํ๊ฐ์ฃผ'}, {'long_value': '1'}, {'long_value': '0'}], 'name': 'OnReceiveTrCondition'} {'arguments': [{'string_value': '5505'}, {'string_value': '๊ด์ฌ์ข ๋ชฉ์ ๋ณด์์ฒญ'}, {'string_value': 'OPTKWFID'}, {'string_value': ''}, {'string_value': '0'}], 'multi_data': {'names': ['์ข ๋ชฉ์ฝ๋', '์ข ๋ชฉ๋ช ', 'ํ์ฌ๊ฐ', '๊ธฐ์ค๊ฐ', '์ ์ผ๋๋น', '์ ์ผ๋๋น๊ธฐํธ', '๋ฑ๋ฝ์จ', '๊ฑฐ๋๋', '๊ฑฐ๋๋๊ธ', '์ฒด๊ฒฐ๋', '์ฒด๊ฒฐ๊ฐ๋', '์ ์ผ๊ฑฐ๋๋๋๋น', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๋งค๋1์ฐจํธ๊ฐ', '๋งค๋2์ฐจํธ๊ฐ', '๋งค๋3์ฐจํธ๊ฐ', '๋งค๋4์ฐจํธ๊ฐ', '๋งค๋5์ฐจํธ๊ฐ', '๋งค์1์ฐจํธ๊ฐ', '๋งค์2์ฐจํธ๊ฐ', '๋งค์3์ฐจํธ๊ฐ', '๋งค์4์ฐจํธ๊ฐ', '๋งค์5์ฐจํธ๊ฐ', '์ํ๊ฐ', 'ํํ๊ฐ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ข ๊ฐ', '์ฒด๊ฒฐ์๊ฐ', '์์์ฒด๊ฒฐ๊ฐ', '์์์ฒด๊ฒฐ๋', '์๋ณธ๊ธ', '์ก๋ฉด๊ฐ', '์๊ฐ์ด์ก', '์ฃผ์์', 'ํธ๊ฐ์๊ฐ', '์ผ์', '์ฐ์ ๋งค๋์๋', '์ฐ์ ๋งค์์๋', '์ฐ์ ๋งค๋๊ฑด์', '์ฐ์ ๋งค์๊ฑด์', '์ด๋งค๋์๋', '์ด๋งค์์๋', '์ด๋งค๋๊ฑด์', '์ด๋งค์๊ฑด์', 'ํจ๋ฆฌํฐ', '๊ธฐ์ด๋ง', '์์ต๋ถ๊ธฐ', '์๋ณธ์ง์ง', 'ELWํ์ฌ๊ฐ', '์ ํ๋น์จ', 'ELW๋ง๊ธฐ์ผ', '๋ฏธ๊ฒฐ์ ์ฝ์ ', '๋ฏธ๊ฒฐ์ ์ ์ผ๋๋น', '์ด๋ก ๊ฐ', '๋ด์ฌ๋ณ๋์ฑ', '๋ธํ', '๊ฐ๋ง', '์ํ', '๋ฒ ๊ฐ', '๋ก'], 'values': [{'values': ['900290', 'GRT', '951', '951', '0', '3', '0.00', '0', '0', '', '0.00', '0.00', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '+1235', '-666', '0', '0', '0', '951', '000000', '-0', '0', '770', '0.00', '641', '67375', '000000', '20210720', '0', '0', '', '', '0', '0', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['900310', '์ปฌ๋ฌ๋ ์ด', '-1975', '2000', '-25', '5', '-1.25', '88017', '173', '-500', '89.19', '-57.66', '-1980', '-1975', '-1980', '-1985', '-1990', '-1995', '2000', '-1975', '-1970', '-1965', '-1960', '-1955', '+2600', '-1400', '-1955', '-1995', '-1955', '-1975', '102637', '-1955', '7433', '336', '0.00', '1067', '54000', '102800', '20210720', '348', '567', '', '', '7091', '55224', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['900340', '์์ ํธ๋', '-1500', '1525', '-25', '5', '-1.64', '78495', '117', '+10', '55.22', '-38.32', '-1500', '-1495', '-1500', '-1505', '-1510', '-1515', '-1520', '-1495', '-1490', '-1485', '-1480', '-1475', '+1980', '-1070', '-1485', '-1505', '-1480', '-1500', '102659', '-1485', '8385', '294', '0.00', '720', '47973', '102810', '20210720', '6730', '641', '', '', '46811', '178112', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['002170', '์ผ์ํต์', '-75000', '75400', '-400', '5', '-0.53', '2332', '175', '+1', '63.99', '-75.30', '-75000', '-74800', '-75000', '-75100', '-75300', '+75500', '+75700', '-74800', '-74700', '-74600', '-74500', '-74400', '+98000', '-52800', '-75200', '+75500', '-74500', '-75000', '102702', '-75200', '28', '150', '5000', '2250', '3000', '102706', '20210720', '19', '69', '', '', '929', '861', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['037710', '๊ด์ฃผ์ ์ธ๊ณ', '-185500', '187500', '-2000', '5', '-1.07', '241', '45', '+3', '86.67', '-20.13', '-185500', '-184500', '-185500', '-186000', '-186500', '187500', '+188500', '-184500', '-184000', '-183500', '-183000', '-182500', '+243500', '-131500', '-185500', '-186000', '-184000', '-185500', '102703', '-185500', '17', '80', '5000', '2968', '1600', '102744', '20210720', '15', '15', '', '', '932', '1082', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['042420', '๋ค์ค์์ฆํ๋ฉ์ค', '-29850', '30150', '-300', '5', '-1.00', '14304', '426', '+3', '58.64', '-55.07', '-29850', '-29800', '-29850', '-29900', '-30000', '-30050', '-30100', '-29800', '-29750', '-29700', '-29650', '-29600', '+39150', '-21150', '-29900', '-30050', '-29700', '-29850', '102550', '-29900', '455', '47', '500', '2644', '8857', '102809', '20210720', '411', '161', '', '', '3945', '7116', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['210540', '๋์์ดํ์', '-15700', '15950', '-250', '5', '-1.57', '25482', '400', '+5', '61.81', '-48.94', '-15700', '-15600', '-15700', '-15750', '-15800', '-15850', '-15900', '-15600', '-15550', '-15500', '-15450', '-15400', '+20700', '-11200', '-15550', '-15850', '-15550', '-15700', '102755', '-15550', '2048', '55', '500', '1734', '11042', '102815', '20210720', '46', '3394', '', '', '7114', '26245', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['225220', '์ ๋๋ฃจ์ ', '-18550', '18800', '-250', '5', '-1.33', '106245', '1989', '-50', '63.59', '-46.84', '-18600', '-18550', '-18600', '-18650', '-18700', '-18750', '18800', '-18550', '-18500', '-18450', '-18400', '-18350', '+24400', '-13200', '-18550', '+19100', '-18500', '-18550', '102655', '-18550', '3285', '48', '500', '1775', '9567', '102812', '20210720', '200', '2601', '', '', '16400', '29192', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['352700', '์จ์คํฌ์ค์ฑ์ง', '-20800', '20900', '-100', '5', '-0.48', '23631', '489', '+30', '94.15', '-15.93', '-20800', '-20750', '-20800', '-20850', '20900', '+20950', '+21000', '-20750', '-20700', '-20650', '-20600', '-20550', '+27150', '-14650', '-20700', '-20850', '-20500', '-20800', '102705', '-20700', '686', '50', '500', '2079', '9996', '102727', '20210720', '197', '68', '', '', '12055', '11326', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['900280', '๊ณจ๋ ์ผ์ธ๋ฆฌ', '-525', '536', '-11', '5', '-2.05', '1378758', '723', '+50', '38.06', '-25.67', '-525', '-524', '-525', '-526', '-527', '-528', '-529', '-524', '-523', '-522', '-521', '-520', '+696', '-376', '-525', '-531', '-518', '-525', '102814', '-525', '32885', '35', '0.20', '927', '176574', '102818', '20210720', '4039', '10829', '', '', '87605', '569902', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}, {'values': ['900250', 'ํฌ๋ฆฌ์คํ์ ์์ฌ', '-1555', '1560', '-5', '5', '-0.32', '101699', '157', '+17', '75.31', '-47.97', '-1555', '-1550', '-1555', '1560', '+1565', '+1570', '+1575', '-1550', '-1545', '-1540', '-1535', '-1530', '+2025', '-1095', '-1535', '1560', '-1535', '-1555', '102752', '-1535', '13649', '34', '0.50', '1054', '67784', '102758', '20210720', '4788', '9906', '', '', '82046', '215639', '0', '', '0.00', '0.00', '0.00', '0.00', '0', '0.0000', '00000000', '', '', '', '', '', '', '', '', '']}]}, 'name': 'OnReceiveTrData'}
2021-07-20 10:28:29,682 [INFO] Stop listening realtime condition events... - <ipython-input-51-c769dc00f6f7>:4
<_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Locally cancelled by application!" debug_error_string = "None" >
condition_event = events[0]
info_event = events[1]
records = [values.values for values in info_event.multi_data.values]
columns = info_event.multi_data.names
info = pd.DataFrame.from_records(records, columns=columns)
info
์ข ๋ชฉ์ฝ๋ | ์ข ๋ชฉ๋ช | ํ์ฌ๊ฐ | ๊ธฐ์ค๊ฐ | ์ ์ผ๋๋น | ์ ์ผ๋๋น๊ธฐํธ | ๋ฑ๋ฝ์จ | ๊ฑฐ๋๋ | ๊ฑฐ๋๋๊ธ | ์ฒด๊ฒฐ๋ | ... | ELW๋ง๊ธฐ์ผ | ๋ฏธ๊ฒฐ์ ์ฝ์ | ๋ฏธ๊ฒฐ์ ์ ์ผ๋๋น | ์ด๋ก ๊ฐ | ๋ด์ฌ๋ณ๋์ฑ | ๋ธํ | ๊ฐ๋ง | ์ํ | ๋ฒ ๊ฐ | ๋ก | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 900290 | GRT | 951 | 951 | 0 | 3 | 0.00 | 0 | 0 | ... | 00000000 | ||||||||||
1 | 900310 | ์ปฌ๋ฌ๋ ์ด | -1975 | 2000 | -25 | 5 | -1.25 | 88017 | 173 | -500 | ... | 00000000 | |||||||||
2 | 900340 | ์์ ํธ๋ | -1500 | 1525 | -25 | 5 | -1.64 | 78495 | 117 | +10 | ... | 00000000 | |||||||||
3 | 002170 | ์ผ์ํต์ | -75000 | 75400 | -400 | 5 | -0.53 | 2332 | 175 | +1 | ... | 00000000 | |||||||||
4 | 037710 | ๊ด์ฃผ์ ์ธ๊ณ | -185500 | 187500 | -2000 | 5 | -1.07 | 241 | 45 | +3 | ... | 00000000 | |||||||||
5 | 042420 | ๋ค์ค์์ฆํ๋ฉ์ค | -29850 | 30150 | -300 | 5 | -1.00 | 14304 | 426 | +3 | ... | 00000000 | |||||||||
6 | 210540 | ๋์์ดํ์ | -15700 | 15950 | -250 | 5 | -1.57 | 25482 | 400 | +5 | ... | 00000000 | |||||||||
7 | 225220 | ์ ๋๋ฃจ์ | -18550 | 18800 | -250 | 5 | -1.33 | 106245 | 1989 | -50 | ... | 00000000 | |||||||||
8 | 352700 | ์จ์คํฌ์ค์ฑ์ง | -20800 | 20900 | -100 | 5 | -0.48 | 23631 | 489 | +30 | ... | 00000000 | |||||||||
9 | 900280 | ๊ณจ๋ ์ผ์ธ๋ฆฌ | -525 | 536 | -11 | 5 | -2.05 | 1378758 | 723 | +50 | ... | 00000000 | |||||||||
10 | 900250 | ํฌ๋ฆฌ์คํ์ ์์ฌ | -1555 | 1560 | -5 | 5 | -0.32 | 101699 | 157 | +17 | ... | 00000000 |
11 rows ร 63 columns
first_account_no = entrypoint.GetFirstAvailableAccount()
request_name = '์ผ์ฑ์ ์ 1์ฃผ ์์ฅ๊ฐ ์ ๊ท ๋งค์' # ์ฌ์ฉ์ ๊ตฌ๋ถ๋ช
, ๊ตฌ๋ถ๊ฐ๋ฅํ ์์์ ๋ฌธ์์ด
screen_no = '0001' # ํ๋ฉด๋ฒํธ, 0000 ์ ์ ์ธํ 4์๋ฆฌ ์ซ์ ์์๋ก ์ง์
account_no = first_account_no # ๊ณ์ข๋ฒํธ 10์๋ฆฌ, ์ฌ๊ธฐ์๋ ๊ณ์ข๋ฒํธ ๋ชฉ๋ก์์ ์ฒซ๋ฒ์งธ๋ก ๋ฐ๊ฒฌํ ๊ณ์ข๋ฒํธ๋ก ๋งค์์ฒ๋ฆฌ
order_type = 1 # ์ฃผ๋ฌธ์ ํ, 1 : ์ ๊ท๋งค์
code = samsung_code # ์ข
๋ชฉ์ฝ๋, ์์ ์ผ์ฑ์ ์ ์ข
๋ชฉ์ฝ๋
quantity = 1 # ์ฃผ๋ฌธ์๋, 1์ฃผ ๋งค์
price = 0 # ์ฃผ๋ฌธ๊ฐ๊ฒฉ, ์์ฅ๊ฐ ๋งค์๋ ๊ฐ๊ฒฉ์ค์ ์๋ฏธ์์
quote_type = '03' # ๊ฑฐ๋๊ตฌ๋ถ, 03 : ์์ฅ๊ฐ
original_order_no = '' # ์์ฃผ๋ฌธ๋ฒํธ, ์ฃผ๋ฌธ ์ ์ /์ทจ์ ๋ฑ์์ ์ฌ์ฉ
์ฃผ๋ฌธ์ ํ ๋ฐ ๊ฑฐ๋๊ตฌ๋ถ ๋ฑ๊ณผ ๊ด๋ จ๋ ์์ธํ ์ ๋ณด๋ค์ KOAStudio ํ๋ก๊ทธ๋จ์์ ํ์ธํ ์ ์๋ค.
์ฃผ๋ฌธ์ฒ๋ฆฌ๋ ์ค์ ์์ฅ์ด ์ด๋ ค์๋ ๋์์๋ง ํ ์คํธํด๋ณผ ์ ์๊ธฐ ๋๋ฌธ์, ํ์ฌ ์ฅ์ด ์ด๋ ค ์๋์ง ๋จผ์ ํ์ธํ๊ณ ํด๋น ๊ฒฝ์ฐ์ ํ์ ํด์ ํ ์คํธ๋ฅผ ์งํํ๋ค.
from pandas import Timestamp
from exchange_calendars import get_calendar
krx_calendar = get_calendar('XKRX')
def is_currently_in_session():
now = Timestamp.now(krx_calendar.tz)
previous_open = krx_calendar.previous_open(now).astimezone(krx_calendar.tz)
next_close = krx_calendar.next_close(previous_open).astimezone(krx_calendar.tz)
return previous_open <= now <= next_close
2021-07-20 10:28:30,088 [INFO] Note: NumExpr detected 12 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8. - utils.py:129 2021-07-20 10:28:30,088 [INFO] NumExpr defaulting to 8 threads. - utils.py:141
if is_currently_in_session():
logging.info('Sending order to buy %s, quantity of 1 stock, at market price...', code)
for event in entrypoint.OrderCall(request_name, screen_no, account_no, order_type, code, quantity, price, quote_type, original_order_no):
pprint_event(event)
else:
logging.info('Cannot send an order while market is not open, skipping...')
2021-07-20 10:28:30,378 [INFO] Sending order to buy 005930, quantity of 1 stock, at market price... - <ipython-input-58-37048f99b24d>:2
{'arguments': [{'string_value': '0001'}, {'string_value': '์ผ์ฑ์ ์ 1์ฃผ ์์ฅ๊ฐ ์ ๊ท ๋งค์'}, {'string_value': 'KOA_NORMAL_BUY_KP_ORD'}, {'string_value': '[100000] ๋ชจ์ํฌ์ ๋งค์์ฃผ๋ฌธ์๋ฃ'}], 'name': 'OnReceiveMsg'} {'arguments': [{'string_value': '0001'}, {'string_value': '์ผ์ฑ์ ์ 1์ฃผ ์์ฅ๊ฐ ์ ๊ท ๋งค์'}, {'string_value': 'KOA_NORMAL_BUY_KP_ORD'}, {'string_value': ''}, {'string_value': ''}], 'name': 'OnReceiveTrData', 'single_data': {'names': ['์ฃผ๋ฌธ๋ฒํธ'], 'values': ['0092073']}} {'arguments': [{'string_value': '0'}, {'long_value': '35'}, {'string_value': '9201;9203;9205;9001;912;913;302;900;901;902;903;904;905;906;907;908;909;910;911;10;27;28;914;915;938;939;919;920;921;922;923;949;10010;969;819'}], 'name': 'OnReceiveChejanData', 'single_data': {'names': ['๊ณ์ข๋ฒํธ', '์ฃผ๋ฌธ๋ฒํธ', '๊ด๋ฆฌ์ฌ๋ฒ', '์ข ๋ชฉ์ฝ๋', '์ฃผ๋ฌธ์ ๋ฌด๊ตฌ๋ถ', '์ฃผ๋ฌธ์ํ', '์ข ๋ชฉ๋ช ', '์ฃผ๋ฌธ์๋', '์ฃผ๋ฌธ๊ฐ๊ฒฉ', '๋ฏธ์ฒด๊ฒฐ์๋', '์ฒด๊ฒฐ๋๊ณ๊ธ์ก', '์์ฃผ๋ฌธ๋ฒํธ', '์ฃผ๋ฌธ๊ตฌ๋ถ', '๋งค๋งค๊ตฌ๋ถ', '๋งค๋์๊ตฌ๋ถ', '์ฃผ๋ฌธ/์ฒด๊ฒฐ์๊ฐ', '์ฒด๊ฒฐ๋ฒํธ', '์ฒด๊ฒฐ๊ฐ', '์ฒด๊ฒฐ๋', 'ํ์ฌ๊ฐ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๋จ์์ฒด๊ฒฐ๊ฐ', '๋จ์์ฒด๊ฒฐ๋', '๋น์ผ๋งค๋งค์์๋ฃ', '๋น์ผ๋งค๋งค์ธ๊ธ', '๊ฑฐ๋ถ์ฌ์ ', 'ํ๋ฉด๋ฒํธ', 'ํฐ๋ฏธ๋๋ฒํธ', '์ ์ฉ๊ตฌ๋ถ(์ค์๊ฐ์ฒด๊ฒฐ์ฉ)', '๋์ถ์ผ(์ค์๊ฐ์ฒด๊ฒฐ์ฉ)', '949', '์๊ฐ์ธ๋จ์ผ๊ฐ_ํ์ฌ๊ฐ', '969', '819'], 'values': ['8003297811', '0092073', '', 'A005930', 'JJ', '์ ์', '์ผ์ฑ์ ์', '1', '0', '1', '0', '0000000', '+๋งค์', '์์ฅ๊ฐ', '2', '102829', '', '', '', '-78700', '-78700', '-78600', '', '', '0', '0', '0', '0001', '', '00', '00000000', '3', '-78900', '0', '0']}} {'arguments': [{'string_value': '0'}, {'long_value': '35'}, {'string_value': '9201;9203;9205;9001;912;913;302;900;901;902;903;904;905;906;907;908;909;910;911;10;27;28;914;915;938;939;919;920;921;922;923;949;10010;969;819'}], 'name': 'OnReceiveChejanData', 'single_data': {'names': ['๊ณ์ข๋ฒํธ', '์ฃผ๋ฌธ๋ฒํธ', '๊ด๋ฆฌ์ฌ๋ฒ', '์ข ๋ชฉ์ฝ๋', '์ฃผ๋ฌธ์ ๋ฌด๊ตฌ๋ถ', '์ฃผ๋ฌธ์ํ', '์ข ๋ชฉ๋ช ', '์ฃผ๋ฌธ์๋', '์ฃผ๋ฌธ๊ฐ๊ฒฉ', '๋ฏธ์ฒด๊ฒฐ์๋', '์ฒด๊ฒฐ๋๊ณ๊ธ์ก', '์์ฃผ๋ฌธ๋ฒํธ', '์ฃผ๋ฌธ๊ตฌ๋ถ', '๋งค๋งค๊ตฌ๋ถ', '๋งค๋์๊ตฌ๋ถ', '์ฃผ๋ฌธ/์ฒด๊ฒฐ์๊ฐ', '์ฒด๊ฒฐ๋ฒํธ', '์ฒด๊ฒฐ๊ฐ', '์ฒด๊ฒฐ๋', 'ํ์ฌ๊ฐ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๋จ์์ฒด๊ฒฐ๊ฐ', '๋จ์์ฒด๊ฒฐ๋', '๋น์ผ๋งค๋งค์์๋ฃ', '๋น์ผ๋งค๋งค์ธ๊ธ', '๊ฑฐ๋ถ์ฌ์ ', 'ํ๋ฉด๋ฒํธ', 'ํฐ๋ฏธ๋๋ฒํธ', '์ ์ฉ๊ตฌ๋ถ(์ค์๊ฐ์ฒด๊ฒฐ์ฉ)', '๋์ถ์ผ(์ค์๊ฐ์ฒด๊ฒฐ์ฉ)', '949', '์๊ฐ์ธ๋จ์ผ๊ฐ_ํ์ฌ๊ฐ', '969', '819'], 'values': ['8003297811', '0092073', '', 'A005930', 'JJ', '์ฒด๊ฒฐ', '์ผ์ฑ์ ์', '1', '0', '0', '78600', '0000000', '+๋งค์', '์์ฅ๊ฐ', '2', '102830', '660666', '78600', '1', '-78600', '-78700', '-78600', '78600', '1', '270', '0', '0', '0001', '', '00', '00000000', '3', '-78900', '0', '0']}} {'arguments': [{'string_value': '1'}, {'long_value': '34'}, {'string_value': '9201;9001;917;916;302;10;930;931;932;933;945;946;950;951;27;28;307;8019;957;958;918;990;991;992;993;959;924;10010;25;11;12;306;305;970'}], 'name': 'OnReceiveChejanData', 'single_data': {'names': ['๊ณ์ข๋ฒํธ', '์ข ๋ชฉ์ฝ๋', '์ ์ฉ๊ตฌ๋ถ', '๋์ถ์ผ', '์ข ๋ชฉ๋ช ', 'ํ์ฌ๊ฐ', '๋ณด์ ์๋', '๋งค์ ๋จ๊ฐ', '์ด๋งค์ ๊ฐ', '์ฃผ๋ฌธ๊ฐ๋ฅ์๋', '๋น์ผ์๋งค์์๋', '๋งค๋/๋งค์๊ตฌ๋ถ', '๋น์ผ์ด๋งค๋์์ต', '์์๊ธ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ธฐ์ค๊ฐ', '์์ต์จ', '์ ์ฉ๊ธ์ก', '์ ์ฉ์ด์', '๋ง๊ธฐ์ผ', '๋น์ผ์คํ์์ต(์ ๊ฐ)', '๋น์ผ์คํ์์ต๋ฅ (์ ๊ฐ)', '๋น์ผ์คํ์์ต(์ ์ฉ)', '๋น์ผ์คํ์์ต๋ฅ (์ ์ฉ)', '๋ด๋ณด๋์ถ์๋', '์ฌ๋ถ์์ดํ ', '์๊ฐ์ธ๋จ์ผ๊ฐ_ํ์ฌ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', 'ํํ๊ฐ', '์ํ๊ฐ', '970'], 'values': ['8003297811', 'A005930', '00', '00000000', '์ผ์ฑ์ ์', '-78600', '4', '78725', '314900', '4', '3', '2', '0', '0', '-78700', '-78600', '79000', '0.00', '0', '0', '00000000', '0', '0.00', '0', '0.00', '0', '0', '-78900', '5', '-400', '-0.51', '-55300', '+102500', '10']}}
์ฃผ๋ฌธ ์ด๋ฒคํธ๋ ๊ธฐ๋ณธ์ ์ผ๋ก ์ฃผ๋ฌธ์๋์ด ๋ชจ๋ ์์ง๋๊ธฐ ์ ๊น์ง ์ด๋ฒคํธ๋ฅผ ๋ฃ๋๋ก ๋์ด์์ผ๋ฉฐ, ๋ค๋ฅธ ์ด๋ฒคํธ ์คํธ๋ฆผ๊ณผ ๋์ผํ๊ฒ stream.cancel()
์ ํํ๋ก ์ด๋ฒคํธ ์คํธ๋ฆผ์ ๋์ด์ ๋ฃ์ง ์๋๋ก ํ๋๊ฒ์ด ๊ฐ๋ฅํ๋ค. ๋ค๋ง ์ด๋ฒคํธ ์คํธ๋ฆผ์ ์ทจ์ํ๋ ๊ฒ์ด ๊ธฐ์กด ์ฃผ๋ฌธ๊น์ง ์ทจ์ํ๋ ๊ฒ์ ์๋๊ธฐ ๋๋ฌธ์ ์ฃผ๋ฌธ์ทจ์๋ ์ ์ ๋ฑ์ ์ํด์๋ ๋ณ๋์ ์ทจ์/์ ์ ์ฃผ๋ฌธ์ ๋ฃ์ด์ค์ผ ํ๋ค.
์ฌ๊ธฐ์ ๋ฐํ๋๋ ์ด๋ฒคํธ ๊ฐ์ฒด ์ญ์ ์์ TR ์์์์์ ๋์ผํ๊ฒ ListenResponse
ํ์
์ gRPC ๋ฉ์์ง ํํ๋ก ๋ฐํ๋๋ค.
from koapy import KiwoomOpenApiPlusRealType
code_list = [code]
fid_list = KiwoomOpenApiPlusRealType.get_fids_by_realtype_name('์ฃผ์์์ธ')
opt_type = '0' # ๊ธฐ์กด ํ๋ฉด์ ์ถ๊ฐ๊ฐ ์๋๋ผ ์ ๊ท ์์ฑ, 1 ์ ๊ฒฝ์ฐ ๊ธฐ์กด ํ๋ฉด๋ฒํธ์ ์ถ๊ฐ
logging.info('Start listening realtime stock data for code: %s', code)
stream = entrypoint.GetRealDataForCodesAsStream(
code_list,
fid_list,
opt_type,
screen_no=None, # ํ๋ฉด๋ฒํธ, 0000 ์ ์ ์ธํ 4์๋ฆฌ ์ซ์ ์์๋ก ์ง์ , None ์ ๊ฒฝ์ฐ ๋ด๋ถ์ ์ผ๋ก ์๋ ํ ๋น
infer_fids=True, # True ์ค์ ์ ์ฃผ์ด์ง fid_list ๋ฅผ ๊ณ ์งํ์ง ๋ง๊ณ ์ด๋ฒคํธ ์ฒ๋ฆฌ ํจ์๊ฐ ์ ๋ฌ ๋ฐ๋ ์ค์๊ฐ๋ฐ์ดํฐ ์ด๋ฆ์ ๋ฐ๋ผ ์ ์ฐํ๊ฒ fid_list ๋ฅผ ์ถ๋ก
readable_names=True, # True ์ค์ ์ ๊ฐ fid ๋ง๋ค ์ซ์ ๋์ ์ฝ์ ์ ์๋ ์ด๋ฆ์ผ๋ก ๋ณํํ์ฌ ๋ฐํ
fast_parse=False, # True ์ค์ ์ ์ด๋ฒคํธ ์ฒ๋ฆฌ ํจ์๋ด์์ ๊ฐ์ ์ฝ์ ๋ GetCommRealData() ํจ์ ๋์ ์ธ์๋ก ๋์ด์ค๋ ๋ฐ์ดํฐ๋ฅผ ์ง์ ํ์ฉ
)
2021-07-20 10:28:30,992 [INFO] Start listening realtime stock data for code: 005930 - <ipython-input-61-d908d1a08033>:1
import threading
def stop_listening():
logging.info('Stop listening realtime events...')
stream.cancel()
threading.Timer(10.0, stop_listening).start() # 10์ด ์ดํ์ gRPC ์ปค๋ฅ์
์ข
๋ฃํ๋๋ก ์ค์
import grpc
try:
for i, event in enumerate(stream):
if i < 10:
pprint_event(event) # ๋
ธํธ๋ถ ์ถ๋ ฅ์ด ๋๋ฌด ๊ธธ์ด์ง ์ ์์ด ์ต์ด 10๊ฐ๋ง ์ถ๋ ฅ
except grpc.RpcError as e:
print(e)
{'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102830\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+5\t4712130\t370328\t-78500\t-78900\t-78400\t' '5\t-8443284\t-668690789300\t-35.82\t0.08\t' '206\t90.18\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8615\t090027\t093541\t091501\t' '2270204\t2047349\t-47.42\t12457\t53886\t' '+393\t 0\t+5\t+5\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102830', '-78700', '-300', '-0.38', '-78700', '-78600', '+5', '4712130', '370328', '-78500', '-78900', '-78400', '5', '-8443284', '-668690789300', '-35.82', '0.08', '206', '90.18', '4698219', '2', '0', '-35.64', '000000', '000000', '8615', '090027', '093541', '091501', '2270204', '2047349', '-47.42', '12457', '53886', '+393', ' 0', '+5', '+5', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+1\t4712131\t370328\t-78500\t-78900\t-78400\t' '5\t-8443283\t-668690710600\t-35.82\t0.08\t' '206\t90.18\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8615\t090027\t093541\t091501\t' '2270204\t2047350\t-47.42\t12457\t53887\t+78\t ' '0\t+1\t+1\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78700', '-300', '-0.38', '-78700', '-78600', '+1', '4712131', '370328', '-78500', '-78900', '-78400', '5', '-8443283', '-668690710600', '-35.82', '0.08', '206', '90.18', '4698219', '2', '0', '-35.64', '000000', '000000', '8615', '090027', '093541', '091501', '2270204', '2047350', '-47.42', '12457', '53887', '+78', ' 0', '+1', '+1', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+1\t4712132\t370328\t-78500\t-78900\t-78400\t' '5\t-8443282\t-668690631900\t-35.82\t0.08\t' '206\t90.18\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8615\t090027\t093541\t091501\t' '2270204\t2047351\t-47.42\t12457\t53888\t+78\t ' '0\t+1\t+1\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78700', '-300', '-0.38', '-78700', '-78600', '+1', '4712132', '370328', '-78500', '-78900', '-78400', '5', '-8443282', '-668690631900', '-35.82', '0.08', '206', '90.18', '4698219', '2', '0', '-35.64', '000000', '000000', '8615', '090027', '093541', '091501', '2270204', '2047351', '-47.42', '12457', '53888', '+78', ' 0', '+1', '+1', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+100\t4712232\t370336\t-78500\t-78900\t' '-78400\t5\t-8443182\t-668682761900\t-35.82\t' '0.08\t206\t90.19\t4698219\t2\t0\t-35.64\t' '000000\t000000\t8616\t090027\t093541\t091501\t' '2270204\t2047451\t-47.42\t12457\t53889\t' '+7870\t 0\t+100\t+100\t7870\t6296\t78590\t' '419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78700', '-300', '-0.38', '-78700', '-78600', '+100', '4712232', '370336', '-78500', '-78900', '-78400', '5', '-8443182', '-668682761900', '-35.82', '0.08', '206', '90.19', '4698219', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270204', '2047451', '-47.42', '12457', '53889', '+7870', ' 0', '+100', '+100', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+1\t4712233\t370336\t-78500\t-78900\t-78400\t' '5\t-8443181\t-668682683200\t-35.82\t0.08\t' '206\t90.19\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8616\t090027\t093541\t091501\t' '2270204\t2047452\t-47.42\t12457\t53890\t+78\t ' '0\t+1\t+1\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78700', '-300', '-0.38', '-78700', '-78600', '+1', '4712233', '370336', '-78500', '-78900', '-78400', '5', '-8443181', '-668682683200', '-35.82', '0.08', '206', '90.19', '4698219', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270204', '2047452', '-47.42', '12457', '53890', '+78', ' 0', '+1', '+1', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78600\t-400\t-0.51\t-78700\t-78600\t' '-10\t4712243\t370337\t-78500\t-78900\t-78400\t' '5\t-8443171\t-668681897200\t-35.82\t0.08\t' '205\t90.19\t4692249\t2\t0\t-35.64\t000000\t' '000000\t8616\t090027\t093541\t091501\t' '2270214\t2047452\t-47.42\t12458\t53890\t-786\t' '-10\t 0\t-10\t7860\t6288\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78600', '-400', '-0.51', '-78700', '-78600', '-10', '4712243', '370337', '-78500', '-78900', '-78400', '5', '-8443171', '-668681897200', '-35.82', '0.08', '205', '90.19', '4692249', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270214', '2047452', '-47.42', '12458', '53890', '-786', '-10', ' 0', '-10', '7860', '6288', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+2\t4712245\t370337\t-78500\t-78900\t-78400\t' '5\t-8443169\t-668681739800\t-35.82\t0.08\t' '206\t90.19\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8616\t090027\t093541\t091501\t' '2270214\t2047454\t-47.42\t12458\t53891\t' '+157\t 0\t+2\t+2\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78700', '-300', '-0.38', '-78700', '-78600', '+2', '4712245', '370337', '-78500', '-78900', '-78400', '5', '-8443169', '-668681739800', '-35.82', '0.08', '206', '90.19', '4698219', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270214', '2047454', '-47.42', '12458', '53891', '+157', ' 0', '+2', '+2', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102831\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+1\t4712246\t370337\t-78500\t-78900\t-78400\t' '5\t-8443168\t-668681661100\t-35.82\t0.08\t' '206\t90.19\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8616\t090027\t093541\t091501\t' '2270214\t2047455\t-47.42\t12458\t53892\t+78\t ' '0\t+1\t+1\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102831', '-78700', '-300', '-0.38', '-78700', '-78600', '+1', '4712246', '370337', '-78500', '-78900', '-78400', '5', '-8443168', '-668681661100', '-35.82', '0.08', '206', '90.19', '4698219', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270214', '2047455', '-47.42', '12458', '53892', '+78', ' 0', '+1', '+1', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102832\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+1\t4712247\t370338\t-78500\t-78900\t-78400\t' '5\t-8443167\t-668681582400\t-35.82\t0.08\t' '206\t90.19\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8616\t090027\t093541\t091501\t' '2270214\t2047456\t-47.42\t12458\t53893\t+78\t ' '0\t+1\t+1\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102832', '-78700', '-300', '-0.38', '-78700', '-78600', '+1', '4712247', '370338', '-78500', '-78900', '-78400', '5', '-8443167', '-668681582400', '-35.82', '0.08', '206', '90.19', '4698219', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270214', '2047456', '-47.42', '12458', '53893', '+78', ' 0', '+1', '+1', '7870', '6296', '78590', '419']}} {'arguments': [{'string_value': '005930'}, {'string_value': '์ฃผ์์ฒด๊ฒฐ'}, {'string_value': '102832\t-78700\t-300\t-0.38\t-78700\t-78600\t' '+1\t4712248\t370338\t-78500\t-78900\t-78400\t' '5\t-8443166\t-668681503700\t-35.82\t0.08\t' '206\t90.19\t4698219\t2\t0\t-35.64\t000000\t' '000000\t8616\t090027\t093541\t091501\t' '2270214\t2047457\t-47.42\t12458\t53894\t+78\t ' '0\t+1\t+1\t7870\t6296\t78590\t419'}], 'name': 'OnReceiveRealData', 'single_data': {'names': ['์ฒด๊ฒฐ์๊ฐ', 'ํ์ฌ๊ฐ', '์ ์ผ๋๋น', '๋ฑ๋ฝ์จ', '๋งค๋ํธ๊ฐ', '๋งค์ํธ๊ฐ', '๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋', '๋์ ๊ฑฐ๋๋๊ธ', '์๊ฐ', '๊ณ ๊ฐ', '์ ๊ฐ', '์ ์ผ๋๋น๊ธฐํธ', '๊ฑฐ๋๋์ ์ผ๋๋น', '๊ฑฐ๋๋๊ธ์ฆ๊ฐ', '์ ์ผ๊ฑฐ๋๋๋๋น์จ', '๊ฑฐ๋ํ์ ์จ', '๊ฑฐ๋๋น์ฉ', '์ฒด๊ฒฐ๊ฐ๋', '์๊ฐ์ด์ก', '์ฅ๊ตฌ๋ถ', 'KO์ ๊ทผ๋', '822', '์ํ๊ฐ๋ฐ์์๊ฐ', 'ํํ๊ฐ๋ฐ์์๊ฐ', '851', '1890', '1891', '1892', '1030', '1031', '1032', '1071', '1072', '1313', '1315', '1316', '1314', '1497', '1498', '620', '732'], 'values': ['102832', '-78700', '-300', '-0.38', '-78700', '-78600', '+1', '4712248', '370338', '-78500', '-78900', '-78400', '5', '-8443166', '-668681503700', '-35.82', '0.08', '206', '90.19', '4698219', '2', '0', '-35.64', '000000', '000000', '8616', '090027', '093541', '091501', '2270214', '2047457', '-47.42', '12458', '53894', '+78', ' 0', '+1', '+1', '7870', '6296', '78590', '419']}}
2021-07-20 10:28:41,019 [INFO] Stop listening realtime events... - <ipython-input-62-f9a2c4046337>:4
<_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.CANCELLED details = "Locally cancelled by application!" debug_error_string = "None" >