MCPcopy Create free account

hub / github.com/HKUDS/Vibe-Trading / functions

Functions8,953 in github.com/HKUDS/Vibe-Trading

↓ 7 callersFunction_close
Close an OpenD context, swallowing teardown errors.
agent/src/trading/connectors/futu/sdk.py:743
↓ 7 callersMethod_convert_chunk_to_generation_chunk
( # type: ignore[override] self, chunk: dict, default_chunk_class: type,
agent/src/providers/llm.py:235
↓ 7 callersMethod_dispatch
(self, argv: list[str])
agent/tests/test_cli_live.py:95
↓ 7 callersFunction_err
(msg: str)
agent/src/tools/doc_reader_tool.py:52
↓ 7 callersFunction_estimate_tokens
Return token usage for a single LLM call, real if available. Prefers the provider-reported counts attached to the response by :func:`ChatLLM.
agent/src/swarm/worker.py:130
↓ 7 callersFunction_exchange
Build a ccxt ``binance`` client bound to the configured environment.
agent/src/trading/connectors/binance/sdk.py:619
↓ 7 callersFunction_existing_uploads
(uploads_dir: Path)
agent/tests/test_upload_api.py:27
↓ 7 callersFunction_extract_data
Return the ``data`` list from an OKX response, or ``[]`` defensively. python-okx returns a dict shaped ``{"code": "0", "data": [...]}`` on succes
agent/src/trading/connectors/okx/sdk.py:657
↓ 7 callersFunction_fact_row
( end: str, filed: str, value: float, *, form: str = "10-Q", start: str | None = None,
agent/tests/test_fundamentals_pit.py:37
↓ 7 callersFunction_facts
(concept_rows: dict[str, list[dict[str, object]]])
agent/tests/test_fundamentals_pit.py:26
↓ 7 callersFunction_first
(obj: Any, names: tuple[str, ...], default: Any = None)
agent/src/trading/connectors/longbridge/sdk.py:633
↓ 7 callersFunction_float_or_none
Convert a Longbridge SDK numeric value (Decimal/int) to float for JSON serialization.
agent/src/trading/connectors/longbridge/sdk.py:641
↓ 7 callersFunction_get
Perform a read-only GET request against the Trading 212 REST API.
agent/src/trading/connectors/trading212/sdk.py:393
↓ 7 callersMethod_get_conn
Get or create the SQLite connection (WAL mode).
agent/src/session/search.py:77
↓ 7 callersFunction_host
Return the ``api_server`` module for late-access attribute reads. Tests monkeypatch ``ENV_PATH``, ``ENV_EXAMPLE_PATH``, ``_baostock_supported``
agent/src/api/settings_routes.py:131
↓ 7 callersFunction_install_schema_stub
(monkeypatch: pytest.MonkeyPatch)
agent/tests/test_fundamentals_pit.py:12
↓ 7 callersMethod_instance
(self, model: str = "kimi-k2-thinking")
agent/tests/test_kimi_reasoning_content.py:314
↓ 7 callersFunction_is_tool_success
Return True if the tool result does not look like an error response.
agent/src/agent/loop.py:478
↓ 7 callersFunction_job
(jid: str = "j1", next_run_at: int = 1000, schedule: str = "interval:60000")
agent/tests/test_runtime_jobstore.py:35
↓ 7 callersFunction_load
()
agent/src/channels/pairing/store.py:43
↓ 7 callersMethod_make_loader
(self)
agent/tests/test_tushare_loader.py:141
↓ 7 callersMethod_make_loader
(self)
agent/tests/test_tushare_loader.py:220
↓ 7 callersFunction_make_mandate
Build a minimal valid mandate with a caller-chosen ``expires_at``.
agent/tests/test_runtime_runner.py:57
↓ 7 callersFunction_normalize_frame
Normalise a Futu kline DataFrame to the standard OHLCV schema. Args: df: Raw DataFrame returned by ``request_history_kline()``. Retu
agent/backtest/loaders/futu.py:60
↓ 7 callersFunction_normalize_jid
(raw: Any)
agent/src/channels/whatsapp.py:139
↓ 7 callersFunction_obj_get
(obj: Any, name: str, default: Any = None)
agent/src/trading/connectors/alpaca/sdk.py:578
↓ 7 callersFunction_panel
(n_rows: int = 60, n_cols: int = 8, seed: int = 0)
agent/tests/factors/test_bench_strict.py:36
↓ 7 callersFunction_parse_historical
Convert an FMP historical-price body into an ascending OHLCV frame. Args: payload: Decoded JSON body from the historical-price endpoint.
agent/backtest/loaders/fmp_loader.py:182
↓ 7 callersFunction_patch_sec
( monkeypatch: pytest.MonkeyPatch, facts_by_symbol: dict[str, dict[str, object]], )
agent/tests/test_fundamentals_pit.py:52
↓ 7 callersFunction_price_frame
Build a tz-naive trade_date-indexed OHLCV frame like a loader returns.
agent/tests/test_shadow_account.py:634
↓ 7 callersFunction_records
Normalize a Futu data payload to a list of row dicts. Handles a pandas DataFrame (via ``to_dict('records')``), an existing list of dicts, a s
agent/src/trading/connectors/futu/sdk.py:784
↓ 7 callersFunction_resolve_console
Return the shared CLI console.
agent/cli/commands/goal.py:21
↓ 7 callersFunction_row
(date_str: str, open_, high, low, close, volume)
agent/tests/test_yahoo_loader.py:38
↓ 7 callersMethod_rule_for
Get the sub-engine that provides rules for this symbol.
agent/backtest/engines/composite.py:90
↓ 7 callersMethod_safe_price
Get close price with fallback.
agent/backtest/engines/base.py:796
↓ 7 callersFunction_scripted
Return a fn() that walks through scripted outcomes (return value or raise).
agent/tests/test_loader_retry_helpers.py:58
↓ 7 callersFunction_seed_state
Write a durable last-known runtime_state.json for ``broker`` directly.
agent/tests/test_runtime_reconcile.py:51
↓ 7 callersFunction_set_emitter
Install the active progress emitter for the current thread. Args: emit: Callable that consumes a ``ProgressEvent``. Pass ``None`` to clea
agent/src/agent/progress.py:71
↓ 7 callersFunctionanalyze_trade_journal
Parse a trade journal and return a JSON analysis. Args: file_path: Path to CSV/Excel file. analysis_type: "full" | "profile" | "b
agent/src/tools/trade_journal_tool.py:393
↓ 7 callersFunctionbuild_worker_prompt
Build the worker's system prompt with role, upstream context, and skills. Args: agent_spec: The agent's role specification. upstr
agent/src/swarm/worker.py:182
↓ 7 callersMethodcall_tool
Call a remote MCP tool.
agent/src/tools/mcp.py:75
↓ 7 callersMethodconnect
()
agent/src/channels/mochat.py:416
↓ 7 callersMethodconnect
(self, host, port, *, clientId, timeout, readonly=True, account="")
agent/tests/test_ibkr_local.py:41
↓ 7 callersMethoddisconnect
()
frontend/src/tests/setup.ts:13
↓ 7 callersFunctionfind_exact
Resolve an exact command name or alias. Returns ``None`` if no match — callers handle the "unknown command" response themselves so error UX s
agent/cli/commands/slash_router.py:145
↓ 7 callersMethodfrom_dict
Deserialize a session from a dictionary. Args: data: Dictionary produced from parsed JSON. Returns: A Sessio
agent/src/session/models.py:68
↓ 7 callersMethodgenerate
(self, data_map)
agent/tests/test_run_card.py:283
↓ 7 callersMethodget_content
Return the full documentation for a skill (used by the load_skill tool). Falls back to disk lookup for user skills created mid-session.
agent/src/agent/skills.py:159
↓ 7 callersFunctionget_default_registry
Return a process-wide cached ``Registry`` for the bundled zoo. Thread-safe. First call builds and caches; subsequent calls return the same in
agent/src/factors/registry.py:435
↓ 7 callersMethodget_session
Read a session. Args: session_id: Session ID. Returns: The Session instance, or None when it does not exist.
agent/src/session/store.py:79
↓ 7 callersMethodis_run_stale
Read-only check: is this ``running`` run silent past its threshold? Used by both the read paths (return ``is_stale`` to callers without
agent/src/swarm/store.py:343
↓ 7 callersMethodlist_jobs
Return jobs, optionally filtered by status. Args: status: When provided, include only jobs whose status matches this
agent/src/scheduled_research/store.py:165
↓ 7 callersFunctionlive_root
Return the root directory for all live-channel state. Returns: ``<runtime_root>/live``. The directory is NOT created here; callers
agent/src/live/paths.py:23
↓ 7 callersFunctionload_config
Load local IBKR settings from ``~/.vibe-trading/ibkr-local.json``.
agent/src/trading/connectors/ibkr/local.py:124
↓ 7 callersFunctionload_config
Load Tiger settings from ``~/.vibe-trading/tiger.json``.
agent/src/trading/connectors/tiger/sdk.py:154
↓ 7 callersFunctionload_config
Load Longbridge settings from ``~/.vibe-trading/longbridge.json``.
agent/src/trading/connectors/longbridge/sdk.py:155
↓ 7 callersFunctionload_swarm_agent_config
Load the swarm-side AgentConfig using the M3 boot resolution order. This is the helper boot wiring (``mcp_server.py``, ``api_server.py``, CLI
agent/src/config/loader.py:204
↓ 7 callersFunctionmarket_is_open_at
Pure core: is ``market`` open at the instant ``now_ms``. Deterministic — reads no clock. 24/7 markets (``always_open``) are always open. Sess
agent/src/live/runtime/triggers.py:227
↓ 7 callersFunctionmatch_commands
Return commands that fuzzy-match ``input_text``. Only matches when the trimmed input starts with ``/``. The leading slash and any trailing ar
agent/cli/commands/slash_router.py:111
↓ 7 callersFunctionmonte_carlo_test
Shuffle trade PnL order to test path significance. Null hypothesis: the observed Sharpe / max-drawdown is no better than a random ordering of
agent/backtest/validation.py:28
↓ 7 callersFunctionnormalize_qveris_mode
Normalize user-facing QVeris mode names.
agent/src/tools/qveris_tool.py:127
↓ 7 callersFunctionrender_signal_engine
Render the SignalEngine Python source for a profile. Args: profile: ShadowProfile carrying the rules to replay. Returns: Pyt
agent/src/shadow_account/codegen.py:97
↓ 7 callersFunctionrender_verdict
Render a PASS/FAIL verdict from per-point verification results. Each result with a ``fetched_value`` is judged against the reported value at
agent/src/tools/report_audit_tool.py:226
↓ 7 callersMethodstream_chat
(self, messages, tools=None, on_text_chunk=None, timeout=None)
agent/tests/test_swarm_m4_e2e.py:137
↓ 7 callersFunctionthrottled_get
GET ``url`` after waiting out the per-host minimum interval. Args: url: Fully-qualified request URL. host_key: Throttle/session b
agent/backtest/loaders/_http.py:120
↓ 7 callersFunctionuseDarkMode
()
frontend/src/hooks/useDarkMode.ts:3
↓ 7 callersFunctionwalk_forward_analysis
Split backtest into sequential windows, check consistency. Each window is evaluated independently (returns normalised to window start). Args
agent/backtest/validation.py:156
↓ 6 callersMethod_api_post
( self, endpoint: str, body: dict | None = None, *, auth: bool = True,
agent/src/channels/weixin.py:307
↓ 6 callersFunction_as_iter
(value: Any)
agent/src/trading/connectors/longbridge/sdk.py:617
↓ 6 callersFunction_assert_all_counts
(pattern: str, expected: int)
agent/tests/test_distribution_skill_manifest.py:39
↓ 6 callersFunction_attach_tool_call_thought_signatures
Attach Gemini thought signatures to assistant replay tool calls. The replay message is later converted back into LangChain messages from a pl
agent/src/agent/loop.py:338
↓ 6 callersMethod_audit
Write one live-action audit record for a tick outcome. Audit failures are swallowed (logged) so a ledger problem can never make a *bl
agent/src/live/runtime/runner.py:638
↓ 6 callersFunction_bars_to_frame
Reshape Sina ``{d,o,h,l,c,v}`` bars into the standard OHLCV frame. Args: bars: List of per-day dicts with ``d/o/h/l/c/v`` keys. s
agent/backtest/loaders/sina_loader.py:75
↓ 6 callersFunction_capability
( tool_id: str = "tool_good", *, success_rate: float = 0.99, expected_cost: str = "1.0 credits
agent/tests/test_qveris_loader.py:92
↓ 6 callersFunction_client
(fake_llm: _FakeStreamingLLM)
agent/tests/test_chat_llm_streaming.py:59
↓ 6 callersFunction_collapse_ws
(value: Any)
agent/cli/ui/rail.py:57
↓ 6 callersFunction_context_collapse
Layer 2: fold long text blocks in older messages without LLM call. Preserves head + tail of large text, collapses the middle. Zero API cost —
agent/src/agent/loop.py:258
↓ 6 callersFunction_dedupe_finish_reason
Relays (OpenRouter) emit finish_reason per chunk; AIMessageChunk.__add__ concatenates into 'stopstop', 'tool_callstool_calls', etc. Return the
agent/src/providers/chat.py:19
↓ 6 callersMethod_delta_chunk
(self, delta: dict, model: str = "kimi-k2-thinking")
agent/tests/test_kimi_reasoning_content.py:320
↓ 6 callersMethod_ensure_fallback_workers
(self)
agent/src/channels/mochat.py:615
↓ 6 callersFunction_envelope
Build the standard JSON response.
agent/src/tools/doc_reader_tool.py:63
↓ 6 callersFunction_err
(msg: str)
agent/src/factors/cli_handlers.py:86
↓ 6 callersFunction_exact
Convert any numeric to an exact Decimal, avoiding float binary traps.
agent/src/tools/financial_rigor_tool.py:63
↓ 6 callersFunction_extract_product
Extract product code from futures symbol. Examples: 'IF2406.CFFEX' -> 'IF' 'rb2410.SHFE' -> 'rb' 'au2412' -> 'au'
agent/backtest/engines/china_futures.py:111
↓ 6 callersMethod_fetch_candles
Paginated candle download. Args: inst_id: OKX instrument id. start_ts: Start time (ms). end_ts: End time
agent/backtest/loaders/okx.py:111
↓ 6 callersFunction_fix_tool_pairs
Repair orphaned tool_call / tool_result pairs after compression. Two fixes: 1. Remove tool results whose matching tool_call was compressed
agent/src/agent/loop.py:281
↓ 6 callersFunction_get_goal_store
Return the shared finance goal store.
agent/src/api/sessions_routes.py:172
↓ 6 callersFunction_get_swarm_runtime
Lazy-init SwarmRuntime singleton.
agent/src/api/swarm_routes.py:22
↓ 6 callersMethod_growing_equity
Equity that grows linearly from 1M to 1.2M (20% return).
agent/tests/test_metrics.py:211
↓ 6 callersFunction_ibkr_config
Build an IBKR local config from a trading profile and call overrides.
agent/src/trading/service.py:422
↓ 6 callersFunction_is_forex
Detect forex pairs by matching against AKShare's symbol_market_map. Issue #54 — forex symbols (EURUSD, GBPUSD, etc.) have no exchange suffix
agent/backtest/loaders/akshare_loader.py:46
↓ 6 callersFunction_live_profile_connector
Resolve a profile to a live-capable connector key.
agent/cli/_legacy.py:4166
↓ 6 callersFunction_maintenance_rate
Look up tiered maintenance margin rate.
agent/backtest/engines/_market_hooks.py:143
↓ 6 callersFunction_make_agent_config
Build an AgentConfig from a server-name → config-dict map.
agent/tests/test_swarm_m2_registry_assembly.py:38
↓ 6 callersFunction_make_fake_wrappers
Build lightweight MCPRemoteTool stubs without a live adapter.
agent/tests/test_registry_mcp_integration.py:28
↓ 6 callersFunction_microcompact
Layer 1: silently prune old tool results, keeping the most recent N intact. Args: messages: Message list (mutated in place).
agent/src/agent/loop.py:243
↓ 6 callersFunction_norm_text
文本归一化:NFKC 折叠全角/半角 + 去除内部空白。 应用场景(CR P2):新浪页面会出现“5%以上股东”、“控股 股东”等变体, 原吝始“kw in text”会漏命中。归一化后“5%”→“5%”,中文间空格被吃掉。
agent/src/skills/ashare-pre-st-filter/scripts/fetch_sina_penalties.py:100
↓ 6 callersFunction_normalize_tool_run_dir
Normalize ``run_dir`` in tool args to an absolute path when possible. If the model supplies a relative ``run_dir`` (for example ``"."`` or ``
agent/src/agent/loop.py:489
↓ 6 callersFunction_obj_get
(obj: Any, name: str, default: Any = None)
agent/src/trading/connectors/binance/sdk.py:689
↓ 6 callersFunction_override
Return a monkeypatched module-level override if present.
agent/src/agent/loop.py:64
← previousnext →301–400 of 8,953, ranked by callers