{"openapi":"3.1.0","info":{"title":"stock-backend","description":"수집된 회사/제품/재무 데이터를 서빙하는 API. OAuth2 client-credentials 인증.","version":"0.2.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health","description":"No auth -- meant for a Docker HEALTHCHECK / uptime monitor, never returns\nanything beyond a boolean DB-reachability signal.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/auth/token":{"post":{"tags":["auth"],"summary":"Issue Token","description":"OAuth2 client-credentials grant (RFC 6749 4.4). No auth dependency on this\nroute itself -- the client_id/client_secret pair IS the credential being\nexchanged for a token.","operationId":"issue_token_auth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_issue_token_auth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies":{"get":{"tags":["companies"],"summary":"Companies List","operationId":"companies_list_companies_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"substring match on name/name_local/name_ko","title":"Q"},"description":"substring match on name/name_local/name_ko"},{"name":"ticker","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Ticker"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"description":"active, inactive or delisted","title":"Status"},"description":"active, inactive or delisted"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/financials":{"get":{"tags":["companies"],"summary":"Company Financials","description":"Newest fiscal period first. With `as_of`, a point-in-time view keyed on the\nstatement's filing date (`filed_at`) for look-ahead-free backtests.","operationId":"company_financials_companies__company_id__financials_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"as_of","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"only statements filed on or before this date (filing date known)","title":"As Of"},"description":"only statements filed on or before this date (filing date known)"},{"name":"period_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"annual or quarterly","title":"Period Type"},"description":"annual or quarterly"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinancialStatementsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/value-chain":{"get":{"tags":["companies"],"summary":"Company Value Chain","description":"The `/ws` subscribe payload as a plain request: the company's products and\ncomponents plus supplier / customer / sub-component edges from stock-parts-engine.","operationId":"company_value_chain_companies__company_id__value_chain_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}":{"get":{"tags":["companies"],"summary":"Company Detail","description":"The dedicated fast-lookup path: served straight from stock-company-engine's\n`company_full` materialized view (see that repo's `cli.py company` subcommand,\nwhich reads the same view for manual/ops use).","operationId":"company_detail_companies__company_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Company Detail Companies  Company Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/value-chain/links":{"get":{"tags":["companies"],"summary":"Value Chain Links","description":"Every supplier -> customer pair at once, for clients that map many companies\n(one request instead of one `/companies/{id}/value-chain` per company).","operationId":"value_chain_links_value_chain_links_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueChainLinksResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/companies/{company_id}/prices":{"get":{"tags":["prices"],"summary":"Company Prices","description":"OHLCV bars collected by stock-market-engine (newest first). Read straight\nfrom the `stock_market` TimescaleDB; the company DB is not consulted.","operationId":"company_prices_companies__company_id__prices_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"timeframe","in":"query","required":false,"schema":{"type":"string","description":"one of 1h, 1d, 1w, 1mo, 1y","default":"1d","title":"Timeframe"},"description":"one of 1h, 1d, 1w, 1mo, 1y"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":5000,"minimum":1,"default":500,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceBarsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/investor-flow":{"get":{"tags":["prices"],"summary":"Company Investor Flow","description":"KR net buying by investor type (individual / foreign / institution, plus\nother_corp from KRX), newest day first. Collected by stock-market-engine; each day\ncomes from one source (krx > kis > naver). `net_value` is KRW and null for\nNaver-sourced days (shares only).","operationId":"company_investor_flow_companies__company_id__investor_flow_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":1,"description":"latest trading days to return","default":20,"title":"Days"},"description":"latest trading days to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvestorFlowResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prices/latest":{"get":{"tags":["prices"],"summary":"Latest Closes","description":"Latest 1d close and previous close for many companies at once (list screens).","operationId":"latest_closes_prices_latest_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"comma-separated company ids, at most 200","title":"Ids"},"description":"comma-separated company ids, at most 200"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LatestClosesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/prices/rebases":{"get":{"tags":["prices"],"summary":"Price Rebases","description":"Daily series whose source re-based their whole history after a split, merger or\nrights/bonus issue (pykrx for KR), oldest first. The stored prices are then adjusted\nthroughout and no longer show the action, so a client comparing them with a share\ncount from the statements reads the action's date here: it took effect after\n`last_changed`, and `ratio` is the new / old close of that session.","operationId":"price_rebases_prices_rebases_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":true,"schema":{"type":"string","description":"one of KR, US, JP, CN","title":"Country"},"description":"one of KR, US, JP, CN"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceRebasesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/markets/{country}/snapshot":{"get":{"tags":["markets"],"summary":"Market Snapshot","description":"Latest daily bar and derived metrics for every active company of a market that\nhas a 1d bar in the last 30 days, in one response (list and screening screens).\n\nReturns are fractions (0.05 = 5%) from the close N sessions earlier;\n`volume_ratio` is volume / `avg_volume_20` (the 20 sessions before the last);\n`high_250d` is the highest high of the last 250 sessions; `volatility_20d` is the\nsample standard deviation of the last 20 daily returns, not annualized. A figure\nwithout its full lookback is null. Benchmark ETFs are not companies and are omitted.","operationId":"market_snapshot_markets__country__snapshot_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string","title":"Country"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/flows/summary":{"get":{"tags":["flows"],"summary":"Flow Summary","description":"Net buying by investor type (foreign / institution / individual) summed per\ncompany over the latest `days` trading days up to `end_date`. Each company-day\ncomes from one source (krx > kis > naver). Values are KRW: the source's net value\nwhen it reports one, otherwise net shares x that day's close (Naver).","operationId":"flow_summary_flows_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"country","in":"query","required":false,"schema":{"type":"string","description":"only KR has investor-flow data","default":"KR","title":"Country"},"description":"only KR has investor-flow data"},{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":60,"minimum":1,"description":"latest trading days to sum","default":5,"title":"Days"},"description":"latest trading days to sum"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"last day of the window; default latest","title":"End Date"},"description":"last day of the window; default latest"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/macro/catalog":{"get":{"tags":["macro"],"summary":"Macro Catalog","description":"Macro series collected by stock-market-engine (FRED) and their latest observation date.","operationId":"macro_catalog_macro_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacroCatalogResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/macro/series":{"get":{"tags":["macro"],"summary":"Macro Series","description":"Observations (oldest first) of the requested series; unknown ids are left out.","operationId":"macro_series_macro_series_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","description":"comma-separated series ids, at most 50","title":"Ids"},"description":"comma-separated series ids, at most 50"},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"first observation date to return","title":"Start"},"description":"first observation date to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MacroSeriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/companies/{company_id}/news":{"get":{"tags":["news"],"summary":"Company News","description":"Articles stock-news-engine linked to the company, newest first.","operationId":"company_news_companies__company_id__news_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"string","title":"Company Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats":{"get":{"tags":["stats"],"summary":"Stats","operationId":"stats_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/stats/freshness":{"get":{"tags":["stats"],"summary":"Freshness","description":"Latest price bar, investor-flow day and financial collection per country.","operationId":"freshness_stats_freshness_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreshnessResponse"}}}}},"security":[{"HTTPBearer":[]}]}}},"components":{"schemas":{"Body_issue_token_auth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"client_id":{"type":"string","title":"Client Id"},"client_secret":{"type":"string","title":"Client Secret"}},"type":"object","required":["grant_type","client_id","client_secret"],"title":"Body_issue_token_auth_token_post"},"CompanyListResponse":{"properties":{"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/CompanySummary"},"type":"array","title":"Items"}},"type":"object","required":["total","limit","offset","items"],"title":"CompanyListResponse"},"CompanySummary":{"properties":{"id":{"type":"string","title":"Id"},"country":{"type":"string","title":"Country"},"name":{"type":"string","title":"Name"},"name_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Local"},"name_ko":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Ko"},"tickers":{"items":{"type":"string"},"type":"array","title":"Tickers"},"exchange":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exchange"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"market_cap_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Market Cap Tier"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"industry_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry Code"}},"type":"object","required":["id","country","name","name_local","name_ko","tickers","exchange","sector","industry","market_cap_tier","status"],"title":"CompanySummary"},"FinancialStatement":{"properties":{"id":{"type":"string","title":"Id"},"fiscal_year":{"type":"integer","title":"Fiscal Year"},"fiscal_period":{"type":"string","title":"Fiscal Period"},"period_type":{"type":"string","title":"Period Type"},"statement_type":{"type":"string","title":"Statement Type"},"currency":{"type":"string","title":"Currency"},"line_items":{"additionalProperties":{"type":"number"},"type":"object","title":"Line Items"},"source":{"type":"string","title":"Source"},"reliability_level":{"type":"string","title":"Reliability Level"},"reliability_score":{"type":"number","title":"Reliability Score"},"filed_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Filed At"},"collected_at":{"type":"string","format":"date-time","title":"Collected At"}},"type":"object","required":["id","fiscal_year","fiscal_period","period_type","statement_type","currency","line_items","source","reliability_level","reliability_score","filed_at","collected_at"],"title":"FinancialStatement"},"FinancialStatementsResponse":{"properties":{"company_id":{"type":"string","title":"Company Id"},"as_of":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"As Of"},"count":{"type":"integer","title":"Count"},"statements":{"items":{"$ref":"#/components/schemas/FinancialStatement"},"type":"array","title":"Statements"}},"type":"object","required":["company_id","as_of","count","statements"],"title":"FinancialStatementsResponse"},"FlowSummaryItem":{"properties":{"company_id":{"type":"string","title":"Company Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"foreign_net_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Foreign Net Volume"},"institution_net_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Institution Net Volume"},"individual_net_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Individual Net Volume"},"foreign_net_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Foreign Net Value"},"institution_net_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Institution Net Value"},"individual_net_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Individual Net Value"}},"type":"object","required":["company_id","name","foreign_net_volume","institution_net_volume","individual_net_volume","foreign_net_value","institution_net_value","individual_net_value"],"title":"FlowSummaryItem"},"FlowSummaryResponse":{"properties":{"country":{"type":"string","title":"Country"},"days":{"type":"integer","title":"Days"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"items":{"items":{"$ref":"#/components/schemas/FlowSummaryItem"},"type":"array","title":"Items"}},"type":"object","required":["country","days","start_date","end_date","items"],"title":"FlowSummaryResponse"},"FreshnessByCountry":{"properties":{"country":{"type":"string","title":"Country"},"prices_1d_latest":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Prices 1D Latest"},"prices_1d_tickers":{"type":"integer","title":"Prices 1D Tickers"},"flow_latest":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Flow Latest"},"financials_collected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Financials Collected At"},"financials_filed_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Financials Filed At"}},"type":"object","required":["country","prices_1d_latest","prices_1d_tickers","flow_latest","financials_collected_at","financials_filed_at"],"title":"FreshnessByCountry"},"FreshnessResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"countries":{"items":{"$ref":"#/components/schemas/FreshnessByCountry"},"type":"array","title":"Countries"}},"type":"object","required":["generated_at","countries"],"title":"FreshnessResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"database":{"type":"string","title":"Database"}},"type":"object","required":["status","database"],"title":"HealthResponse"},"InvestorFlowResponse":{"properties":{"company_id":{"type":"string","title":"Company Id"},"days":{"type":"integer","title":"Days"},"count":{"type":"integer","title":"Count"},"rows":{"items":{"$ref":"#/components/schemas/InvestorFlowRow"},"type":"array","title":"Rows"}},"type":"object","required":["company_id","days","count","rows"],"title":"InvestorFlowResponse"},"InvestorFlowRow":{"properties":{"trading_date":{"type":"string","format":"date","title":"Trading Date"},"investor_type":{"type":"string","title":"Investor Type"},"net_volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Net Volume"},"net_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net Value"},"source":{"type":"string","title":"Source"}},"type":"object","required":["trading_date","investor_type","net_volume","net_value","source"],"title":"InvestorFlowRow"},"LatestClose":{"properties":{"company_id":{"type":"string","title":"Company Id"},"trading_date":{"type":"string","format":"date","title":"Trading Date"},"close":{"type":"number","title":"Close"},"prev_close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prev Close"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["company_id","trading_date","close","prev_close","currency"],"title":"LatestClose"},"LatestClosesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LatestClose"},"type":"array","title":"Items"},"missing":{"items":{"type":"string"},"type":"array","title":"Missing"}},"type":"object","required":["items","missing"],"title":"LatestClosesResponse"},"MacroCatalogItem":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"unit":{"type":"string","title":"Unit"},"frequency":{"type":"string","title":"Frequency"},"source":{"type":"string","title":"Source"},"country":{"type":"string","title":"Country"},"last_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Date"}},"type":"object","required":["id","title","unit","frequency","source","country","last_date"],"title":"MacroCatalogItem"},"MacroCatalogResponse":{"properties":{"series":{"items":{"$ref":"#/components/schemas/MacroCatalogItem"},"type":"array","title":"Series"}},"type":"object","required":["series"],"title":"MacroCatalogResponse"},"MacroObservation":{"properties":{"date":{"type":"string","format":"date","title":"Date"},"value":{"type":"number","title":"Value"}},"type":"object","required":["date","value"],"title":"MacroObservation"},"MacroSeries":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"unit":{"type":"string","title":"Unit"},"frequency":{"type":"string","title":"Frequency"},"source":{"type":"string","title":"Source"},"country":{"type":"string","title":"Country"},"observations":{"items":{"$ref":"#/components/schemas/MacroObservation"},"type":"array","title":"Observations"}},"type":"object","required":["id","title","unit","frequency","source","country","observations"],"title":"MacroSeries"},"MacroSeriesResponse":{"properties":{"series":{"items":{"$ref":"#/components/schemas/MacroSeries"},"type":"array","title":"Series"}},"type":"object","required":["series"],"title":"MacroSeriesResponse"},"MarketSnapshotItem":{"properties":{"company_id":{"type":"string","title":"Company Id"},"name":{"type":"string","title":"Name"},"name_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Local"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"industry_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry Code"},"trading_date":{"type":"string","format":"date","title":"Trading Date"},"close":{"type":"number","title":"Close"},"prev_close":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prev Close"},"change_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Change Pct"},"volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volume"},"avg_volume_20":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Volume 20"},"volume_ratio":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volume Ratio"},"ret_5d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 5D"},"ret_20d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 20D"},"ret_60d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 60D"},"ret_250d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ret 250D"},"high_250d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High 250D"},"volatility_20d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Volatility 20D"}},"type":"object","required":["company_id","name","name_local","sector","industry","trading_date","close","prev_close","change_pct","volume","avg_volume_20","volume_ratio","ret_5d","ret_20d","ret_60d","ret_250d","high_250d","volatility_20d"],"title":"MarketSnapshotItem"},"MarketSnapshotResponse":{"properties":{"country":{"type":"string","title":"Country"},"asof":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Asof"},"items":{"items":{"$ref":"#/components/schemas/MarketSnapshotItem"},"type":"array","title":"Items"}},"type":"object","required":["country","asof","items"],"title":"MarketSnapshotResponse"},"NewsArticle":{"properties":{"id":{"type":"string","title":"Id"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"source_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Domain"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"reliability_level":{"type":"string","title":"Reliability Level"},"reliability_score":{"type":"number","title":"Reliability Score"},"collected_at":{"type":"string","format":"date-time","title":"Collected At"}},"type":"object","required":["id","url","title","summary","published_at","source_domain","language","reliability_level","reliability_score","collected_at"],"title":"NewsArticle"},"NewsListResponse":{"properties":{"company_id":{"type":"string","title":"Company Id"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"},"items":{"items":{"$ref":"#/components/schemas/NewsArticle"},"type":"array","title":"Items"}},"type":"object","required":["company_id","total","limit","offset","items"],"title":"NewsListResponse"},"PriceBar":{"properties":{"ts_utc":{"type":"string","format":"date-time","title":"Ts Utc"},"trading_date":{"type":"string","format":"date","title":"Trading Date"},"open":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Open"},"high":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"High"},"low":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Low"},"close":{"type":"number","title":"Close"},"volume":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Volume"},"currency":{"type":"string","title":"Currency"},"source":{"type":"string","title":"Source"},"exchange":{"type":"string","title":"Exchange"}},"type":"object","required":["ts_utc","trading_date","open","high","low","close","volume","currency","source","exchange"],"title":"PriceBar"},"PriceBarsResponse":{"properties":{"company_id":{"type":"string","title":"Company Id"},"timeframe":{"type":"string","title":"Timeframe"},"count":{"type":"integer","title":"Count"},"bars":{"items":{"$ref":"#/components/schemas/PriceBar"},"type":"array","title":"Bars"}},"type":"object","required":["company_id","timeframe","count","bars"],"title":"PriceBarsResponse"},"PriceRebase":{"properties":{"company_id":{"type":"string","title":"Company Id"},"last_changed":{"type":"string","format":"date","title":"Last Changed"},"ratio":{"type":"number","title":"Ratio"},"source":{"type":"string","title":"Source"},"detected_at":{"type":"string","format":"date-time","title":"Detected At"}},"type":"object","required":["company_id","last_changed","ratio","source","detected_at"],"title":"PriceRebase"},"PriceRebasesResponse":{"properties":{"country":{"type":"string","title":"Country"},"count":{"type":"integer","title":"Count"},"items":{"items":{"$ref":"#/components/schemas/PriceRebase"},"type":"array","title":"Items"}},"type":"object","required":["country","count","items"],"title":"PriceRebasesResponse"},"StatsByCountry":{"properties":{"country":{"type":"string","title":"Country"},"companies":{"type":"integer","title":"Companies"},"companies_with_products":{"type":"integer","title":"Companies With Products"}},"type":"object","required":["country","companies","companies_with_products"],"title":"StatsByCountry"},"StatsResponse":{"properties":{"by_country":{"items":{"$ref":"#/components/schemas/StatsByCountry"},"type":"array","title":"By Country"},"totals":{"$ref":"#/components/schemas/StatsTotals"}},"type":"object","required":["by_country","totals"],"title":"StatsResponse"},"StatsTotals":{"properties":{"companies":{"type":"integer","title":"Companies"},"products":{"type":"integer","title":"Products"},"components":{"type":"integer","title":"Components"},"intangible_products":{"type":"integer","title":"Intangible Products"},"intangible_components":{"type":"integer","title":"Intangible Components"},"financial_statements":{"type":"integer","title":"Financial Statements"}},"type":"object","required":["companies","products","components","intangible_products","intangible_components","financial_statements"],"title":"StatsTotals"},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["access_token","expires_in"],"title":"TokenResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValueChainCompany":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"name_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Local"},"name_ko":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Ko"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"tickers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tickers"},"sector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sector"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"}},"type":"object","required":["id"],"title":"ValueChainCompany"},"ValueChainComponent":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity"}},"type":"object","required":["id","name","category","role","quantity"],"title":"ValueChainComponent"},"ValueChainCustomer":{"properties":{"component_id":{"type":"string","title":"Component Id"},"company_id":{"type":"string","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"product_id":{"type":"string","title":"Product Id"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["component_id","company_id","company_name","country","product_id","role"],"title":"ValueChainCustomer"},"ValueChainLink":{"properties":{"supplier_id":{"type":"string","title":"Supplier Id"},"customer_id":{"type":"string","title":"Customer Id"},"component_id":{"type":"string","title":"Component Id"},"component_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"}},"type":"object","required":["supplier_id","customer_id","component_id","component_name","role"],"title":"ValueChainLink"},"ValueChainLinkCompany":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"name_local":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Local"},"name_ko":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Ko"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","required":["id","name","name_local","name_ko","country","status"],"title":"ValueChainLinkCompany"},"ValueChainLinksResponse":{"properties":{"count":{"type":"integer","title":"Count"},"links":{"items":{"$ref":"#/components/schemas/ValueChainLink"},"type":"array","title":"Links"},"companies":{"items":{"$ref":"#/components/schemas/ValueChainLinkCompany"},"type":"array","title":"Companies"}},"type":"object","required":["count","links","companies"],"title":"ValueChainLinksResponse"},"ValueChainProduct":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"components":{"items":{"$ref":"#/components/schemas/ValueChainComponent"},"type":"array","title":"Components"}},"type":"object","required":["id","name","category","status","components"],"title":"ValueChainProduct"},"ValueChainResponse":{"properties":{"company":{"$ref":"#/components/schemas/ValueChainCompany"},"products":{"items":{"$ref":"#/components/schemas/ValueChainProduct"},"type":"array","title":"Products"},"suppliers":{"items":{"$ref":"#/components/schemas/ValueChainSupplier"},"type":"array","title":"Suppliers"},"customers":{"items":{"$ref":"#/components/schemas/ValueChainCustomer"},"type":"array","title":"Customers"},"sub_components":{"items":{"$ref":"#/components/schemas/ValueChainSubComponent"},"type":"array","title":"Sub Components"}},"type":"object","required":["company","products","suppliers","customers","sub_components"],"title":"ValueChainResponse"},"ValueChainSubComponent":{"properties":{"parent_component_id":{"type":"string","title":"Parent Component Id"},"component_id":{"type":"string","title":"Component Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"quantity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity"},"reliability_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reliability Level"}},"type":"object","required":["parent_component_id","component_id","name","role","quantity","reliability_level"],"title":"ValueChainSubComponent"},"ValueChainSupplier":{"properties":{"component_id":{"type":"string","title":"Component Id"},"company_id":{"type":"string","title":"Company Id"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"reliability_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reliability Level"},"reliability_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reliability Score"}},"type":"object","required":["component_id","company_id","company_name","country","role","reliability_level","reliability_score"],"title":"ValueChainSupplier"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}