HKUDS/Vibe-Trading · error · TigerConfigError
Tiger account number is not configured
Error message
Tiger account number is not configured
What it means
_assert_profile is the fail-closed gate run before every Tiger operation; it first requires a non-empty account number. Because Tiger's API cannot meaningfully operate without an account, an empty/whitespace cfg.account raises TigerConfigError immediately rather than producing confusing downstream API errors.
Source
Thrown at agent/src/trading/connectors/tiger/sdk.py:595
def _trade_client(cfg: TigerConfig):
_require_tigeropen()
from tigeropen.trade.trade_client import TradeClient # type: ignore
return TradeClient(_client_config(cfg))
def _quote_client(cfg: TigerConfig):
_require_tigeropen()
from tigeropen.quote.quote_client import QuoteClient # type: ignore
return QuoteClient(_client_config(cfg))
def _assert_profile(cfg: TigerConfig) -> None:
"""Fail closed when the account does not match the declared environment."""
account = (cfg.account or "").strip()
if not account:
raise TigerConfigError("Tiger account number is not configured")
paper = is_paper_account(account)
if cfg.environment == "paper" and not paper:
raise TigerProfileMismatchError(
"Configured profile is paper, but the account number is not a 17-digit Tiger paper account. "
"Use a live profile only if you intend live-account access."
)
if cfg.environment == "live" and paper:
raise TigerProfileMismatchError(
"Configured profile is live, but the account number is a 17-digit Tiger paper account. "
"Select a paper profile for paper accounts."
)
def _missing_fields(cfg: TigerConfig) -> list[str]:
missing = []
if not cfg.tiger_id:
missing.append("tiger_id")
if not cfg.private_key_path:View on GitHub (pinned to 80ffdda44c)
Solutions
- Add the Tiger account number to the config mapping/file under the 'account' key
- Fetch the account number from the Tiger portal (or accounts endpoint) and re-run save_config
- If constructing programmatically, ensure TigerConfig(account='...') is set before calling connector functions
Example fix
// before
{"tiger_id": "123456", "private_key_path": "~/.tiger/pk.pem"}
// after
{"tiger_id": "123456", "private_key_path": "~/.tiger/pk.pem", "account": "20190129101234567"} Defensive patterns
Strategy: validation
Validate before calling
def tiger_account_configured(cfg) -> bool:
return bool((cfg.account or '').strip()) Type guard
def has_tiger_account(cfg: TigerConfig) -> bool:
return isinstance(cfg.account, str) and len(cfg.account.strip()) > 0 Try / catch
if not (cfg.account or '').strip():
raise SystemExit('Tiger account missing — set it in the connector config')
try:
get_quote(cfg, symbol)
except TigerConfigError as exc:
handle_config_error(exc) Prevention
- Require the account field in config templates/schemas
- Fail fast at startup by calling check_status(cfg) once
- Unit-test config construction with all required fields populated
When it happens
Trigger: Calling check_status, get_account_snapshot, get_positions, get_open_orders, get_quote, or get_historical_bars with a config where 'account' was never set — e.g. from_mapping on a JSON lacking the account key, or a default-constructed TigerConfig().
Common situations: Config JSON written with tiger_id and private_key_path but account omitted; test fixtures forgetting the account field; assuming the SDK discovers the default account automatically (it does not in this connector).
Related errors
- profile must be 'paper', 'live-readonly' or 'live'
- group_message_buffer_size must be > 0
- SWARM_WORKER_RETRY_MAX_DELAY_S must be greater than or equal
- Unsupported config file format: {suffix or '<none>'}
- HTTP MCP servers require an explicit type of 'sse' or 'strea
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/05ce8f1c2eef3332.
Report an issue: GitHub.