Felix
Agentic trading infrastructure for everyone. One account for an AI agent to trade crypto perpetuals, prediction markets and options, inside limits you sign.
Hosted MCP Server
npx add-mcp 'https://mcp.felix.trade/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
Browse documentation
API quickstart
Create a key, make your first request, preview an order, and place it.
The Felix API is a REST API at https://api.felix.trade. Requests and responses are JSON, and every size is in US dollars. This guide uses curl.
Create a key
- Sign in to the Felix app and open Developers, then API keys.
- Choose Create live key. It asks you to sign with your owner key, and it can only trade within the limits you set. To rehearse first, choose Create paper key, which trades in simulation mode.
- Copy the key. It starts with
fk_and is shown only once.
No app? Create the account and key through the API with Registration.
export FELIX_API_KEY="fk_..."
Check that Felix is up
This call needs no key.
curl https://api.felix.trade/v1/status
{ "service": "felix-api", "status": "operational", "version": "2.0.221" }
Get a price
curl https://api.felix.trade/v1/quotes/BTC \
-H "Authorization: Bearer $FELIX_API_KEY"
{
"instrument": "crypto:BTC",
"product_type": "crypto_perpetual",
"price": 83600.5,
"tradeable": true
}
Preview an order
A preview tells you exactly what an order would cost and whether it can go through. It never moves money.
curl -X POST https://api.felix.trade/v1/orders/preview \
-H "Authorization: Bearer $FELIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"instrument": "BTC", "side": "buy", "size_usd": 50}'
{
"canonical_instrument": "crypto:BTC",
"side": "long",
"est_fill_price": 83584.5,
"fee": { "fee_usd": 0.0351, "bps": 7 },
"min_live_size_usd": 10.0,
"collateral_check": { "ok": false, "status": "leverage_opt_in_required" }
}
Read collateral_check before placing. In this example the account does not have $50 free on the venue, so the order would need leverage that the caller has not allowed. Fix that first, by funding the venue or allowing leverage, or the order will be refused.
Place the order
Every order needs an Idempotency-Key header. Use a new unique value for each new order, and reuse the same value if you retry the same order. That way a retry after a timeout can never place the order twice.
curl -X POST https://api.felix.trade/v1/orders \
-H "Authorization: Bearer $FELIX_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: btc-long-2026-10-11-001" \
-d '{"instrument": "BTC", "side": "buy", "size_usd": 50}'
The response includes status, the fill price and size, the fee, and an order_id and position_id.
[!note] Note Warning: A timeout does not mean the order failed
If a request times out or returns an error after you sent it, the order may still have filled. Retry with the same
Idempotency-Key, or checkGET /v1/positions, before sending anything new.
Check the result
curl https://api.felix.trade/v1/positions \
-H "Authorization: Bearer $FELIX_API_KEY"
GET /v1/money shows where all of your money is, across your balance, venues, and open positions.
Next
- API reference for every endpoint, its scope, and its errors.
- Idempotency and Errors before you automate anything.
- Venues for minimums and leverage on each venue.
Felix is non-custodial trading infrastructure, not a broker, exchange, bank, or investment adviser. Trading can lose all allocated capital. Read the risk disclosure. For AI agents: llms.txt and llms-full.txt.