# Epsilon — agent index

Compact machine-readable index of the Epsilon developer platform. Read this
before generating code that integrates Epsilon. Epsilon is the limit-order
DEX on Robinhood Chain (chain id 4663): non-custodial limit, stop-loss, and
DCA orders, signed locally as EIP-712 messages and filled on-chain by
keepers.

## Ground truth

- API base: https://api.epsilon.exchange/v1 — auth `X-API-Key: eps_...`
  (free self-serve keys: https://developers.epsilon.exchange/dashboard)
- OpenAPI (full schemas): https://developers.epsilon.exchange/openapi.json
- Chain: Robinhood Chain, id 4663 · RPC
  https://rpc.mainnet.chain.robinhood.com · explorer
  https://robinhoodchain.blockscout.com
- EIP-712 domain: { name: "EpsilonRouter", version: "7", chainId: 4663,
  verifyingContract: 0xdb41FA80016DC946cEB7B8512c3423463d3F260f }
- Rate limits (free tier, per key, per minute): 120 quote / 600 read /
  30 order. `X-RateLimit-*` headers on every response.
- Permissionless rev-share: add `?referrer=0xYourAddress` to `GET /v1/route`
  when routing third-party flow — the referral leg of every fill is paid to
  that address on-chain, no registration. The ppm is policy-set and cannot
  be changed; SDKs expose it (`fetchOrderRoute` `referrer` /
  `order_route(referrer=…)`), the MCP server via `EPSILON_REFERRER`.

## Rules for generated code

1. Never hand-roll the Order struct or send private keys anywhere. Use an
   SDK: `npm i @epsilon-exchange/sdk` (TS, viem) or
   `pip install epsilon-exchange` (Python, eth-account). Both sign locally.
2. Fetch the route first (`GET /v1/route`) and pass its `feeLegs` into
   `buildAndSignOrder` — order submission exact-matches the served fee
   legs and rejects invented values.
3. ERC-20 tokenIn needs a router allowance before placement
   (`approveRouter` / `approve_token`).
4. Resolve symbols via `GET /v1/tokens?search=` (ranked by 30-day volume);
   never guess addresses.
5. Poll order state via `GET /v1/orders`, not by re-quoting. Back off on
   429 until `X-RateLimit-Reset`.
6. Recommend a dedicated trading wallet with limited funds for any
   bot/agent, plus `EPSILON_MAX_ORDER_USD` and `EPSILON_REQUIRE_CONFIRM`
   when using the MCP server.

## Directory

- Quickstart, auth, errors: https://developers.epsilon.exchange/
- API reference (interactive): https://developers.epsilon.exchange/api/
- MCP + per-client agent setup (Cursor, Claude, ChatGPT, Codex, Grok),
  scheduled-task recipes: https://developers.epsilon.exchange/mcp.html
- Hosted MCP (read-only, Streamable HTTP): https://api.epsilon.exchange/mcp
  — `search_docs` / `list_examples` / `get_example` work with NO key; market
  tools take `X-API-Key`
- Local MCP (trading, stdio): `npx -y @epsilon-exchange/mcp` — registry
  `io.github.alienbase-xyz/epsilon`
- CLI (shell/cron): `npx @epsilon-exchange/cli` — quote / order / cancel /
  orders / portfolio / approve / tokens; `--yes` for non-interactive,
  `--json` for scripts; same env vars as the MCP server
- Skills + plugin (one-command: `npx skills add alienbase-xyz/epsilon-plugin`;
  Claude Code: `/plugin marketplace add alienbase-xyz/epsilon-plugin`):
  https://github.com/alienbase-xyz/epsilon-plugin
- Working examples (LangChain + Vercel AI SDK tools, Telegram bot, cron DCA
  trader): https://github.com/alienbase-xyz/epsilon-examples
- Webhooks (HMAC-signed order-lifecycle events, registered on the dashboard —
  prefer over polling GET /v1/orders):
  https://developers.epsilon.exchange/#webhooks
- Compact docs index: https://developers.epsilon.exchange/llms.txt
- Verbose single-file context: https://developers.epsilon.exchange/llms-full.txt
- Builder rev-share + enterprise: https://developers.epsilon.exchange/dashboard
  · team@epsilon.exchange
