SAAHAM Bot
SAAHAM Bot is a fast quote bot for Yahoo Finance ticker symbols, currency pairs, and supported market shortcuts.
It is separate from the finance watchlist bot: SAAHAM does ad hoc quote lookups, while finance does saved-watchlist analysis.
What it does
- Returns the latest quote for one stock, ETF, index, or currency pair
- Accepts
/qcommand lookups in private chats and groups - Accepts plain-text ticker lookups in private chats and groups
- Supports batch lookups through
/qfor up to5symbols - Normalizes ticker input and deduplicates repeated symbols in batch requests after canonical symbol resolution
- Expands supported shortcuts such as
STI -> ^STI,JKSE -> ^JKSE,IHSG -> ^JKSE,VWRA -> VWRA.L,CSPX -> CSPX.L,BJBR -> BJBR.JK, andUSDSGD -> USDSGD=X - Uses a checked-in manual S&P 100 snapshot so symbols such as
AAPLkeep bare-symbol-first lookup
Commands
| Command | Description |
|---|---|
/start |
Show help |
/help |
Show help |
/q AAPL |
Get the latest quote for one symbol |
/q STI |
Resolve a supported shortcut such as STI -> ^STI |
/q USDSGD |
Resolve a currency pair shortcut such as USDSGD -> USDSGD=X |
/q AAPL MSFT NVDA |
Get quotes for multiple symbols in one request |
Chat behavior
- Private chats accept
/qand plain-text ticker inputs such asAAPL,STI,CSPX, orUSDSGD - Group chats accept
/qand a single plain-text ticker input - Plain-text mixed prose is ignored
$AAPLis rejected; use ticker inputs without the$prefix- Wrapper punctuation such as
(AAPL)is stripped before lookup - Explicit aliases such as
IHSG -> ^JKSErun before generic suffixless lookup rules - Inputs that already contain
^,., or=skip shortcut expansion - Six-letter currency pair shortcuts such as
USDSGDtryUSDSGD=Xbefore other shortcut candidates - S&P 100 snapshot members such as
AAPLtry the bare symbol first, then^SYMBOL, then.L, then.JK - Other suffixless inputs use shortcut-first lookup order:
^SYMBOL, then.L, then.JK, then bareSYMBOL
Supported instruments
SAAHAM Bot currently supports provider-classified:
EQUITYETFINDEXCURRENCY
If the symbol is valid but outside that scope, the bot replies that the instrument is unsupported.
Failure handling
Single-symbol lookups use three user-facing outcomes:
- invalid symbol
- unsupported instrument
- provider failure
Batch lookups return per-symbol results, so one failure does not block the rest of the request.
Runtime notes
- SAAHAM runs inside the shared Gobot process
- It uses long polling through
telebot.v3 - It is stateless: there is no watchlist, settings store, or lookup history
- Quote replies show the canonical symbol, instrument name, current price, currency, and daily change
- The S&P 100 snapshot is a manual checked-in file; runtime does not fetch constituents live
Setup
Environment Variables
| Name | Desc |
|---|---|
SAAHAM_BOT |
Telegram bot API token |