{"openapi":"3.1.0","info":{"title":"Twelve Data (BYOK) API","version":"0.1.0","description":"Twelve Data (BYOK) lets an AI assistant read your own Twelve Data data through the Twelve Data API with a key you supply (API key). Read-only: 10 tools (get_time_series, get_quote, get_price, get_end_of_day_price, search_symbols, list_forex_pairs, list_stocks, list_exchanges, get_market_state, get_earliest_timestamp). The BYOK key travels with each request, is used for that one call only and is...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-twelvedata.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-twelvedata/docs"},"termsOfService":"https://connectorbay.com/byok-twelvedata/terms"},"servers":[{"url":"https://byok-twelvedata.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-twelvedata/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/get_time_series":{"post":{"operationId":"get_time_series","summary":"Get historical price bars (open, high, low, close, volume) for a stock, ETF, forex pair or crypto pair at a chosen inter","description":"Get historical price bars (open, high, low, close, volume) for a stock, ETF, forex pair or crypto pair at a chosen interval. Returns at most 200 bars here; use start_date and end_date to page through longer spans. Use for \"Show Apple's daily closing prices for the last 30 days\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Instrument ticker, for example 'AAPL', 'MSFT', 'BTC/USD' or 'EUR/USD'. An ISIN also works for some instruments.","maxLength":60,"title":"Symbol","type":"string"},"interval":{"description":"Bar size: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 8h, 1day, 1week or 1month.","enum":["1min","5min","15min","30min","45min","1h","2h","4h","8h","1day","1week","1month"],"title":"Interval","type":"string"},"outputsize":{"anyOf":[{"maximum":5000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Number of bars to return, 1 to 5000 (provider default 30 when no dates are given; this connector shows at most 200).","title":"Outputsize"},"order":{"anyOf":[{"enum":["asc","desc"],"type":"string"},{"type":"null"}],"default":null,"description":"Order of bars by time: asc or desc (provider default desc).","title":"Order"},"start_date":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"First date or datetime to include, YYYY-MM-DD or YYYY-MM-DD hh:mm:ss.","title":"Start Date"},"end_date":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Last date or datetime to include, YYYY-MM-DD or YYYY-MM-DD hh:mm:ss.","title":"End Date"},"adjust":{"anyOf":[{"enum":["all","splits","dividends","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Price adjustment: all, splits, dividends or none (provider default splits).","title":"Adjust"},"prepost":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include pre-market and post-market bars for intraday intervals.","title":"Prepost"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Time zone name for the returned datetimes, for example 'UTC'.","title":"Timezone"},"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to disambiguate a ticker listed on several, for example 'NASDAQ'.","title":"Exchange"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or ISO code to disambiguate a ticker, for example 'United States'.","title":"Country"}},"required":["symbol","interval"],"title":"get_time_seriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_quote":{"post":{"operationId":"get_quote","summary":"Get the latest quote for an instrument: last price, day range, volume, previous close, change and 52-week low and high. ","description":"Get the latest quote for an instrument: last price, day range, volume, previous close, change and 52-week low and high. Use for \"What is Tesla's latest quote and 52-week range\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Instrument ticker, for example 'AAPL', 'MSFT', 'BTC/USD' or 'EUR/USD'. An ISIN also works for some instruments.","maxLength":60,"title":"Symbol","type":"string"},"interval":{"anyOf":[{"enum":["1min","5min","15min","30min","45min","1h","2h","4h","8h","1day","1week","1month"],"type":"string"},{"type":"null"}],"default":null,"description":"Bar size the quote is based on (provider default 1day).","title":"Interval"},"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to disambiguate a ticker listed on several, for example 'NASDAQ'.","title":"Exchange"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or ISO code to disambiguate a ticker, for example 'United States'.","title":"Country"},"prepost":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True to include pre-market and post-market data.","title":"Prepost"}},"required":["symbol"],"title":"get_quoteArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_price":{"post":{"operationId":"get_price","summary":"Get only the latest price of an instrument as a number string. Use for \"What is the current price of Bitcoin in US dolla","description":"Get only the latest price of an instrument as a number string. Use for \"What is the current price of Bitcoin in US dollars\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Instrument ticker, for example 'AAPL', 'MSFT', 'BTC/USD' or 'EUR/USD'. An ISIN also works for some instruments.","maxLength":60,"title":"Symbol","type":"string"},"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to disambiguate a ticker listed on several, for example 'NASDAQ'.","title":"Exchange"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or ISO code to disambiguate a ticker, for example 'United States'.","title":"Country"},"dp":{"anyOf":[{"maximum":11,"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Decimal places in the price, 0 to 11 (provider default 5).","title":"Dp"}},"required":["symbol"],"title":"get_priceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_end_of_day_price":{"post":{"operationId":"get_end_of_day_price","summary":"Get the closing price of an instrument for the latest trading day or for a given date. Use for \"What was Microsoft's clo","description":"Get the closing price of an instrument for the latest trading day or for a given date. Use for \"What was Microsoft's closing price on 2026-03-02\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Instrument ticker, for example 'AAPL', 'MSFT', 'BTC/USD' or 'EUR/USD'. An ISIN also works for some instruments.","maxLength":60,"title":"Symbol","type":"string"},"date":{"anyOf":[{"maxLength":12,"type":"string"},{"type":"null"}],"default":null,"description":"Day to look up, YYYY-MM-DD. Omit for the latest close.","title":"Date"},"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to disambiguate a ticker listed on several, for example 'NASDAQ'.","title":"Exchange"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or ISO code to disambiguate a ticker, for example 'United States'.","title":"Country"}},"required":["symbol"],"title":"get_end_of_day_priceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/search_symbols":{"post":{"operationId":"search_symbols","summary":"Search instruments by ticker or name fragment and return matching symbols with exchange, country, currency and instrumen","description":"Search instruments by ticker or name fragment and return matching symbols with exchange, country, currency and instrument type. Use for \"Find the ticker symbol for Nvidia\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Ticker, name fragment or ISIN to search for, for example 'nvidia' or 'AAPL'.","maxLength":100,"title":"Symbol","type":"string"},"outputsize":{"anyOf":[{"maximum":120,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"How many matches to return, 1 to 120 (provider default 30).","title":"Outputsize"}},"required":["symbol"],"title":"search_symbolsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_forex_pairs":{"post":{"operationId":"list_forex_pairs","summary":"List forex pairs the provider supports, with the pair group (Major, Minor, Exotic), base and quote currency. Filter to k","description":"List forex pairs the provider supports, with the pair group (Major, Minor, Exotic), base and quote currency. Filter to keep the list short. Use for \"Which EUR forex pairs are supported\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Pair to look up, for example 'EUR/USD'.","title":"Symbol"},"currency_base":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Base currency code to filter by, for example 'EUR'.","title":"Currency Base"},"currency_quote":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Quote currency code to filter by, for example 'USD'.","title":"Currency Quote"}},"title":"list_forex_pairsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_stocks":{"post":{"operationId":"list_stocks","summary":"List stock symbols the provider covers, with name, exchange, country, currency and type. Filter by symbol, exchange or c","description":"List stock symbols the provider covers, with name, exchange, country, currency and type. Filter by symbol, exchange or country; the full list is very large. Use for \"Which stocks does Twelve Data list on the NASDAQ exchange\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"anyOf":[{"maxLength":30,"type":"string"},{"type":"null"}],"default":null,"description":"Ticker to look up, for example 'AAPL'.","title":"Symbol"},"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name, for example 'NASDAQ'.","title":"Exchange"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or code, for example 'United States'.","title":"Country"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Page number, starting at 1.","title":"Page"}},"title":"list_stocksArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_exchanges":{"post":{"operationId":"list_exchanges","summary":"List stock exchanges the provider covers with code, country and time zone. Filter by name, code or country. Use for \"Whi","description":"List stock exchanges the provider covers with code, country and time zone. Filter by name, code or country. Use for \"Which exchanges does Twelve Data cover in Japan\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"exchange_name":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to filter by, for example 'NASDAQ'.","title":"Exchange Name"},"code":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange market identifier code (MIC) to filter by, for example 'XNAS'.","title":"Code"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or code to filter by.","title":"Country"}},"title":"list_exchangesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_market_state":{"post":{"operationId":"get_market_state","summary":"Show whether stock exchanges are open now, with time to the next open or close. Filter by exchange name, code or country","description":"Show whether stock exchanges are open now, with time to the next open or close. Filter by exchange name, code or country. Use for \"Is the New York Stock Exchange open right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to filter by, for example 'NYSE'.","title":"Exchange"},"code":{"anyOf":[{"maxLength":20,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange market identifier code to filter by, for example 'XNYS'.","title":"Code"},"country":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Country name or code to filter by.","title":"Country"}},"title":"get_market_stateArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_earliest_timestamp":{"post":{"operationId":"get_earliest_timestamp","summary":"Get the first date for which price history exists for an instrument at a given interval. Use for \"How far back does dail","description":"Get the first date for which price history exists for an instrument at a given interval. Use for \"How far back does daily price history go for Apple\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"symbol":{"description":"Instrument ticker, for example 'AAPL', 'MSFT', 'BTC/USD' or 'EUR/USD'. An ISIN also works for some instruments.","maxLength":60,"title":"Symbol","type":"string"},"interval":{"description":"Bar size: 1min, 5min, 15min, 30min, 45min, 1h, 2h, 4h, 8h, 1day, 1week or 1month.","enum":["1min","5min","15min","30min","45min","1h","2h","4h","8h","1day","1week","1month"],"title":"Interval","type":"string"},"exchange":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Exchange name to disambiguate a ticker listed on several, for example 'NASDAQ'.","title":"Exchange"}},"required":["symbol","interval"],"title":"get_earliest_timestampArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}