{"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":"Filter and find stocks based on fundamental criteria like ROE, margins, market cap, and industry. Returns a list of candidates.","parameters":[{"name":"filters","in":"query","description":"Valid JSON array of filter tuples with double-quoted strings: [[field, operation, value], ...]. String fields support = and match; numeric fields support =, >, <, >=, <=.","example":"[[\"exchange\",\"=\",\"XETRA\"]]","schema":{"type":"string"}},{"name":"signals","in":"query","description":"Comma-separated pre-calculated signals. Options: 50d_new_lo, 50d_new_hi, 200d_new_lo, 200d_new_hi, bookvalue_neg, bookvalue_pos, wallstreet_lo, wallstreet_hi.","example":"200d_new_hi,wallstreet_hi","schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sort by a numeric field, ascending or descending.","example":"market_capitalization.desc","schema":{"type":"string"}},{"name":"limit","in":"query","description":"Number of results to return. Default 50, min 1, max 100.","example":10,"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"}}}},"/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":[]}]}