Returns current portfolio holdings across all connected accounts. Use this when the user asks: 'what do I own', 'show my portfolio', 'current positions', 'what's my balance', 'show my holdings', 'how much BTC do I have', or wants any snapshot of crypto/stock/prediction-market positions. For Polymarket-specific questions (which markets, outcomes, resolution or redeemable status), prefer get_polymarket_positions. For a ranked split / biggest positions, prefer get_allocations. Each holding includes: symbol, asset class (crypto / stock / prediction / cash), quantity, current price, USD value, and connector-specific metadata (e.g. chain for EVM, market title for Polymarket, accountType for Bybit). Inputs (all optional): - account_id: scope to one account, e.g. 'metamask:0xabc123...' or 'bybit:UNIFIED'. Omit to query ALL configured accounts. - asset_class: scope to one of 'crypto' / 'stock' / 'prediction' / 'cash'. 'prediction' = Polymarket conditional tokens; 'cash' = stablecoins (USDC/USDT) + fiat. Omit for all classes. - currency: 'USD' | 'EUR' | 'GBP' | 'HUF'. Default 'USD'. When set to anything other than USD, value/currentPrice/avgCost are converted via live FX rates (free API + fallback). The conversion source and fetchedAt are surfaced in `meta.fx`. Underlying connector data is unchanged — this is a display-layer convenience for users thinking in EUR/HUF/GBP. Results are cached per-connector (crypto wallets 60s, exchanges 120s, Polymarket 30s). Use 'refresh_data' tool first if the user explicitly asks for fresh / latest data. Returns position data only. Not financial advice.
Invalidates the PORTFOLIO TRACKER cache (Bybit/Binance/MetaMask/Polymarket/Solana/Hyperliquid holdings + transactions) and forces a fresh fetch from upstream APIs on the next call. Use this when the user asks: 'refresh my portfolio', 'update my holdings', 'get the latest portfolio prices', 'fetch fresh portfolio data', 'check current crypto prices', 'my balances look stale', 'force an update', 'my data is outdated', or implies real-time freshness is required FOR THE TRACKER. Optionally scope to a single connector (bybit, binance, metamask, polymarket, solana, hyperliquid). Without a scope, invalidates everything tracker-related. DO NOT call this tool when the user means: refreshing a webpage, refreshing an OAuth token, refreshing browser cache, refreshing data from a non-tracker MCP server. It only invalidates the headless-tracker SQLite cache. After calling this, follow up with get_holdings or another data tool to actually fetch the fresh data — refresh_data only marks the cache as stale, it does not trigger fetches on its own.
Returns aggregate profit/loss across all configured accounts. Use this when the user asks: 'how am I doing', 'what's my P&L', 'am I up or down', 'show profit', 'show losses', or wants any portfolio performance summary. Returned fields per account and across the total: - currentValue (USD) — current portfolio value - costBasis (USD) — sum of avgCost * quantity (where the connector tracks it) - unrealizedPnl (USD) — currentValue - costBasis (for positions still held) - realizedPnl (USD) — already-closed P&L from connector metadata - notes — caveats per connector (e.g. MetaMask doesn't track cost basis) Inputs (optional): - account_id: scope to one account. - timeframe: '24h' | '7d' | '30d' | 'ytd' | 'all'. When set to anything other than 'all', the result includes a `windowDelta` block computed from CoinGecko historical prices. APPROXIMATION CAVEAT: it values your CURRENT basket at historical prices vs current prices — it does NOT account for trades within the window. Communicate this honestly to the user. Polymarket positions and tokens without a CoinGecko mapping are skipped (counted in `skippedSymbols`). CoinGecko free-tier historical is daily granularity, so '24h' = 'yesterday's close'. - include_history (boolean, default false): also pulls transactions and runs a cost-basis ledger over them, returning `realizedFromHistory` per account + total. Costs an extra round-trip per account but unlocks honest realized PnL on tokens born on-chain (LP rewards, swaps, native airdrops). Tokens that arrived via wallet transfer-in (no price) get `unknownSalesCount` not inflated knownRealized — explicit honesty about what cost basis we know. POLYMARKET-SPECIFIC: when include_history=true, the Polymarket account's realizedPnl is replaced by the cost-basis-from-/trades number. Default mode leaves Polymarket realizedPnl null because the connector's cashPnl mixes realized + unrealized — set include_history=true to get the real realized number. - method ('fifo' | 'average', default 'fifo'): cost basis method used when include_history=true. FIFO consumes oldest lot first per sell; Average Cost pools all priced acquisitions and sells out at the running average. If the user mentions 'average cost' / 'avg cost' / 'weighted', use 'average'. Both methods preserve the 'honest unknown' rule: any sell drawing from an unpriced deposit/transfer returns realizedPnl=null, NOT a fabricated number. Has NO effect when include_history=false. - currency ('USD' | 'EUR' | 'GBP' | 'HUF', default 'USD'): when set to anything other than USD, ALL numeric fields (currentValue, costBasis, realizedPnl, unrealizedPnl, windowDelta numbers, realizedFromHistory.knownRealized) are converted via live FX rates. The fx.source + fetchedAt are surfaced in `meta.fx`. Use this for currency-consistent rendering when the user asked their dashboard to be in HUF/EUR/GBP — otherwise per-tab currencies will mismatch. Returns position data only. Not financial advice.
Returns Polymarket prediction-market positions, grouped by event when possible. Use this when the user asks about their Polymarket bets specifically: 'show my Polymarket positions', 'how am I doing on Polymarket', 'what bets do I have', 'show my prediction market positions', 'election bets', 'sports bets', etc. For general portfolio queries that mention Polymarket alongside crypto/stocks, prefer get_holdings (with optional asset_class='prediction' filter). Each position includes: - market title (human-readable question, e.g. 'Will X win the 2024 election?') - outcome ('Yes' / 'No' / specific candidate name) - quantity (conditional tokens held, each worth 0-1 USDC) - currentPrice (0-1, market's current implied probability) - currentValue (USD), avgCost (USD per token), cashPnl (realized + unrealized) - redeemable (true if market resolved and you can claim payout) - mergeable (true if you can merge Yes+No tokens for guaranteed USDC) - endDate (when the market resolves) Inputs (optional): - account_id: scope to one Polymarket account (if you have multiple). - group_by_event: 'true' (default) groups Yes+No outcomes for the same market; 'false' returns one row per asset. - resolved_only: 'true' returns only redeemable positions (markets that have resolved). Default 'false' returns everything. Returns position data only. Not financial advice.
Returns transaction history (trades, deposits, withdrawals, fees, ERC-20 token transfers) across configured accounts. Use this when the user asks: 'what trades did I make', 'show my transactions', 'transaction history', 'recent buys', 'recent sells', 'show my deposits', 'when did I buy X', 'what did I do this week', etc. Each transaction includes: - type: trade / buy / sell / deposit / withdraw / fee / interest / reward / transfer / resolve - symbol, quantity, price (per-unit at time of transaction) - fee + feeCurrency - timestamp (ISO 8601) - metadata (connector-specific: chain, hash, market, etc.) Inputs (optional): - account_id: scope to one account. - since: shorthand ('24h', '7d', '30d', '90d') OR epoch ms (e.g. 1700000000000). Default: ~last 50 transactions per account regardless of date. Coverage caveats (V0): - Bybit: full transaction log - MetaMask: native chain transfers + ERC-20 token transfers (USDC, USDT, etc.) - Polymarket: BUY/SELL trades from the /trades endpoint (up to ~1000 most recent). Returns transaction data only. Not financial advice.
Returns portfolio allocation breakdown — current USD value grouped by a chosen dimension. Use this when the user asks: 'how is my portfolio split', 'allocation breakdown', 'what % is in crypto', 'chain breakdown', 'show my biggest position', 'concentration'. Groups available: - 'asset_class' (default): crypto / stock / prediction / cash (cash = stablecoins like USDC/USDT + fiat) - 'connector': bybit / metamask / polymarket - 'account': one row per configured account - 'chain': EVM chain (Ethereum / Polygon / etc.) — only meaningful for MetaMask holdings - 'symbol': BTC / ETH / individual market — best for top-N concentration analysis Each group row includes: label, currentValue (USD), percentOfTotal, holdingCount. Sorted descending by currentValue. Inputs: - by: which dimension to group by (see above). Default 'asset_class'. - top: limit to top N rows (e.g. top: 10 for biggest positions). Default no limit. Returns position data only. Not financial advice.
Lists configured PORTFOLIO TRACKER accounts (Bybit exchange / Binance exchange / MetaMask wallets / Polymarket / Solana wallets / Hyperliquid) without exposing credentials. Use when the user asks: 'what tracker accounts are configured', 'show my portfolio accounts', 'list my exchange connections', 'which crypto exchanges are linked', 'which wallets am I tracking', 'what addresses am I tracking'. Returns: id, connectorId (bybit | binance | metamask | polymarket | solana | hyperliquid), label, createdAt, and connector-specific public metadata (e.g. chainIds and addresses for MetaMask, accountType for Bybit, address for Solana/Hyperliquid, key fingerprint for Binance). Credentials are NEVER returned — they stay in the OS keychain. DO NOT call this tool when the user means: email accounts, social media accounts, GitHub accounts, cloud accounts, OS user accounts, or any 'accounts' from a different domain or MCP server. It's specifically the headless-tracker exchange/wallet connections.
Creates a new account by writing READ-ONLY credentials to the OS keychain. Use when the user asks: 'add a Bybit account', 'connect Binance', 'connect my MetaMask wallet', 'set up Polymarket', 'connect my Solana wallet', 'track my Hyperliquid', 'add my Hyperliquid wallet', 'add new exchange'. BEHAVIOR CONTRACT FOR YOU (the LLM): - After this tool succeeds, confirm ONLY the account label and account_id back to the user. - NEVER echo, log, paraphrase, or repeat the credential values (apiKey, apiSecret, etherscanApiKey) in your response. - If the user pastes credentials inline in chat, suggest they use the Settings UI (render_settings tool) form instead — the form keeps secrets out of the conversation transcript. Credentials are validated against the upstream API before they're persisted; if validation fails, nothing is written. Storage: OS keychain (macOS Keychain / Linux Secret Service / Windows Credential Vault) via @napi-rs/keyring. Same path as the CLI setup flow. All six connectors use READ-ONLY credentials by design (Bybit 'Read' only, Binance 'Enable Reading' only, Etherscan is a public-data rate-limit token, Polymarket proxy wallet is already public, Solana/Hyperliquid addresses are public on-chain identifiers — Hyperliquid needs no key or signature at all). Inputs (one of bybit / binance / metamask / polymarket / solana / hyperliquid required): - connector: 'bybit' | 'binance' | 'metamask' | 'polymarket' | 'solana' | 'hyperliquid' - bybit: { apiKey, apiSecret, accountType: 'UNIFIED'|'CONTRACT'|'SPOT'|'FUND' (primary, also the account ID), accountTypes?: array of additional types to fan out across (e.g. ['FUND'] alongside UNIFIED so funding-wallet balances are tracked too) } - binance: { apiKey, apiSecret, includeFutures (optional bool, default false), recvWindow (optional ms) } - metamask: { address, etherscanApiKey, chainIds (number[]), trackCommonTokens (bool), hasEtherscanPro (bool) } - polymarket: { proxyWallet (0x...), sizeThreshold (default 0.01) } - solana: { address (base58), rpcUrl (optional premium RPC), dustThresholdUsd (optional, default 0.5) } - hyperliquid: { address (0x... EVM address you trade from), dustThresholdUsd (optional, default 0.5). No API key — public address only. Tracks perp account equity + open positions + spot balances. }
Adds an additional wallet address to an existing MetaMask or Solana account. Use when the user asks: 'add another wallet', 'track a second address', 'add MetaMask address', 'add Solana address'. The new address shares the parent account's settings (Etherscan key + chains for MetaMask; RPC URL for Solana). Wallet addresses are public on-chain identifiers — NO new secrets are stored. Just updates the keychain entry's `addresses[]` field. Inputs: - account_id: id of the existing account (e.g. 'metamask:0xabc...' or 'solana:Abc...') - address: EVM 0x-hex address (40 hex chars) for MetaMask accounts, or base58 (32-44 chars) for Solana accounts
Deletes an account from the AccountStore AND its credentials from the OS keychain. ONE-WAY operation. The Settings UI requires explicit user confirmation before calling this. Use when the user asks: 'remove the Bybit account', 'disconnect Polymarket', 'forget that wallet'. Inputs: - account_id: id of the account to remove (e.g. 'bybit:UNIFIED', 'metamask:0xabc...'). Returns: ok, removedAccountId; or error if the account was not found.
Adds a project-specific ERC-20 token to a MetaMask account's tracked-tokens list. The bundled common tokens (USDC, USDT, WETH, WBTC, LINK, DAI) are tracked by default; this is for additional tokens like project / governance tokens. Use when the user asks: 'track ARB token', 'add UNI to my wallet', 'monitor a custom ERC-20'. Token data is PUBLIC on-chain (contract + symbol + decimals) — NO secrets, NO keychain involved. Inputs: - account_id: target MetaMask account (e.g. 'metamask:0xabc...') - chain_id: numeric (1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, 42161=Arbitrum, 10=Optimism) - contract: 0x-prefixed contract address (40 hex) - symbol: 1-20 chars - decimals: 0-36 integer
Removes a custom ERC-20 token from a MetaMask account's tracked-tokens list. Public on-chain data, no keychain involvement. Use when the user asks: 'stop tracking ARB', 'remove that token from MetaMask', 'untrack a project token'. Inputs: - account_id: target MetaMask account (e.g. 'metamask:0xabc...') - chain_id: numeric (1=Ethereum, 137=Polygon, 56=BSC, 8453=Base, 42161=Arbitrum, 10=Optimism) - contract: 0x-prefixed contract address (40 hex) Returns ok or a not_found error if the token wasn't tracked under that account+chain.
+3 more tools listed on main page