{"openapi":"3.0.0","info":{"version":"1.8.3","title":"Leeway API","description":"Market data API: 70+ exchanges, 100,000+ tickers, 15,000+ ETFs, 1,000+ forex pairs. Fundamentals (up to 20y), EOD prices (up to 35y), intraday, dividends, splits, and forecasts. Forex/crypto quotes are realtime; other instruments ~15min delayed. Auth via apitoken query param (see your account page). Docs: https://leeway.tech/data-api. Contact: kontakt@leeway.tech."},"servers":[{"url":"https://api.leeway.tech"}],"paths":{"/api/v1/public/general/isin/{isin}":{"get":{"description":"Resolve a company name or ISIN to its primary stock symbol and exchange. Use this first if you only have a name or ISIN.","parameters":[{"name":"isin","in":"path","required":true,"schema":{"type":"string"},"description":"ISIN (e.g. DE0007164600) or name/code substring (e.g. SAP)","example":"SAP"}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/general/mainstock/{isin}":{"get":{"description":"Find the primary listing for a given ISIN. Useful to avoid secondary or illiquid listings.","parameters":[{"name":"isin","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/general/symbols/{exchange}":{"get":{"description":"List all available stock symbols for a specific exchange (e.g., XETRA, NYSE).","parameters":[{"name":"exchange","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"query","description":"Common Stock | ETF | FUND","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"}}}},"/api/v1/public/general/exchanges":{"get":{"description":"List all supported stock exchanges and their codes.","parameters":[],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/general/screener":{"get":{"description":"Screen stocks by listing fields, Highlights, keyfigures (incl. aliases like pe/roe/market_cap), and/or market signals. Supports preset=quality with explicit thresholds; pagination up to limit 1000. See OpenAPI filters/signals/preset params for the full field catalog.","parameters":[{"name":"filters","in":"query","description":"JSON array of [field, op, value]. Listing fields: adjusted_close, avgvol_1d, avgvol_200d, code, dividend_yield, earnings_share, exchange, industry, market_capitalization, name, refund_1d_p, refund_5d_p, sector. Highlights: BookValue, DilutedEpsTTM, DividendShare, DividendYield, EBITDA, EPSEstimateCurrentQuarter, EPSEstimateCurrentYear, EPSEstimateNextQuarter, EPSEstimateNextYear, EarningsShare, GrossProfitTTM, MarketCapitalization, MarketCapitalizationMln, MostRecentQuarter, OperatingMarginTTM, PEGRatio, PERatio, ProfitMargin, QuarterlyEarningsGrowthYOY, QuarterlyRevenueGrowthYOY, ReturnOnAssetsTTM, ReturnOnEquityTTM, RevenuePerShareTTM, RevenueTTM, WallStreetTargetPrice. Keyfigures: EBITDA_margin, EBITDA_margin_rolling_quarters, EBIT_margin, EBIT_margin_rolling_quarters, EPSEstimateCurrentQuarter, EPSEstimateCurrentYear, EPSEstimateNextQuarter, EPSEstimateNextYear, ForwardPE, PEGRatio, PercentInsiders, PercentInstitutions, ShortPercentFloat, analyst_rating, analyst_upside, cashflow_growth, cashflow_growth_rolling_quarters, cashflow_margin, cashflow_margin_rolling_quarters, current_ratio, current_ratio_rolling_quarters, debt_to_equity, debt_to_equity_rolling_quarters, dynamic_debt, dynamic_debt_rolling_quarters, earnings_growth, earnings_growth_5y_cagr, earnings_growth_rolling_quarters, equity_ratio, equity_ratio_rolling_quarters, estimate_eps_growth_1y, estimate_eps_growth_2y, free_cashflow, free_cashflow_rolling_quarters, free_cashflow_yield, free_cashflow_yield_rolling_quarters, gross_margin, gross_margin_rolling_quarters, interest_coverage, interest_coverage_rolling_quarters, leverage, leverage_rolling_quarters, liquidity, liquidity_rolling_quarters, net_income_margin, net_income_margin_rolling_quarters, r_and_d_investment_sales, r_and_d_investment_sales_rolling_quarters, return_on_assets, return_on_assets_rolling_quarters, return_on_equity, return_on_equity_rolling_quarters, return_on_liabilities, return_on_liabilities_rolling_quarters, sales_growth, sales_growth_3y_cagr, sales_growth_5y_cagr, sales_growth_rolling_quarters, stock_buybacks, stock_buybacks_rolling_quarters, wallstreet_estimate_upside. Aliases: ebit_margin→EBIT_margin, market_cap→MarketCapitalization, operating_margin→OperatingMarginTTM, pe→PERatio, pe_ratio→PERatio, roa→ReturnOnAssetsTTM, roe→ReturnOnEquityTTM. String ops: =, match. Numeric ops: =, >, <, >=, <=.","example":"[[\"exchange\",\"=\",\"XETRA\"],[\"pe\",\"<\",15]]","schema":{"type":"string"}},{"name":"signals","in":"query","description":"Comma-separated market signals: 200d_new_hi (price at a new 200-day high); 200d_new_lo (price at a new 200-day low); 50d_new_hi (price at a new 50-day high); 50d_new_lo (price at a new 50-day low); bookvalue_neg (price below book value); bookvalue_pos (price above book value); wallstreet_hi (price above Wall Street target); wallstreet_lo (price below Wall Street target).","example":"200d_new_hi","schema":{"type":"string"}},{"name":"preset","in":"query","description":"Named filter preset. Currently: quality (ReturnOnEquityTTM>0.15, ReturnOnAssetsTTM>0.1, OperatingMarginTTM>0.15, debt_to_equity<0.5, current_ratio>1.5, interest_coverage>5, earnings_growth_5y_cagr>0.05, sales_growth_5y_cagr>0.05, free_cashflow>0, MarketCapitalization>10000000000, PERatio<30). Matching filter fields in filters override the preset thresholds. Max limit 1000.","example":"quality","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sort by a numeric field, ascending or descending (field.asc or field.desc).","example":"market_capitalization.desc","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of results to return. Default 50, min 1, max 1000.","example":50,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"Pagination offset. Default 0, max 999.","example":0,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid filters JSON or request"}}}},"/api/v1/public/general/tradingperiod/{symbolExchange}":{"get":{"description":"Get the first and last date the requested stock was tradable on the exchange. Returns two datestrings in an object.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found"}}}},"/api/v1/public/general/dailyrequestsleft":{"get":{"description":"Check how many API request units are remaining for the current day.","parameters":[],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}}}},"/api/v1/public/historicalquotes/benchmark":{"get":{"description":"Get absolute and relative performance vs. benchmark indices or ETFs.","parameters":[{"name":"symbol","in":"query","description":"Primary symbol in SYMBOL.EXCHANGE format","required":true,"example":"SAP.XETRA","schema":{"type":"string"}},{"name":"benchmark","in":"query","description":"Optional comma-separated benchmark symbols (SYMBOL.EXCHANGE). Each adds relative performance columns.","required":false,"example":"DAX.INDX,ACWI.US","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Missing or invalid symbol parameter"},"404":{"description":"No quotes found for symbol"},"500":{"description":"Internal Server Error"}}}},"/api/v1/public/historicalquotes/marketwide-lastday-quote/{exchange}":{"get":{"summary":"Last trading day quote for an entire exchange","description":"One OHLCV bar per listed instrument on an exchange for a trading day—useful for screening an entire market in one call across 70+ exchanges. Omit date for the latest session. Costs 1 request unit per call.","parameters":[{"name":"exchange","in":"path","required":true,"schema":{"type":"string"},"description":"Exchange code","example":"XETRA"},{"name":"date","in":"query","description":"Trading date (YYYY-MM-DD). Default: last trading day.","example":"2026-06-10","schema":{"type":"string"}},{"name":"symbols","in":"query","description":"Optional. Comma-separated symbols to limit results.","example":"SAP,RWE,ALV","schema":{"type":"string"}},{"name":"filter","in":"query","enum":["extended"],"description":"Extended fields (name, EMAs, avg volumes). Past 30 days only.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/api/v1/public/historicalquotes/{symbolExchange}":{"get":{"description":"Get historical end-of-day price data (OHLCV) for a symbol. Format: SYMBOL.EXCHANGE (e.g., SAP.XETRA).","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"filter","description":"Set this to e.g. close to get only ONE (e.g. close) for each day. Date is always returned. Keys are renamed to time,value","in":"query","schema":{"type":"string"}},{"name":"byname","in":"query","description":"Set this to true and pass a Companyname in symbolExchange.","schema":{"type":"string"}},{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"}}}},"/api/v1/public/historicalquotes/marketcap/{symbolExchange}":{"get":{"description":"Get historical market capitalization data for a company.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"byname","in":"query","description":"Set this to true and pass a Companyname in symbolExchange.","schema":{"type":"string"}},{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}},{"name":"valuation","description":"Optional. pe, pb, ps, pc, or liab for one ratio; all returns an object with all five keys. Omit for market-cap history.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK. With valuation=all, returns pe, pc, pb, ps, and liab—each key is an array of daily OHLC bars for that multiple. Example shows pe for SAP.XETRA; other keys share the same shape."},"400":{"description":"Bad Request"}}}},"/api/v1/public/historicalquotes/marketcap/aggregation/{type}":{"get":{"description":"Aggregated valuation multiples across sectors, countries and market cap.","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"},"description":"History of common multiples, options are pe, pb, ps, pc, liab for ratios   of price in regard to earnings, bookvalue, sales, cashflow and liabilities."},{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}},{"name":"country","description":"Limits aggregation to companies of that country or area (EU, NA, ASIA, OTHER)","in":"query","schema":{"type":"string"}},{"name":"sector","description":"Limits aggregation to companies of that sector or industry","in":"query","schema":{"type":"string"}},{"name":"minCap","description":"Limits aggregation to companies of marketcap between greater than minCap","in":"query","schema":{"type":"string"}},{"name":"maxCap","description":"Limits aggregation to companies of marketcap between smaller than maxCap","in":"query","schema":{"type":"string"}},{"name":"symbolExchange","in":"path","description":"Symbol and Exchange","required":true,"example":"SAP.XETRA","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"}}}},"/api/v1/public/fundamentals/{symbolExchange}":{"get":{"description":"Get comprehensive company fundamentals including balance sheet, income statement, and cash flow for up to 20 years.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"lang","description":"Language setting, default is english. Input 'german' for translated version.","in":"query","schema":{"type":"string"}},{"name":"fmt","description":"Output format, default is JSON. Options: XML","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"404":{"description":"Not Found"}}}},"/api/v1/public/fundamentals/keyfigures/{symbolExchange}":{"get":{"description":"Get calculated key figures (margins, growth, analyst metrics) as time series for a symbol.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and exchange","example":"SAP.XETRA"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid SYMBOL.EXCHANGE or calculation error"}}}},"/api/v1/public/fundamentals/forecast/{symbolExchange}":{"get":{"description":"Get fundamental forecasts and analyst estimates for a company.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}}}},"/api/v1/public/live/relative-move/{symbolExchange}":{"get":{"description":"Compare today's price change to the average daily range over the last year (unusual move detection).","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and exchange","example":"SAP.XETRA"}],"responses":{"200":{"description":"OK"},"400":{"description":"Invalid symbol format"},"429":{"description":"Too Many Requests"},"502":{"description":"Live or historical data unavailable"}}}},"/api/v1/public/live/{symbolExchange}":{"get":{"description":"Get the latest real-time or near-real-time price quote for a symbol.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"multi","in":"query","description":"Optional: Comma-separated list of additional SYMBOL.EXCHANGE tickers. Response is an array when provided.","required":false,"example":"SAP.XETRA,EURUSD.FOREX","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"429":{"description":"Too Many Requests"},"502":{"description":"Bad Gateway"}}}},"/api/v1/public/dividends/{symbolExchange}":{"get":{"description":"Get the most recent dividend information for a stock.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"from","description":"Format: YYYY-MM-DD. The start date.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date.","in":"query","schema":{"type":"string"}},{"name":"calculations","description":"Format: Boolean. If true, returns price at Ex-Div date as well as dividend payout ratio.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"},"429":{"description":"Too Many Requests"}}}},"/api/v1/public/dividends/history/{symbolExchange}":{"get":{"description":"Get the full historical dividend record for a stock.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"from","description":"Format: YYYY-MM-DD. The start date.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date.","in":"query","schema":{"type":"string"}},{"name":"calculations","description":"Format: Boolean. If true, returns price at Ex-Div date as well as dividend payout ratio.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}}}},"/api/v1/public/splits/{symbolExchange}":{"get":{"description":"Get historical stock split data.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"from","description":"Format: YYYY-MM-DD. The start date.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"429":{"description":"Too Many Requests"}}}},"/api/v1/public/intraday/{symbolExchange}":{"get":{"description":"Get intraday price data (1m, 5m, 1h intervals) for a symbol.","parameters":[{"name":"symbolExchange","in":"path","required":true,"schema":{"type":"string"},"description":"Symbol and Exchange","example":"SAP.XETRA"},{"name":"interval","in":"query","description":"'5m' for 5 minutes, '1h' for 1 hour, and '1m' for 1 minute intervals. 1 minute is only available for US exchanges NYSE and NASDAQ.","schema":{"type":"string"}},{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"429":{"description":"Too Many Requests"}}}},"/api/v1/public/events/ipos":{"get":{"description":"List upcoming or recent Initial Public Offerings (IPOs).","parameters":[{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}},{"name":"symbols","description":"List of tickers in format SYMBOL.EXCHANGE, comma-separated. Example: SAP.XETRA","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"401":{"description":"Unauthorized"}}}},"/api/v1/public/events/earnings":{"get":{"description":"Get the earnings calendar for upcoming corporate reports.","parameters":[{"name":"from","description":"Required. Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}},{"name":"symbols","description":"List of tickers in format SYMBOL.EXCHANGE, comma-separated. Example: SAP.XETRA","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/events/trends":{"get":{"description":"Get trending stocks and market sentiment signals.","parameters":[{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}},{"name":"symbols","description":"Required: List of tickers in format SYMBOL.EXCHANGE, comma-separated. Example: AAPL.US,SAP.XETRA,OR.PA","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/events/splits":{"get":{"description":"Split dates of securities at covered exchanges in the requested timeframe. Uses 2 API calls per request.","parameters":[{"name":"from","description":"Format: YYYY-MM-DD. The start date, if not provided, today will be used.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date, if not provided, today in 7 days will be used.","in":"query","schema":{"type":"string"}},{"name":"symbols","description":"List of tickers in format SYMBOL.EXCHANGE, comma-separated. Example: AAPL.US,SAP.XETRA,OR.PA","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/img/logos/{path}":{"get":{"description":"Logos for publicly traded companies. Paths can be found in the fundamentals JSON.","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PNG logo image"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/api/v1/public/img/logosbycodeexchange/{codeexchange}":{"get":{"description":"Logos for publicly traded companies. Paths can be found in the fundamentals JSON.","parameters":[{"name":"codeexchange","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PNG logo image"},"401":{"description":"Unauthorized"},"404":{"description":"Not Found"},"500":{"description":"Internal Server Error"}}}},"/api/v1/public/macro/indicators":{"get":{"description":"List available macroeconomic indicators (GDP, inflation, etc.).","parameters":[],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/macro/countries":{"get":{"description":"List supported countries for macroeconomic data.","parameters":[],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/macro/{country}":{"get":{"description":"Get macroeconomic data for a specific country.","parameters":[{"name":"country","in":"path","required":true,"schema":{"type":"string"},"description":"Select Country in Alpha-3 ISO format."},{"name":"indicator","in":"query","description":"Select desired indicator. Default: gdp_current_usd","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/bond/{isin}":{"get":{"description":"Get data for corporate or government bonds by ISIN.","parameters":[{"name":"isin","in":"path","required":true,"schema":{"type":"string"},"description":"Bond ISIN.","example":"XS0971721963"}],"responses":{"200":{"description":"OK"}}}},"/api/v1/public/news/":{"get":{"description":"Get the latest financial news and articles.","parameters":[{"name":"from","description":"Format: YYYY-MM-DD. The start date.","in":"query","schema":{"type":"string"}},{"name":"to","description":"YYYY-MM-DD. The end date.","in":"query","schema":{"type":"string"}},{"name":"s","description":"Format: Code.Exchange. The code for which the news are queried .","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad Request"}}}}},"components":{"securitySchemes":{"apiTokenAuth":{"type":"apiKey","in":"query","name":"apitoken"}}},"security":[{"apiTokenAuth":[]}]}