Your trading events, in your own systems
Fexr sends a signed webhook when a trade opens or closes, when an order isn't placed, or when a strategy pauses. The REST API reads the same account, orders and limits, and LLMs get the same tools over MCP.
npm install fexrJS/TS SDK on npmWhat a webhook can tell you
Each endpoint subscribes to the events it wants, one by one, by group such as trade.*, or all of them with *. These are the same events the app notifies you about.
| Event | When it is sent |
|---|---|
trade.opened Β· trade.closed | A position opens or closes in your account, from you, your agent or a strategy |
trade.failed | Fexr didn't place an order, for example because a pre-trade check refused it |
trade.strategy_paused | A strategy paused itself after repeated refusals |
risk.liquidation Β· risk.account_margin | A position is near liquidation, or account margin is running low |
apm.session_started Β· apm.session_ended Β· apm.drawdown | A goal session starts, ends, or hits a drawdown step |
agent.rule_applied Β· agent.steered | The agent applied one of your rules, or you changed its course |
markets.watchlist_alert Β· markets.ai_signal | Something you watch crosses an alert, or a signal fires |
vault.trading Β· vault.event | A vault you belong to trades, votes or changes |
The full list is returned by GET /users/me/webhooks/events.
How delivery works
Fexr-Signature: t=<unix>,v1=<hex>, an HMAC-SHA256 of the timestamp and body with your endpoint's secret.// Verify a Fexr webhook in Node
import crypto from 'node:crypto';
export function verify(rawBody, header, secret) {
const { t, v1 } = Object.fromEntries(header.split(',').map(p => p.split('=')));
const mac = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;
return fresh && crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(v1));
}What each plan includes
| Plan | API | Webhooks |
|---|---|---|
| Free | No API key. x402 endpoints, paid per call in USDC on Base, no account needed | None |
| Fexr Plus, $15 per 30 days | An API key with 1,000 requests a day | 1 endpoint |
| Fexr Desk, $2,500 a year | 50,000 requests a day, one key per agent, organization-only endpoints | 5 personal endpoints, plus workspace webhooks |
Calls that move funds or place orders also need a DPoP proof (RFC 9449): a fresh signature from the device that holds the key, so a copied token alone does nothing. API documentation
Give your LLM the same tools
Claude, ChatGPT, Cursor or your own agent can call Fexr's typed tools over MCP or x402: market data, your account and orders, inside the limits your wallet set.
x402 volume measured —
Common questions
How do I add a webhook?
In the app or with POST /users/me/webhooks: give an HTTPS URL and the events you want. Fexr returns the signing secret once, and you can send a test event straight away.
What happens if my endpoint is down?
Fexr retries after 1 minute, 5 minutes, 30 minutes, 2, 6 and 12 hours. After 20 failures in a row the endpoint is switched off until you turn it back on.
Can a webhook or API key move my money?
No. Webhooks only report. API calls that place orders go through the same trading key and the same ten pre-trade checks as the app, and that key can't withdraw.
Do I need an account to use the data?
No. x402 endpoints are paid per call in USDC on Base, with no key and no account. An API key comes with Fexr Plus or Fexr Desk.
Is there an SDK?
Yes, for JavaScript and TypeScript: npm install fexr. Other languages use the REST API and the OpenAPI spec.
Explore Further
- API & SDK β keys, auth and the endpoint reference
- Teams & Funds β SSO, per-agent identity and a signed audit trail
- How Fexr executes β what happens to an order after the API call
- Agentic Safety β the ten checks on every order
