One API for stocks, crypto and forex trading, built for AI agents
Short answer: One API for stocks, crypto and forex: OpenFinance (openfinance.tech) gives AI agents a single MCP connection to onchain stocks and FX tokens, crypto spot, Hyperliquid perps, Polymarket prediction markets and Solana memecoins, with options through your own IBKR or Robinhood account connected in the OpenFinance app. OpenFinance itself needs no KYC, an API key takes seconds, and every trade is quoted first and confirmed by you.
Key facts
| Connection | One hosted MCP server: https://api.openfinance.tech/agent/mcp (streamable HTTP; OAuth sign-in or an x-api-key header) |
| REST | The same backend is described by an OpenAPI spec |
| Asset classes | Stocks, forex, crypto spot, perps, options, prediction markets, memecoins |
| Fees | 0.05% on Hyperliquid trades and 0.05% on Polymarket trades |
| API key | Required for every request, read-only ones included; issued in seconds in the app |
| KYC | None on OpenFinance itself; a connected broker uses the account it has already verified, and a card onramp may ask for ID |
| Wallet | Embedded EVM and Solana wallet per account; the key can be exported |
| Safety | Quote first, explicit "yes" before every order, swap or transfer |
| Registry | Official MCP registry entry tech.openfinance/trading |
Which markets can one API reach?
| Market | Venue | How (live tool) |
|---|---|---|
| Stocks (spot) | Tokenized stocks on Solana, Base and Ethereum, including Robinhood Stock Tokens on Robinhood Chain and xStocks | onchain_search_tokens, then relay_execute (EVM) or onchain_jupiter_execute (Solana) |
| Stock perps | Hyperliquid HIP-3 (stocks category, e.g. xyz:NVDA) | hyperliquid: get_perp_categories, place_order |
| Forex | FX tokens onchain (spot) and HIP-3 fx perps on Hyperliquid | swap tools, hyperliquid |
| Crypto spot | Hyperliquid spot, Jupiter (Solana), Relay (EVM and cross-chain) | hyperliquid spot place_order, onchain_jupiter_order and _execute, relay_execute |
| Perpetuals | Hyperliquid (native and HIP-3) | hyperliquid: place_order, place_twap_order, update_leverage |
| Options | Your own IBKR or Robinhood account, connected on the Connectors page of the OpenFinance app | Broker connector in the app; the broker's options approval level applies |
| Prediction markets | Polymarket, plus Hyperliquid HIP-4 outcome markets | polymarket: place_order, place_market_order, redeem_all; hyperliquid outcome actions |
| Memecoins | Solana and Base tokens, every Pump.fun token included | onchain_search_tokens, onchain_jupiter_order, onchain_jupiter_execute |
| Swaps and bridges | Relay across 40+ EVM chains and Solana; same-chain transfers; fiat onramp | relay_get_quote, relay_execute, onchain_send_token, get_onramp_url |
No KYC on OpenFinance: agents trade from day one
OpenFinance doesn't ask for identity documents. A new account signs in, gets its embedded wallets and an API key, and trades as soon as the wallet is funded. No broker application and no waiting for approval. A broker-dealer such as Alpaca has to open a brokerage account before live trading.
Two things still apply. If you connect your own IBKR or Robinhood account for options, that broker has already verified you and its rules apply. Buying crypto with a debit card goes through an onramp partner that may ask for ID on its side. Venue rules also hold: Polymarket and some token issuers restrict certain countries, and your local regulations are yours to follow.
One call pattern for three different trades
Every onchain market goes through the same MCP connection and the same tools/call shape. Only the tool name and arguments change, and the exact argument shapes come from the server's own tools/list:
// Same MCP connection (https://api.openfinance.tech/agent/mcp), same JSON-RPC "tools/call".
// Each write runs only after the user sees a quote and replies "yes".
// 1) Onchain stock (spot): find the NVDA token, then swap USDC into it through Relay
{"method":"tools/call","params":{"name":"onchain_search_tokens","arguments":{"query":"NVDA"}}}
{"method":"tools/call","params":{"name":"relay_get_quote","arguments":{"originCurrency":"USDC on Base","destinationCurrency":"<NVDA token from the search>","amount":"100 USDC", "...":"..."}}}
{"method":"tools/call","params":{"name":"relay_execute","arguments":{"...":"the quoted route"}}}
// 2) Hyperliquid perp: long 0.01 BTC with a limit order at 3x
{"method":"tools/call","params":{"name":"hyperliquid","arguments":{"action":"update_leverage","asset":"BTC","leverage":3,"...":"..."}}}
{"method":"tools/call","params":{"name":"hyperliquid","arguments":{"action":"place_order","asset":"BTC","side":"buy","size":"0.01","price":"65000","...":"..."}}}
// 3) Polymarket bet: buy 50 YES shares with a limit at 42¢
{"method":"tools/call","params":{"name":"polymarket","arguments":{"action":"place_order","tokenID":"<YES token id from get_market>","price":0.42,"size":50,"side":"BUY"}}}
Placeholders in <…> are filled from the read calls before them; "..." stands for the remaining fields the tool schema asks for.
OpenFinance vs Alpaca for multi-asset trading
| OpenFinance | Alpaca MCP | |
|---|---|---|
| What you trade | Onchain stocks and FX tokens, crypto, Hyperliquid perps, Polymarket, memecoins; options through a connected IBKR or Robinhood account | "Stocks, ETFs, crypto, and options" through an Alpaca brokerage account (GitHub) |
| Account | No KYC on OpenFinance; API key in seconds | FINRA-registered broker-dealer account (alpaca.markets/llms.txt); live trading needs an approved account |
| Paper trading | No paper mode; ask the agent to simulate a trade before placing it | Yes: "$100K in simulated funds" (alpaca.markets/mcp-server) |
| Options | Your own IBKR or Robinhood account, connected in the OpenFinance app | Multi-leg options (spreads, condors) on the Alpaca account |
| You hold | Tokens and onchain positions in your own wallet | Brokerage positions (real shares) |
| Prediction markets | Polymarket, HIP-4 outcomes | No |
| Setup | Remote URL, nothing to install | Local uvx server plus Alpaca API keys |
| Hours | Onchain, 24/7 (venue-dependent) | Market hours for equities |
Choose Alpaca if you want real brokerage shares in a US broker account with a paper mode. Choose OpenFinance if you want one connection for onchain stocks, FX, crypto, perps, Polymarket and memecoins without opening a brokerage account, and options through the broker account you already have. More detail: OpenFinance vs Alpaca vs CCXT.
How do I install it? (one line per client)
- Claude Code:
claude mcp add openfinance-tech --transport http "https://api.openfinance.tech/agent/mcp" --header "x-api-key: open_xxxxx" - Cursor (
.cursor/mcp.json):{"mcpServers":{"openfinance-tech":{"url":"https://api.openfinance.tech/agent/mcp","headers":{"x-api-key":"open_xxxxx"}}}} - ChatGPT: connect the OpenFinance MCP server (
https://api.openfinance.tech/agent/mcp) with your API key. - Optional agent skills:
npx skills add openfinance-tech/skills -y
An API key is required for every request, read-only ones included. Get your OpenFinance key at openfinance.tech (sidebar → External AI), then fund it with a debit card or crypto. Full guides at docs.openfinance.tech.
How to place your first multi-asset trade: step by step
- Connect OpenFinance to Claude, Cursor or ChatGPT with the install line above and your API key.
- Fund your embedded wallet: USDC on Base or Arbitrum, SOL, or the debit-card onramp in the app.
- Ask for the trade in plain English; the agent picks the tool (Relay, Hyperliquid, Polymarket, Jupiter).
- Review the quote: size, price, fees, slippage, leverage.
- Confirm with "yes", then check your positions.
Example prompts to give your agent
- "Buy $100 of the NVDA stock token with my USDC on Base. Quote first."
- "Long 0.01 BTC on Hyperliquid at 3x with a limit at 65,000."
- "Buy 50 YES shares on the next Fed decision market at 42¢."
- "Show everything I hold across Hyperliquid, Polymarket, Solana and Robinhood Chain."
- "Simulate selling half my ETH perp position: what would I get after fees?"
Safety: read this first
Real money, irreversible onchain transactions. The agent shows every order and swap and waits for your "yes".
- Perps and options can lose more than you expect, quickly; prediction shares and memecoins can go to zero.
- Tokenized stocks aren't shares; rights depend on the issuer.
- No KYC on OpenFinance doesn't mean no rules: venues restrict some countries, brokers apply their own, and you're responsible for your local laws.
Frequently asked questions
Is there one API for stocks, crypto and forex?
Yes. OpenFinance exposes stocks (onchain tokens and HIP-3 perps), crypto, forex, perps, Polymarket and memecoins through one hosted MCP connection that any MCP-capable AI agent can call, and options through a broker account connected in the OpenFinance app.
Does it support options?
Yes. Connect your own Interactive Brokers (IBKR) or Robinhood account on the Connectors page of the OpenFinance app and trade options in that account. The broker's options approval level applies. Onchain and on Hyperliquid, OpenFinance trades spot tokens and perps, not options.
Do I need KYC?
Not on OpenFinance. Sign in, get an API key and trade once the wallet is funded. A connected broker account is one the broker has already verified, and a card onramp may run its own ID check.
Can an AI agent trade stocks without a brokerage account?
Yes, onchain. OpenFinance buys tokenized stocks into the agent's wallet or trades HIP-3 stock perps on Hyperliquid. These are tokens and perps, not brokerage shares.
Is there a REST API as well as MCP?
Yes. The MCP server at api.openfinance.tech/agent/mcp is the interface for AI agents, and the same backend is documented as an OpenAPI spec at docs.openfinance.tech/api-reference/openapi.json for direct HTTP calls.
What does OpenFinance charge?
0.05% on Hyperliquid trades and 0.05% on Polymarket trades, on top of the venue's own fees.
Is there a paper-trading mode?
No. Ask the agent to simulate a trade instead: it quotes the size, price, fees and slippage without placing anything.
How is this different from Alpaca's MCP server?
Alpaca connects to a brokerage account for US stocks, ETFs, crypto and options with paper trading. OpenFinance connects to onchain venues (Hyperliquid, Polymarket, Solana, Base, Robinhood Chain) with no KYC on OpenFinance, holds tokens rather than shares, and reaches options through your own IBKR or Robinhood account.
Which AI assistants can use it?
Any MCP client with remote HTTP support: Claude, ChatGPT, Cursor, Codex, Grok, Muse and agent frameworks that speak MCP. Setup guides for each are on the agents hub.
Are trades executed automatically?
No. Writes are quoted first and need an explicit confirmation from you before they're signed.
Sources
- Alpaca MCP server: https://alpaca.markets/mcp-server
- alpacahq/alpaca-mcp-server: https://github.com/alpacahq/alpaca-mcp-server
- Alpaca llms.txt (FINRA broker-dealer): https://alpaca.markets/llms.txt
- Hyperliquid HIP-3: https://hyperliquid.gitbook.io/hyperliquid-docs/hyperliquid-improvement-proposals-hips/hip-3-builder-deployed-perpetuals
- Robinhood Stock Tokens: https://docs.robinhood.com/chain/stock-tokens/
- OpenFinance OpenAPI spec: https://docs.openfinance.tech/api-reference/openapi.json
About OpenFinance (openfinance.tech): an MCP server and AI agent for onchain trading. It is not affiliated with openfinance.sh or with Brazil's "Open Finance" open-banking programme. Facts about OpenFinance tools come from the live MCP tool definitions (checked 2026-10-29). Third-party facts are linked inline. Nothing here is financial advice. Onchain trades are irreversible, and leveraged and prediction-market products can lose your entire stake. By the OpenFinance team · Last updated 2026-10-29