Class FinanceTools

java.lang.Object
com.tnsai.tools.finance.FinanceTools

public class FinanceTools extends Object
Function-shape Borsa İstanbul (BIST) tools — read-only Turkish finance data via the public BigPara (Hürriyet) API. Replaces the legacy BorsaTool (single dispatched tool) — splits the most-useful subset (stock quote / index value / currency rate / market summary) into typed @Tool methods. Gold prices and the popular-stocks roster can be added piecewise as real consumers need them.
MethodEndpointIdempotent
bistQuote(java.lang.String)GET /hisse/detail/{symbol}true
bistIndex()GET /endeks/listtrue
bistFx()GET /doviz/headerlisttrue
invalid reference
#bistSummary
GET /endeks/listtrue

No API key required — BigPara's endpoints are public.

Since:
0.5.7 (Phase 2 batch 15b — built-in tool migration to function shape, see #188)
  • Constructor Details

    • FinanceTools

      public FinanceTools()
      Default constructor — uses the public BigPara API (no auth).
    • FinanceTools

      public FinanceTools(okhttp3.OkHttpClient http, com.fasterxml.jackson.databind.ObjectMapper mapper)
      Full constructor for tests / shared HTTP.
  • Method Details

    • bistQuote

      @Tool(name="bist_quote", description="Fetch a Borsa \u0130stanbul (BIST) stock quote by ticker ({symbol} \u2014 e.g. \"THYAO\", \"GARAN\", \"AKBNK\"). Returns the raw JSON from BigPara with last price, daily change, volume, and high/low. Symbols are case-normalised to upper-case.", keywords={"borsa","bist","hisse","stock","quote","turkish","istanbul"}, idempotent=true) public String bistQuote(@ToolParam(description="BIST ticker symbol (e.g. \"THYAO\")") String symbol) throws IOException
      Throws:
      IOException
    • bistIndex

      @Tool(name="bist_index", description="Fetch BIST index values (XU100, XU030, XBANK, XUSIN, \u2026) from the BigPara endpoint. Returns the raw JSON list \u2014 the LLM filters by index code as needed.", keywords={"borsa","bist","endeks","index","xu100","xu030"}, idempotent=true) public String bistIndex() throws IOException
      Throws:
      IOException
    • bistFx

      @Tool(name="bist_fx", description="Fetch Turkish currency rates (USD/TRY, EUR/TRY, GBP/TRY, etc.) from the BigPara doviz endpoint. Returns the raw JSON header list.", keywords={"borsa","bist","doviz","currency","fx","tl","try","usd","eur"}, idempotent=true) public String bistFx() throws IOException
      Throws:
      IOException
    • bistGold

      @Tool(name="bist_gold", description="Fetch Turkish gold prices (gram alt\u0131n, \u00e7eyrek, yar\u0131m, tam) from the BigPara alt\u0131n endpoint. Returns the raw JSON header list.", keywords={"borsa","altin","gold","gram","ceyrek","yarim","tam"}, idempotent=true) public String bistGold() throws IOException
      Throws:
      IOException