tooja 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tooja-0.1.0/LICENSE +21 -0
- tooja-0.1.0/PKG-INFO +313 -0
- tooja-0.1.0/README.md +286 -0
- tooja-0.1.0/pyproject.toml +51 -0
- tooja-0.1.0/src/tooja/__init__.py +9 -0
- tooja-0.1.0/src/tooja/brokers/__init__.py +5 -0
- tooja-0.1.0/src/tooja/brokers/kis/__init__.py +7 -0
- tooja-0.1.0/src/tooja/brokers/kis/_call.py +143 -0
- tooja-0.1.0/src/tooja/brokers/kis/_mappers.py +955 -0
- tooja-0.1.0/src/tooja/brokers/kis/_rate_limit.py +16 -0
- tooja-0.1.0/src/tooja/brokers/kis/_ws_stream.py +416 -0
- tooja-0.1.0/src/tooja/brokers/kis/account.py +139 -0
- tooja-0.1.0/src/tooja/brokers/kis/analytics.py +175 -0
- tooja-0.1.0/src/tooja/brokers/kis/auth.py +215 -0
- tooja-0.1.0/src/tooja/brokers/kis/broker.py +151 -0
- tooja-0.1.0/src/tooja/brokers/kis/credentials.py +27 -0
- tooja-0.1.0/src/tooja/brokers/kis/info.py +179 -0
- tooja-0.1.0/src/tooja/brokers/kis/mapping.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/market.py +248 -0
- tooja-0.1.0/src/tooja/brokers/kis/orders.py +344 -0
- tooja-0.1.0/src/tooja/brokers/kis/rankings.py +265 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/base.py +269 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/avg_unit.py +97 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/inquire_asking_price.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/inquire_ccnl.py +40 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/inquire_daily_itemchartprice.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/inquire_daily_price.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/inquire_price.py +50 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/issue_info.py +119 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_quotations/search_bond_info.py +114 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/buy.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/inquire_balance.py +50 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/inquire_daily_ccld.py +71 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/inquire_psbl_order.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/inquire_psbl_rvsecncl.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/order_rvsecncl.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_trading/sell.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_ws/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_ws/h0bicnt0.py +38 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_ws/h0bjasp0.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_bond_ws/h0bjcnt0.py +37 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/display_board_callput.py +124 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/display_board_futures.py +54 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/display_board_option_list.py +36 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/display_board_top.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/exp_price_trend.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/inquire_asking_price.py +81 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/inquire_daily_fuopchartprice.py +71 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/inquire_price.py +89 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_quotations/inquire_time_fuopchartprice.py +82 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_balance.py +92 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_balance_settlement_pl.py +65 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_balance_valuation_pl.py +87 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_ccnl.py +83 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_ccnl_bstime.py +57 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_daily_amount_fee.py +76 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_deposit.py +63 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_ngt_balance.py +94 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_ngt_ccnl.py +83 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_psbl_ngt_order.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/inquire_psbl_order.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/margin_rate.py +41 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/ngt_margin_detail.py +139 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/order.py +50 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_trading/order_rvsecncl.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0cfasp0.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0cfcnt0.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0euanc0.py +26 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0euasp0.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0eucni0.py +37 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0eucnt0.py +74 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0ifasp0.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0ifcni0.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0ifcnt0.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0ioasp0.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0iocnt0.py +75 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0mfasp0.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0mfcni0.py +37 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0mfcnt0.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0zfanc0.py +26 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0zfasp0.py +85 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0zfcnt0.py +66 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0zoanc0.py +25 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0zoasp0.py +85 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_futureoption_ws/h0zocnt0.py +70 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/compare_stocks.py +35 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/cond_search.py +131 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/expiration_stocks.py +62 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/indicator.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/indicator_trend_ccnl.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/indicator_trend_daily.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/indicator_trend_minute.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/inquire_elw_price.py +71 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/lp_trade_trend.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/newly_listed.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/quick_change.py +59 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/sensitivity.py +59 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/sensitivity_trend_ccnl.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/sensitivity_trend_daily.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/udrl_asset_list.py +40 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/udrl_asset_price.py +76 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/updown_rate.py +80 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/volatility_trend_ccnl.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/volatility_trend_daily.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/volatility_trend_minute.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/volatility_trend_tick.py +37 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_elw_quotations/volume_rank.py +88 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/chk_holiday.py +40 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/comp_interest.py +54 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/exp_index_trend.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/exp_total_index.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_daily_indexchartprice.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_index_category_price.py +71 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_index_daily_price.py +73 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_index_price.py +69 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_index_tickprice.py +41 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_index_timeprice.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_time_indexchartprice.py +65 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/inquire_vi_status.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/market_time.py +41 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_industry/news_title.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/balance_sheet.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/bonus_issue.py +46 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/cap_dcrs.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/credit_by_company.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/dividend.py +50 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/estimate_perform.py +66 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/financial_ratio.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/forfeit.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/growth_ratio.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/income_statement.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/invest_opbysec.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/invest_opinion.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/lendable_by_company.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/list_info.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/mand_deposit.py +41 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/merger_split.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/other_major_ratios.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/paidin_capin.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/profit_ratio.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/pub_offer.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/purreq.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/rev_split.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/search_info.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/search_stock_info.py +100 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/sharehld_meet.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_info/stability_ratio.py +39 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/exp_closing_price.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_asking_price.py +132 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_asking_price_exp_ccn.py +122 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_ccnl.py +40 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_component_stock_price.py +70 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_daily_itemchartprice.py +85 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_daily_overtimeprice.py +66 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_daily_price.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_investor.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_member.py +100 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_overtime_asking_price.py +107 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_overtime_price.py +68 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_price.py +115 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_price_2.py +87 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_price_fhpst02400000.py +92 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_time_dailychartprice.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_time_itemchartprice.py +57 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_time_itemconclusion.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/inquire_time_overtimeconclusion.py +66 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/nav_comparison_daily_trend.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/nav_comparison_time_trend.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quotations/nav_comparison_trend.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/capture_uplowprice.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/comp_program_trade_daily.py +135 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/comp_program_trade_today.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/daily_credit_balance.py +61 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/daily_loan_trans.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/daily_short_sale.py +65 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/exp_price_trend.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/foreign_institution_total.py +63 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/frgnmem_pchs_trend.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/frgnmem_trade_estimate.py +46 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/frgnmem_trade_trend.py +54 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/inquire_daily_trade_volume.py +46 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/inquire_investor_daily_by_market.py +76 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/inquire_investor_time_by_market.py +105 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/inquire_member_daily.py +46 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/intstock_grouplist.py +40 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/intstock_multprice.py +120 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/intstock_stocklist_by_group.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/investor_program_trade_today.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/investor_trade_by_stock_daily.py +149 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/investor_trend_estimate.py +36 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/mktfunds.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/overtime_exp_trans_fluct.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/pbar_tratio.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/program_trade_by_stock.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/program_trade_by_stock_daily.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/psearch_result.py +57 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/psearch_title.py +36 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_quote_analysis/tradprt_byamt.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/after_hour_balance.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/bulk_trans_num.py +54 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/credit_balance.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/disparity.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/dividend_rate.py +46 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/exp_trans_updown.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/finance_ratio.py +71 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/fluctuation.py +69 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/hts_top_view.py +34 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/market_cap.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/market_value.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/near_new_highlow.py +59 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/overtime_fluctuation.py +73 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/overtime_volume.py +63 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/prefer_disparate_ratio.py +57 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/profit_asset_index.py +62 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/quote_balance.py +54 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/short_sale.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/top_interest_stock.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/traded_by_company.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/volume_power.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_rank_analysis/volume_rank.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_account_balance.py +71 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_balance.py +100 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_balance_rlz_pl.py +99 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_balance_tttc2208r.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_credit_psamount.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_daily_ccld.py +95 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_daily_ccld_tttc2201r.py +59 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_deposit.py +38 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_period_profit.py +73 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_period_trade_profit.py +82 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_present_balance.py +61 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_psbl_order.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_psbl_order_tttc0503r.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_psbl_rvsecncl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/inquire_psbl_sell.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/intgr_margin.py +140 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/order_cash.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/order_credit.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/order_resv.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/order_resv_ccnl.py +66 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/order_resv_rvsecncl.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/order_rvsecncl.py +65 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_trading/period_rights.py +72 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0ewanc0.py +77 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0ewasp0.py +91 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0ewcnt0.py +81 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0nxanc0.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0nxasp0.py +83 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0nxcnt0.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0nxmbc0.py +96 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0nxmko0.py +29 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0nxpgm0.py +29 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stanc0.py +63 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stasp0.py +77 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stcni0.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stcnt0.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stmbc0.py +95 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stmko0.py +28 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stnav0.py +26 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stoaa0.py +72 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stoac0.py +61 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stoup0.py +61 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0stpgm0.py +28 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0unanc0.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0unasp0.py +83 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0uncnt0.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0unmbc0.py +96 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0unmko0.py +28 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0unpgm0.py +29 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0upanc0.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0upcnt0.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/domestic_stock_ws/h0uppgm0.py +105 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/oauth/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/oauth/approval.py +29 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/oauth/revokep.py +30 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/oauth/tokenp.py +32 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/daily_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/inquire_asking_price.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/inquire_price.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/inquire_time_futurechartprice.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/inquire_time_optchartprice.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/investor_unpd_trend.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/market_time.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/monthly_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_asking_price.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_daily_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_detail.py +53 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_monthly_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_price.py +63 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_tick_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/opt_weekly_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/search_contract_detail.py +57 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/search_opt_detail.py +56 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/stock_detail.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/tick_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_quotations/weekly_ccnl.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_ccld.py +69 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_daily_ccld.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_daily_order.py +68 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_deposit.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_period_ccld.py +77 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_period_trans.py +57 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_psamount.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/inquire_unpd.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/margin_detail.py +84 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/order.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_trading/order_rvsecncl.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_ws/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_ws/hdfff010.py +52 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_ws/hdfff020.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_ws/hdfff1c0.py +50 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_futureoption_ws/hdfff2c0.py +50 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/countries_holiday.py +42 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/dailyprice.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/industry_price.py +41 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/industry_theme.py +62 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/inquire_asking_price.py +130 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/inquire_ccnl.py +55 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/inquire_daily_chartprice.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/inquire_search.py +88 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/inquire_time_indexchartprice.py +58 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/inquire_time_itemchartprice.py +65 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/multprice.py +89 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/price.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/price_detail.py +75 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quotations/search_info.py +89 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/brknews_title.py +67 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/colable_by_company.py +61 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/market_cap.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/new_highlow.py +62 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/news_title.py +51 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/period_rights.py +59 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/price_fluct.py +61 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/rights_by_ice.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/trade_growth.py +62 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/trade_pbmn.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/trade_turnover.py +63 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/trade_vol.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/updown_rate.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/volume_power.py +59 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_quote_analysis/volume_surge.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/algo_ordno.py +47 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/daytime_order.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/daytime_order_rvsecncl.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/foreign_margin.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_algo_ccnl.py +64 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_balance.py +72 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_ccnl.py +80 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_nccs.py +68 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_paymt_stdr_balance.py +84 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_period_profit.py +69 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_period_trans.py +75 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_present_balance.py +110 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/inquire_psamount.py +48 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/order.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/order_resv.py +49 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/order_resv_ccnl.py +37 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/order_resv_list.py +66 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_trading/order_rvsecncl.py +45 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_ws/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_ws/h0gscni0.py +43 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_ws/hdfsasp0.py +94 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_ws/hdfsasp1.py +35 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/overseas_stock_ws/hdfscnt0.py +44 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw/ws_base.py +129 -0
- tooja-0.1.0/src/tooja/brokers/kis/raw_namespace.py +60 -0
- tooja-0.1.0/src/tooja/brokers/kis/stream.py +126 -0
- tooja-0.1.0/src/tooja/brokers/toss/__init__.py +3 -0
- tooja-0.1.0/src/tooja/brokers/toss/_call.py +142 -0
- tooja-0.1.0/src/tooja/brokers/toss/_mappers.py +308 -0
- tooja-0.1.0/src/tooja/brokers/toss/_rate_limit.py +20 -0
- tooja-0.1.0/src/tooja/brokers/toss/account.py +87 -0
- tooja-0.1.0/src/tooja/brokers/toss/analytics.py +22 -0
- tooja-0.1.0/src/tooja/brokers/toss/auth.py +89 -0
- tooja-0.1.0/src/tooja/brokers/toss/broker.py +123 -0
- tooja-0.1.0/src/tooja/brokers/toss/credentials.py +14 -0
- tooja-0.1.0/src/tooja/brokers/toss/info.py +114 -0
- tooja-0.1.0/src/tooja/brokers/toss/mapping.py +60 -0
- tooja-0.1.0/src/tooja/brokers/toss/market.py +167 -0
- tooja-0.1.0/src/tooja/brokers/toss/orders.py +191 -0
- tooja-0.1.0/src/tooja/brokers/toss/rankings.py +21 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/account/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/account/get_accounts.py +21 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/asset/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/asset/get_holdings.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/auth/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/auth/issue_o_auth2_token.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/base.py +167 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_data/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_data/get_candles.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_data/get_orderbook.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_data/get_price_limit.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_data/get_prices.py +22 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_data/get_trades.py +22 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_info/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_info/get_exchange_rate.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_info/get_kr_market_calendar.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/market_info/get_us_market_calendar.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/models.py +505 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order/cancel_order.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order/create_order.py +16 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order/modify_order.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_history/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_history/get_order.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_history/get_orders.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_info/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_info/get_buying_power.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_info/get_commissions.py +22 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/order_info/get_sellable_quantity.py +17 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/stock_info/__init__.py +0 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/stock_info/get_stock_warnings.py +22 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw/stock_info/get_stocks.py +22 -0
- tooja-0.1.0/src/tooja/brokers/toss/raw_namespace.py +96 -0
- tooja-0.1.0/src/tooja/brokers/toss/stream.py +21 -0
- tooja-0.1.0/src/tooja/core/__init__.py +110 -0
- tooja-0.1.0/src/tooja/core/broker.py +76 -0
- tooja-0.1.0/src/tooja/core/clients.py +283 -0
- tooja-0.1.0/src/tooja/core/enums.py +80 -0
- tooja-0.1.0/src/tooja/core/errors.py +109 -0
- tooja-0.1.0/src/tooja/core/models.py +407 -0
- tooja-0.1.0/src/tooja/core/money.py +115 -0
- tooja-0.1.0/src/tooja/core/rate_limit.py +84 -0
- tooja-0.1.0/src/tooja/core/stream.py +79 -0
- tooja-0.1.0/src/tooja/core/token_cache.py +89 -0
- tooja-0.1.0/src/tooja/portfolio/__init__.py +5 -0
- tooja-0.1.0/src/tooja/portfolio/rebalance.py +180 -0
- tooja-0.1.0/src/tooja/py.typed +0 -0
tooja-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Youngchan Kim
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
tooja-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: tooja
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Unified Python client for Korean securities brokers — common abstraction with raw interface escape hatch
|
|
5
|
+
Keywords: kis,korea-investment,securities,broker,trading,stock,ccxt
|
|
6
|
+
Author: Youngchan Kim
|
|
7
|
+
Author-email: Youngchan Kim <cookieshake.dev@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Dist: httpx>=0.28
|
|
19
|
+
Requires-Dist: pydantic>=2.9
|
|
20
|
+
Requires-Dist: platformdirs>=4.3
|
|
21
|
+
Requires-Dist: websockets>=13
|
|
22
|
+
Requires-Python: >=3.13
|
|
23
|
+
Project-URL: Homepage, https://github.com/cookieshake/tooja
|
|
24
|
+
Project-URL: Repository, https://github.com/cookieshake/tooja
|
|
25
|
+
Project-URL: Issues, https://github.com/cookieshake/tooja/issues
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# tooja
|
|
29
|
+
|
|
30
|
+
[](https://www.python.org/)
|
|
31
|
+
[](LICENSE)
|
|
32
|
+
|
|
33
|
+
**A unified Python client for Korean securities brokers.** One broker-agnostic API
|
|
34
|
+
(`Quote` / `Order` / `Balance` / streams) across multiple brokers, plus a raw escape
|
|
35
|
+
hatch to each broker's native API when you need it. The goal: do for Korean brokers
|
|
36
|
+
what ccxt did for crypto exchanges.
|
|
37
|
+
|
|
38
|
+
Adapters: **Korea Investment & Securities (KIS)** · **Toss Securities (Toss)**.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Features
|
|
43
|
+
|
|
44
|
+
- **One API, many brokers** — normalized `Quote`/`Order`/`Balance`; switch adapters without touching strategy code
|
|
45
|
+
- **Raw escape hatch** — reach any native endpoint directly via `broker.raw.*`
|
|
46
|
+
- **async-first** — every call is `async`/`await`, built on `asyncio`
|
|
47
|
+
- **Strict `Money`** — `Decimal`-only, rejects math across mismatched currencies
|
|
48
|
+
- **Built-in rate limiting** — token bucket + exponential backoff on the server-side `EGW00201`
|
|
49
|
+
- **Persistent token cache** — on disk, multi-account safe (scoped by app_key hash)
|
|
50
|
+
- **WebSocket streams** — quotes/trades/orderbook/my-orders, with auto-reconnect + PINGPONG
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uv add tooja # or: pip install tooja
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Requires Python 3.13+. Before it lands on PyPI, install from source:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
git clone https://github.com/cookieshake/tooja && cd tooja && uv sync
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Quick start
|
|
69
|
+
|
|
70
|
+
The constructor differs per broker; **everything after it is identical.**
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
import asyncio
|
|
74
|
+
from tooja.brokers.kis import KisBroker
|
|
75
|
+
from tooja.brokers.toss import TossBroker
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
async def main():
|
|
79
|
+
# Korea Investment & Securities
|
|
80
|
+
broker = KisBroker(
|
|
81
|
+
app_key="...", app_secret="...",
|
|
82
|
+
cano="50000000", # first 8 digits of the account number
|
|
83
|
+
hts_id="your_hts_id",
|
|
84
|
+
env="demo", # "real" or "demo"
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
# ...or Toss Securities — same API from here on
|
|
88
|
+
# broker = TossBroker(client_id="...", client_secret="...", account_seq=12345678)
|
|
89
|
+
|
|
90
|
+
async with broker:
|
|
91
|
+
quote = await broker.market.get_quote("005930") # Samsung Electronics
|
|
92
|
+
print(quote.price) # Money(amount=Decimal('70000'), currency=KRW)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
asyncio.run(main())
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
A broker is an async context manager; leaving the `async with` block closes the HTTP
|
|
99
|
+
session (use `await broker.open()` / `await broker.close()` for manual control).
|
|
100
|
+
Tokens are issued **lazily** — on the first authenticated call — and cached to disk.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Brokers
|
|
105
|
+
|
|
106
|
+
Both adapters speak the same API; they differ in how much of it they implement.
|
|
107
|
+
|
|
108
|
+
| Domain | KIS | Toss |
|
|
109
|
+
|---------------|------------------------------------------------------|------------------------------------------------------------|
|
|
110
|
+
| **market** | full — quote, orderbook, OHLCV, price limits | quote, orderbook, price limits; OHLCV `1m`/`1d` only |
|
|
111
|
+
| **account** | full | full |
|
|
112
|
+
| **orders** | full, incl. fills (`list_fills`/`iter_fills`) | no stop orders, no fills |
|
|
113
|
+
| **info** | full — incl. dividends, financials, halts | `get_stock`, `get_warnings`, `is_holiday` only |
|
|
114
|
+
| **analytics** | ✅ investor flows, program trading, short selling, … | — |
|
|
115
|
+
| **rankings** | ✅ | — |
|
|
116
|
+
| **stream** | ✅ quotes, trades, orderbook, my-orders | — |
|
|
117
|
+
|
|
118
|
+
Anything not covered above raises `UnsupportedOperation` — and is still reachable via
|
|
119
|
+
the [raw escape hatch](#raw-escape-hatch).
|
|
120
|
+
|
|
121
|
+
### KIS
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
KisBroker(app_key="...", app_secret="...", cano="50000000", hts_id="...", env="demo")
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
| Argument | Description |
|
|
128
|
+
|----------------------|-------------------------------------------------------------------------|
|
|
129
|
+
| `app_key`,`app_secret` | KIS app key/secret |
|
|
130
|
+
| `cano` | first 8 digits of the account number |
|
|
131
|
+
| `hts_id` | HTS user ID (required for the WS my-order stream) |
|
|
132
|
+
| `acnt_prdt_cd` | account product code, defaults to `"01"` |
|
|
133
|
+
| `env` | `"real"` (live, 20 RPS) / `"demo"` (paper, 2 RPS) |
|
|
134
|
+
| `rate_limit` | a `RateLimitConfig`, optional |
|
|
135
|
+
|
|
136
|
+
`env` is the entire safety boundary — there is no dry-run mode, so with `env="real"`
|
|
137
|
+
orders are actually sent. Note that KIS **demo does not provide some TRs** (e.g.
|
|
138
|
+
`inquire-daily-ccld`, `search-stock-info`).
|
|
139
|
+
|
|
140
|
+
### Toss
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
TossBroker(client_id="...", client_secret="...", account_seq=12345678)
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Argument | Description |
|
|
147
|
+
|-------------------------|----------------------------------------------------------------------|
|
|
148
|
+
| `client_id`,`client_secret` | Toss Open API OAuth2 client credentials |
|
|
149
|
+
| `account_seq` | account sequence number (int); required only for account/order calls |
|
|
150
|
+
| `token_cache` | `"disk"` (default) / `"memory"` |
|
|
151
|
+
| `rate_limit` | a `RateLimitConfig`, optional |
|
|
152
|
+
|
|
153
|
+
Authentication is **OAuth2 client_credentials**; the access token is issued on the
|
|
154
|
+
first call and cached.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Usage
|
|
159
|
+
|
|
160
|
+
These calls are the same on any adapter — the examples use `broker` from the quick start.
|
|
161
|
+
|
|
162
|
+
### Market
|
|
163
|
+
|
|
164
|
+
```python
|
|
165
|
+
await broker.market.get_quote("005930") # -> Quote
|
|
166
|
+
await broker.market.get_quotes(["005930", "000660"]) # -> list[Quote] (concurrent)
|
|
167
|
+
await broker.market.get_orderbook("005930", depth=10) # -> Orderbook
|
|
168
|
+
await broker.market.get_ohlcv("005930", interval="1d", limit=30) # -> list[OHLCV]
|
|
169
|
+
# KIS intervals: "1m" "5m" "15m" "30m" "1h" "1d" "1w" "1M" · Toss: "1m" "1d"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Account
|
|
173
|
+
|
|
174
|
+
```python
|
|
175
|
+
balance = await broker.account.get_balance() # -> Balance (total_asset, cash, positions)
|
|
176
|
+
positions = await broker.account.get_positions() # -> list[Position]
|
|
177
|
+
pos = await broker.account.get_position("005930") # -> Position | None
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Orders
|
|
181
|
+
|
|
182
|
+
```python
|
|
183
|
+
from decimal import Decimal
|
|
184
|
+
from tooja.core import Money, Symbol, LimitOrder, MarketOrder, OrderSide, Currency
|
|
185
|
+
|
|
186
|
+
# limit buy
|
|
187
|
+
order = await broker.orders.create(LimitOrder(
|
|
188
|
+
symbol=Symbol.parse("005930"),
|
|
189
|
+
side=OrderSide.BUY,
|
|
190
|
+
qty=Decimal(10),
|
|
191
|
+
price=Money(amount=Decimal(70000), currency=Currency.KRW),
|
|
192
|
+
))
|
|
193
|
+
|
|
194
|
+
await broker.orders.get(order.order_id) # -> Order (current state)
|
|
195
|
+
await broker.orders.replace(order.order_id, price=Decimal(69000)) # amend
|
|
196
|
+
await broker.orders.cancel(order.order_id) # cancel
|
|
197
|
+
|
|
198
|
+
# market sell
|
|
199
|
+
await broker.orders.create(MarketOrder(
|
|
200
|
+
symbol=Symbol.parse("000660"), side=OrderSide.SELL, qty=Decimal(5),
|
|
201
|
+
))
|
|
202
|
+
|
|
203
|
+
# query
|
|
204
|
+
await broker.orders.list_orders(status="open") # "all" | "open" | "closed"
|
|
205
|
+
await broker.orders.list_fills() # KIS only -> list[Fill]
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Info / analytics / rankings
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
from datetime import date
|
|
212
|
+
from tooja.core import RankingType
|
|
213
|
+
|
|
214
|
+
await broker.info.get_stock("005930") # -> StockInfo
|
|
215
|
+
await broker.info.is_holiday(date(2026, 1, 1)) # -> bool
|
|
216
|
+
|
|
217
|
+
# KIS only:
|
|
218
|
+
await broker.info.get_dividends("005930")
|
|
219
|
+
await broker.info.list_halts() # halted symbols
|
|
220
|
+
await broker.analytics.investor_flows("005930") # trading flows by investor type
|
|
221
|
+
await broker.rankings.get(RankingType.VOLUME, limit=30) # -> list[RankingEntry]
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Streams (WebSocket, KIS only)
|
|
225
|
+
|
|
226
|
+
```python
|
|
227
|
+
async with broker.stream.quotes(["005930", "000660"]) as stream:
|
|
228
|
+
async for quote in stream:
|
|
229
|
+
print(quote.symbol, quote.price)
|
|
230
|
+
|
|
231
|
+
# trades / orderbook follow the same pattern; orders() streams my-order fills
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Streams are entered with `async with` and consumed with `async for`. They auto-reconnect
|
|
235
|
+
by default; adjust subscriptions at runtime with `await stream.subscribe(sym)` /
|
|
236
|
+
`await stream.unsubscribe(sym)`.
|
|
237
|
+
|
|
238
|
+
### Rebalancing
|
|
239
|
+
|
|
240
|
+
```python
|
|
241
|
+
from decimal import Decimal
|
|
242
|
+
from tooja.core import Symbol
|
|
243
|
+
from tooja.portfolio.rebalance import Rebalancer, TargetWeight
|
|
244
|
+
|
|
245
|
+
rb = Rebalancer(
|
|
246
|
+
broker,
|
|
247
|
+
targets=[
|
|
248
|
+
TargetWeight(symbol=Symbol.parse("005930"), weight=Decimal("0.6")),
|
|
249
|
+
TargetWeight(symbol=Symbol.parse("000660"), weight=Decimal("0.4")),
|
|
250
|
+
],
|
|
251
|
+
cash_buffer_rate=Decimal("0.02"), # hold 2% as cash
|
|
252
|
+
min_order_value=Decimal("10000"), # skip orders below 10,000 KRW
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
plan = await rb.compute_plan() # -> RebalancePlan (orders, expected_drift)
|
|
256
|
+
await rb.execute(plan) # execute the orders as planned
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
`Rebalancer` depends only on the `Broker` ABC, so it works with any adapter.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## Raw escape hatch
|
|
264
|
+
|
|
265
|
+
For endpoints the common API doesn't cover, call each broker's native API directly via
|
|
266
|
+
`broker.raw`. Categories are lazily imported on first access.
|
|
267
|
+
|
|
268
|
+
```python
|
|
269
|
+
# KIS — auto-generated executor classes (338 endpoints)
|
|
270
|
+
ExecCls = broker.raw.domestic_stock_quotations.InquirePriceExecutor
|
|
271
|
+
|
|
272
|
+
# Toss — categories: account, asset, auth, market_data, market_info,
|
|
273
|
+
# order, order_history, order_info, stock_info
|
|
274
|
+
client = broker.raw.market_data
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
> The raw layer currently exposes executor/category access; normalized call helpers are
|
|
278
|
+
> future work. For most tasks the common API above is enough.
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Rate limits & errors
|
|
283
|
+
|
|
284
|
+
```python
|
|
285
|
+
from tooja.core import RateLimitConfig
|
|
286
|
+
|
|
287
|
+
broker = KisBroker(..., rate_limit=RateLimitConfig(per_sec=10, max_retries=5, base_backoff=0.1))
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
Defaults: 20 RPS on KIS real, 2 RPS on KIS demo. The server-side `EGW00201`
|
|
291
|
+
(transactions-per-second exceeded) is retried automatically with exponential backoff.
|
|
292
|
+
|
|
293
|
+
All exceptions inherit from `BrokerError`:
|
|
294
|
+
|
|
295
|
+
`AuthError` · `PermissionDenied` · `RateLimitError` · `UnsupportedOperation` ·
|
|
296
|
+
`MarketClosed` · `SymbolNotFound` · `OrderRejected` · `InsufficientFunds` ·
|
|
297
|
+
`OrderNotFound` · `NetworkError` · `TimeoutError` · `SubscriptionLimitExceeded` ·
|
|
298
|
+
`ConfigError` · `BrokerAPIError`
|
|
299
|
+
|
|
300
|
+
```python
|
|
301
|
+
from tooja.core import OrderRejected
|
|
302
|
+
|
|
303
|
+
try:
|
|
304
|
+
await broker.orders.create(...)
|
|
305
|
+
except OrderRejected as e:
|
|
306
|
+
print(e.raw_code, e.raw_message) # preserves the original broker code/message
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## License
|
|
312
|
+
|
|
313
|
+
[MIT](LICENSE) © Youngchan Kim
|
tooja-0.1.0/README.md
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# tooja
|
|
2
|
+
|
|
3
|
+
[](https://www.python.org/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
**A unified Python client for Korean securities brokers.** One broker-agnostic API
|
|
7
|
+
(`Quote` / `Order` / `Balance` / streams) across multiple brokers, plus a raw escape
|
|
8
|
+
hatch to each broker's native API when you need it. The goal: do for Korean brokers
|
|
9
|
+
what ccxt did for crypto exchanges.
|
|
10
|
+
|
|
11
|
+
Adapters: **Korea Investment & Securities (KIS)** · **Toss Securities (Toss)**.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
- **One API, many brokers** — normalized `Quote`/`Order`/`Balance`; switch adapters without touching strategy code
|
|
18
|
+
- **Raw escape hatch** — reach any native endpoint directly via `broker.raw.*`
|
|
19
|
+
- **async-first** — every call is `async`/`await`, built on `asyncio`
|
|
20
|
+
- **Strict `Money`** — `Decimal`-only, rejects math across mismatched currencies
|
|
21
|
+
- **Built-in rate limiting** — token bucket + exponential backoff on the server-side `EGW00201`
|
|
22
|
+
- **Persistent token cache** — on disk, multi-account safe (scoped by app_key hash)
|
|
23
|
+
- **WebSocket streams** — quotes/trades/orderbook/my-orders, with auto-reconnect + PINGPONG
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Installation
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
uv add tooja # or: pip install tooja
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Requires Python 3.13+. Before it lands on PyPI, install from source:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git clone https://github.com/cookieshake/tooja && cd tooja && uv sync
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
The constructor differs per broker; **everything after it is identical.**
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
import asyncio
|
|
47
|
+
from tooja.brokers.kis import KisBroker
|
|
48
|
+
from tooja.brokers.toss import TossBroker
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
async def main():
|
|
52
|
+
# Korea Investment & Securities
|
|
53
|
+
broker = KisBroker(
|
|
54
|
+
app_key="...", app_secret="...",
|
|
55
|
+
cano="50000000", # first 8 digits of the account number
|
|
56
|
+
hts_id="your_hts_id",
|
|
57
|
+
env="demo", # "real" or "demo"
|
|
58
|
+
)
|
|
59
|
+
|
|
60
|
+
# ...or Toss Securities — same API from here on
|
|
61
|
+
# broker = TossBroker(client_id="...", client_secret="...", account_seq=12345678)
|
|
62
|
+
|
|
63
|
+
async with broker:
|
|
64
|
+
quote = await broker.market.get_quote("005930") # Samsung Electronics
|
|
65
|
+
print(quote.price) # Money(amount=Decimal('70000'), currency=KRW)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
asyncio.run(main())
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
A broker is an async context manager; leaving the `async with` block closes the HTTP
|
|
72
|
+
session (use `await broker.open()` / `await broker.close()` for manual control).
|
|
73
|
+
Tokens are issued **lazily** — on the first authenticated call — and cached to disk.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Brokers
|
|
78
|
+
|
|
79
|
+
Both adapters speak the same API; they differ in how much of it they implement.
|
|
80
|
+
|
|
81
|
+
| Domain | KIS | Toss |
|
|
82
|
+
|---------------|------------------------------------------------------|------------------------------------------------------------|
|
|
83
|
+
| **market** | full — quote, orderbook, OHLCV, price limits | quote, orderbook, price limits; OHLCV `1m`/`1d` only |
|
|
84
|
+
| **account** | full | full |
|
|
85
|
+
| **orders** | full, incl. fills (`list_fills`/`iter_fills`) | no stop orders, no fills |
|
|
86
|
+
| **info** | full — incl. dividends, financials, halts | `get_stock`, `get_warnings`, `is_holiday` only |
|
|
87
|
+
| **analytics** | ✅ investor flows, program trading, short selling, … | — |
|
|
88
|
+
| **rankings** | ✅ | — |
|
|
89
|
+
| **stream** | ✅ quotes, trades, orderbook, my-orders | — |
|
|
90
|
+
|
|
91
|
+
Anything not covered above raises `UnsupportedOperation` — and is still reachable via
|
|
92
|
+
the [raw escape hatch](#raw-escape-hatch).
|
|
93
|
+
|
|
94
|
+
### KIS
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
KisBroker(app_key="...", app_secret="...", cano="50000000", hts_id="...", env="demo")
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
| Argument | Description |
|
|
101
|
+
|----------------------|-------------------------------------------------------------------------|
|
|
102
|
+
| `app_key`,`app_secret` | KIS app key/secret |
|
|
103
|
+
| `cano` | first 8 digits of the account number |
|
|
104
|
+
| `hts_id` | HTS user ID (required for the WS my-order stream) |
|
|
105
|
+
| `acnt_prdt_cd` | account product code, defaults to `"01"` |
|
|
106
|
+
| `env` | `"real"` (live, 20 RPS) / `"demo"` (paper, 2 RPS) |
|
|
107
|
+
| `rate_limit` | a `RateLimitConfig`, optional |
|
|
108
|
+
|
|
109
|
+
`env` is the entire safety boundary — there is no dry-run mode, so with `env="real"`
|
|
110
|
+
orders are actually sent. Note that KIS **demo does not provide some TRs** (e.g.
|
|
111
|
+
`inquire-daily-ccld`, `search-stock-info`).
|
|
112
|
+
|
|
113
|
+
### Toss
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
TossBroker(client_id="...", client_secret="...", account_seq=12345678)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
| Argument | Description |
|
|
120
|
+
|-------------------------|----------------------------------------------------------------------|
|
|
121
|
+
| `client_id`,`client_secret` | Toss Open API OAuth2 client credentials |
|
|
122
|
+
| `account_seq` | account sequence number (int); required only for account/order calls |
|
|
123
|
+
| `token_cache` | `"disk"` (default) / `"memory"` |
|
|
124
|
+
| `rate_limit` | a `RateLimitConfig`, optional |
|
|
125
|
+
|
|
126
|
+
Authentication is **OAuth2 client_credentials**; the access token is issued on the
|
|
127
|
+
first call and cached.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Usage
|
|
132
|
+
|
|
133
|
+
These calls are the same on any adapter — the examples use `broker` from the quick start.
|
|
134
|
+
|
|
135
|
+
### Market
|
|
136
|
+
|
|
137
|
+
```python
|
|
138
|
+
await broker.market.get_quote("005930") # -> Quote
|
|
139
|
+
await broker.market.get_quotes(["005930", "000660"]) # -> list[Quote] (concurrent)
|
|
140
|
+
await broker.market.get_orderbook("005930", depth=10) # -> Orderbook
|
|
141
|
+
await broker.market.get_ohlcv("005930", interval="1d", limit=30) # -> list[OHLCV]
|
|
142
|
+
# KIS intervals: "1m" "5m" "15m" "30m" "1h" "1d" "1w" "1M" · Toss: "1m" "1d"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Account
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
balance = await broker.account.get_balance() # -> Balance (total_asset, cash, positions)
|
|
149
|
+
positions = await broker.account.get_positions() # -> list[Position]
|
|
150
|
+
pos = await broker.account.get_position("005930") # -> Position | None
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Orders
|
|
154
|
+
|
|
155
|
+
```python
|
|
156
|
+
from decimal import Decimal
|
|
157
|
+
from tooja.core import Money, Symbol, LimitOrder, MarketOrder, OrderSide, Currency
|
|
158
|
+
|
|
159
|
+
# limit buy
|
|
160
|
+
order = await broker.orders.create(LimitOrder(
|
|
161
|
+
symbol=Symbol.parse("005930"),
|
|
162
|
+
side=OrderSide.BUY,
|
|
163
|
+
qty=Decimal(10),
|
|
164
|
+
price=Money(amount=Decimal(70000), currency=Currency.KRW),
|
|
165
|
+
))
|
|
166
|
+
|
|
167
|
+
await broker.orders.get(order.order_id) # -> Order (current state)
|
|
168
|
+
await broker.orders.replace(order.order_id, price=Decimal(69000)) # amend
|
|
169
|
+
await broker.orders.cancel(order.order_id) # cancel
|
|
170
|
+
|
|
171
|
+
# market sell
|
|
172
|
+
await broker.orders.create(MarketOrder(
|
|
173
|
+
symbol=Symbol.parse("000660"), side=OrderSide.SELL, qty=Decimal(5),
|
|
174
|
+
))
|
|
175
|
+
|
|
176
|
+
# query
|
|
177
|
+
await broker.orders.list_orders(status="open") # "all" | "open" | "closed"
|
|
178
|
+
await broker.orders.list_fills() # KIS only -> list[Fill]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Info / analytics / rankings
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from datetime import date
|
|
185
|
+
from tooja.core import RankingType
|
|
186
|
+
|
|
187
|
+
await broker.info.get_stock("005930") # -> StockInfo
|
|
188
|
+
await broker.info.is_holiday(date(2026, 1, 1)) # -> bool
|
|
189
|
+
|
|
190
|
+
# KIS only:
|
|
191
|
+
await broker.info.get_dividends("005930")
|
|
192
|
+
await broker.info.list_halts() # halted symbols
|
|
193
|
+
await broker.analytics.investor_flows("005930") # trading flows by investor type
|
|
194
|
+
await broker.rankings.get(RankingType.VOLUME, limit=30) # -> list[RankingEntry]
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Streams (WebSocket, KIS only)
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
async with broker.stream.quotes(["005930", "000660"]) as stream:
|
|
201
|
+
async for quote in stream:
|
|
202
|
+
print(quote.symbol, quote.price)
|
|
203
|
+
|
|
204
|
+
# trades / orderbook follow the same pattern; orders() streams my-order fills
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Streams are entered with `async with` and consumed with `async for`. They auto-reconnect
|
|
208
|
+
by default; adjust subscriptions at runtime with `await stream.subscribe(sym)` /
|
|
209
|
+
`await stream.unsubscribe(sym)`.
|
|
210
|
+
|
|
211
|
+
### Rebalancing
|
|
212
|
+
|
|
213
|
+
```python
|
|
214
|
+
from decimal import Decimal
|
|
215
|
+
from tooja.core import Symbol
|
|
216
|
+
from tooja.portfolio.rebalance import Rebalancer, TargetWeight
|
|
217
|
+
|
|
218
|
+
rb = Rebalancer(
|
|
219
|
+
broker,
|
|
220
|
+
targets=[
|
|
221
|
+
TargetWeight(symbol=Symbol.parse("005930"), weight=Decimal("0.6")),
|
|
222
|
+
TargetWeight(symbol=Symbol.parse("000660"), weight=Decimal("0.4")),
|
|
223
|
+
],
|
|
224
|
+
cash_buffer_rate=Decimal("0.02"), # hold 2% as cash
|
|
225
|
+
min_order_value=Decimal("10000"), # skip orders below 10,000 KRW
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
plan = await rb.compute_plan() # -> RebalancePlan (orders, expected_drift)
|
|
229
|
+
await rb.execute(plan) # execute the orders as planned
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`Rebalancer` depends only on the `Broker` ABC, so it works with any adapter.
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Raw escape hatch
|
|
237
|
+
|
|
238
|
+
For endpoints the common API doesn't cover, call each broker's native API directly via
|
|
239
|
+
`broker.raw`. Categories are lazily imported on first access.
|
|
240
|
+
|
|
241
|
+
```python
|
|
242
|
+
# KIS — auto-generated executor classes (338 endpoints)
|
|
243
|
+
ExecCls = broker.raw.domestic_stock_quotations.InquirePriceExecutor
|
|
244
|
+
|
|
245
|
+
# Toss — categories: account, asset, auth, market_data, market_info,
|
|
246
|
+
# order, order_history, order_info, stock_info
|
|
247
|
+
client = broker.raw.market_data
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
> The raw layer currently exposes executor/category access; normalized call helpers are
|
|
251
|
+
> future work. For most tasks the common API above is enough.
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Rate limits & errors
|
|
256
|
+
|
|
257
|
+
```python
|
|
258
|
+
from tooja.core import RateLimitConfig
|
|
259
|
+
|
|
260
|
+
broker = KisBroker(..., rate_limit=RateLimitConfig(per_sec=10, max_retries=5, base_backoff=0.1))
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Defaults: 20 RPS on KIS real, 2 RPS on KIS demo. The server-side `EGW00201`
|
|
264
|
+
(transactions-per-second exceeded) is retried automatically with exponential backoff.
|
|
265
|
+
|
|
266
|
+
All exceptions inherit from `BrokerError`:
|
|
267
|
+
|
|
268
|
+
`AuthError` · `PermissionDenied` · `RateLimitError` · `UnsupportedOperation` ·
|
|
269
|
+
`MarketClosed` · `SymbolNotFound` · `OrderRejected` · `InsufficientFunds` ·
|
|
270
|
+
`OrderNotFound` · `NetworkError` · `TimeoutError` · `SubscriptionLimitExceeded` ·
|
|
271
|
+
`ConfigError` · `BrokerAPIError`
|
|
272
|
+
|
|
273
|
+
```python
|
|
274
|
+
from tooja.core import OrderRejected
|
|
275
|
+
|
|
276
|
+
try:
|
|
277
|
+
await broker.orders.create(...)
|
|
278
|
+
except OrderRejected as e:
|
|
279
|
+
print(e.raw_code, e.raw_message) # preserves the original broker code/message
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## License
|
|
285
|
+
|
|
286
|
+
[MIT](LICENSE) © Youngchan Kim
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "tooja"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Unified Python client for Korean securities brokers — common abstraction with raw interface escape hatch"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [
|
|
9
|
+
{ name = "Youngchan Kim", email = "cookieshake.dev@gmail.com" }
|
|
10
|
+
]
|
|
11
|
+
requires-python = ">=3.13"
|
|
12
|
+
keywords = ["kis", "korea-investment", "securities", "broker", "trading", "stock", "ccxt"]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"Development Status :: 3 - Alpha",
|
|
15
|
+
"Intended Audience :: Developers",
|
|
16
|
+
"Intended Audience :: Financial and Insurance Industry",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Programming Language :: Python :: 3.13",
|
|
20
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
21
|
+
"Typing :: Typed",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"httpx>=0.28",
|
|
25
|
+
"pydantic>=2.9",
|
|
26
|
+
"platformdirs>=4.3",
|
|
27
|
+
"websockets>=13",
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
Homepage = "https://github.com/cookieshake/tooja"
|
|
32
|
+
Repository = "https://github.com/cookieshake/tooja"
|
|
33
|
+
Issues = "https://github.com/cookieshake/tooja/issues"
|
|
34
|
+
|
|
35
|
+
[build-system]
|
|
36
|
+
requires = ["uv_build>=0.11.6,<0.12.0"]
|
|
37
|
+
build-backend = "uv_build"
|
|
38
|
+
|
|
39
|
+
[dependency-groups]
|
|
40
|
+
dev = [
|
|
41
|
+
"pytest>=8.3",
|
|
42
|
+
"pytest-asyncio>=0.24",
|
|
43
|
+
]
|
|
44
|
+
docs = [
|
|
45
|
+
"mkdocs-material>=9.5",
|
|
46
|
+
"mkdocstrings[python]>=0.27",
|
|
47
|
+
"mkdocs-gen-files>=0.5",
|
|
48
|
+
"mkdocs-literate-nav>=0.6",
|
|
49
|
+
"mkdocs-llmstxt>=0.2",
|
|
50
|
+
"ruff>=0.8", # mkdocstrings 시그니처 포매팅
|
|
51
|
+
]
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""tooja — unified Python client for Korean securities brokers.
|
|
2
|
+
|
|
3
|
+
A common, broker-agnostic abstraction with a raw escape hatch. The first
|
|
4
|
+
adapter targets Korea Investment & Securities (KIS).
|
|
5
|
+
|
|
6
|
+
from tooja.brokers.kis import KisBroker
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
__version__ = "0.1.0"
|