GuideLast updated

Gemini CLI trading bot with OpenFinance

Short answer: Add OpenFinance's hosted MCP server to ~/.gemini/settings.json and Gemini CLI can quote and place trades in crypto perps, onchain stocks and forex, memecoins and Polymarket. Unlike Alpaca or Kraken setups, there's no local server to run and no exchange keys on your machine. Setup takes under 60 seconds.

MCP URL: https://api.openfinance.tech/agent/mcp · setup in under 60 seconds · no KYC on OpenFinance itself (a connected IBKR or Robinhood account uses your own verified broker account) · fund with a debit card · crypto perps, onchain stocks and forex, memecoins, Polymarket prediction markets, options in the OpenFinance app through your connected IBKR or Robinhood account · everything on Hyperliquid is tradable · API key available

settings.json

JSON
{
  "mcpServers": {
    "openfinance": {
      "httpUrl": "https://api.openfinance.tech/agent/mcp",
      "headers": { "x-api-key": "open_xxxxx" }
    }
  }
}

Keep it safe

Leave Gemini CLI's confirmation prompts on (don't run with --trust), use includeTools to limit tools, and start with small orders.

Compared with other Gemini CLI setups

SetupRuns whereMarkets
OpenFinanceHostedPerps, onchain stocks/FX, memecoins, Polymarket, options
Alpaca MCPLocalUS stocks, options, crypto
Kraken CLI MCPLocalKraken spot, futures, xStocks
Robinhood (SecProve guide)HostedRobinhood account

Example prompts

  • gemini -p "show my OpenFinance balance"
  • "Every hour, check ETH funding and alert me above 0.05%."
  • "Quote a $30 long on BTC perps at 3x, wait for my yes."

Frequently asked questions

Can Gemini CLI trade?

Yes, through an MCP server. Add OpenFinance's hosted MCP URL to settings.json and Gemini CLI can place trades you confirm.

Do I need to run a local server?

No. OpenFinance is hosted; you only add a URL and API key.

Is this the Gemini exchange?

No. This is Google's Gemini CLI, the AI coding agent.