At least once
The event id stays the same on every retry. Drop an id you have already handled.
FBYT for developers · API · MCP · Webhooks
FBYT has a public REST API, an MCP server and signed webhooks. Money managers use them to run their vaults from their own code or an AI agent such as Claude, Codex or Cursor: spot swaps, conditional orders, strategy bots, lending, perps and reporting. A key can trade a vault’s funds but cannot send them to an outside wallet.
For money managers on FBYT. One API key, created in the app, works for all three.
REST API
https://api.fbyt.io
106 endpoints, key in X-API-Key
MCP server
https://mcp.fbyt.io/mcp
64 tools for your AI agent
Webhooks
POST /api/bot/webhooks
57 events, HMAC-SHA256 signed
REST API
Pick a route and send it. The answer comes from the live API, the same one your code calls. These routes need no key; every other route takes the API key you create in the app.
The platform halt: while it is on, trades, lends and perps writes get 503. Public, no key.
https://api.fbyt.io/api/bot-trading/haltPress Send to call the live API.https://api.fbyt.ioX-API-Key: fbyt_… on every request. Scopes read, trade, lend and perps. How keys workA quote shows the expected output and the trading fee and trades nothing. The trade carries an idempotency key, so a retry after a timeout never trades twice. Spot trading guide
curl https://api.fbyt.io/api/bot/vaults \
-H "X-API-Key: fbyt_your-secret-here"curl "https://api.fbyt.io/api/bot/vaults/YOUR_VAULT/quote?inputMint=SOL&outputMint=USDC&amount=500000000&slippageBps=50" \
-H "X-API-Key: fbyt_your-secret-here"curl -X POST https://api.fbyt.io/api/bot/vaults/YOUR_VAULT/trade \
-H "X-API-Key: fbyt_your-secret-here" \
-H "Content-Type: application/json" \
-d '{
"inputMint": "SOL",
"outputMint": "USDC",
"amount": "500000000",
"slippageBps": 50,
"idempotencyKey": "rebal-2026-12-04-sol-usdc"
}'MCP server
Add the FBYT MCP server to Claude, Codex, Cursor or any MCP client, and your agent can read vault state, trade, manage orders and bots, lend, trade perps and report: 64 tools, one API key.
In a terminal. Runs the server on your machine.
claude mcp add --transport stdio fbyt --env FBYT_API_KEY=fbyt_xxx -- npx -y @fbyt/mcp-serverIn a terminal. Uses the hosted server, nothing to install.
claude mcp add --transport http fbyt https://mcp.fbyt.io/mcp --header "Authorization: Bearer fbyt_xxx"In a terminal.
codex mcp add fbyt --env FBYT_API_KEY=fbyt_xxx -- npx -y @fbyt/mcp-server.cursor/mcp.json in a project, or ~/.cursor/mcp.json.
{
"mcpServers": {
"fbyt": {
"command": "npx",
"args": ["-y", "@fbyt/mcp-server"],
"env": { "FBYT_API_KEY": "fbyt_xxx" }
}
}
}claude_desktop_config.json, then restart Claude Desktop.
{
"mcpServers": {
"fbyt": {
"command": "npx",
"args": ["-y", "@fbyt/mcp-server"],
"env": { "FBYT_API_KEY": "fbyt_xxx" }
}
}
}Any client with remote MCP (Streamable HTTP). Send the key on every request.
URL: https://mcp.fbyt.io/mcp
Header: Authorization: Bearer fbyt_xxxHow much an AI agent can do on FBYT depends on the API key you give it. A FBYT key can trade a vault’s funds but cannot send them to an outside wallet. Five controls narrow it further:
Start read-only. A key with only the read scope lets the agent report and analyse, but not trade.
Approve each write. Set your MCP client to ask before every tool that changes something.
Check before sending. Swaps take a quote and perps orders a dry run, so the agent can show you the result first.
Limit what a key can reach. Give the key only the vaults it should trade. Every key is capped at 1,000 writes a day.
Watch with webhooks. Fills, failures, margin warnings and low gas reach your endpoint within seconds.
npx and reads the key from FBYT_API_KEY. The hosted server at mcp.fbyt.io takes it as a Bearer token on each request and does not store it.Is my Momentum vault ready for the bot? Check gas too.
Usedfbyt_list_vaultsfbyt_get_vault
Momentum is Active, the execution wallet is set as its trading delegate, and the platform halt is off. The execution wallet holds 0.042 SOL, enough for about 20 trades at recent costs. Top it up before you start a grid bot.
Quote selling 0.5 SOL for USDC. Trade only if the fee is under $0.50.
Usedfbyt_get_quote
The quote returns 71.2 USDC with a trading fee of $0.28, under your limit. Send the swap?
Yes, send it.
Usedfbyt_execute_trade
Sent with the idempotency key rebal-sol-usdc-1, so a retry cannot trade twice. It confirmed: 0.5 SOL out, 71.19 USDC in.
64 tools in 8 groups. Tools that change something are marked: set your MCP client to ask you before each of them.
Changes something
fbyt_ whoamiThe key: owner, scopes, vault limit, rate limitsfbyt_ list_ tokensTradable tokens with current pricesfbyt_ list_ vaultsThe vaults this key can act onfbyt_ get_ vaultHoldings, execution wallet and readinessfbyt_ list_ tradesExecuted tradesfbyt_ get_ quoteExpected output and the trading feefbyt_ get_ halt_ statusIs trading halted platform-wide?fbyt_ execute_ trade (changes something)Swap now, with an idempotency keyfbyt_ list_ lending_ reservesLending pools and their ratesfbyt_ get_ lending_ reserve_ ratesOne pool’s rate historyfbyt_ get_ lending_ positionsA vault’s lending positionsfbyt_ lend (changes something)Lend a vault token nowfbyt_ take_ back (changes something)Take a loan back nowfbyt_ list_ ordersStanding ordersfbyt_ list_ order_ executionsOrder executionsfbyt_ create_ order (changes something)Limit, stop-loss, take-profit or recurringfbyt_ update_ order (changes something)Pause, resume or re-tunefbyt_ cancel_ order (changes something)Cancel an orderfbyt_ list_ botsA vault’s botsfbyt_ get_ botOne bot, its runs, levels or profitfbyt_ get_ pair_ priceLive pair price for a gridfbyt_ get_ bot_ network_ feeAverage network fee of bot tradesfbyt_ create_ dca_ bot (changes something)Create a DCA botfbyt_ create_ grid_ bot (changes something)Create a grid botfbyt_ create_ rebalance_ bot (changes something)Create a rebalancing botfbyt_ update_ dca_ bot (changes something)Start, stop or change a DCA botfbyt_ update_ grid_ bot (changes something)Start, stop or change a grid botfbyt_ update_ rebalance_ bot (changes something)Start, stop or change a rebalancing botfbyt_ delete_ bot (changes something)Delete a stopped botfbyt_ get_ perps_ accountPositions, margin, totals, server ordersfbyt_ list_ perps_ historyFills and funding paymentsfbyt_ get_ perps_ requestA write by its idempotency keyfbyt_ get_ perps_ marketMarkets, order book, candles, fundingfbyt_ perps_ market_ order (changes something)Market order, optional TP/SLfbyt_ perps_ limit_ order (changes something)Limit order, post-only or reduce-onlyfbyt_ perps_ scale_ order (changes something)A ladder of 2 to 64 limitsfbyt_ perps_ twap_ order (changes something)TWAP orderfbyt_ perps_ isolated_ order (changes something)Isolated-margin orderfbyt_ perps_ trigger_ order (changes something)Stop or entry, held by the serverfbyt_ perps_ pegged_ order (changes something)Limit chaser, repriced by the serverfbyt_ perps_ cancel (changes something)Cancel orders, TWAP, TP/SLfbyt_ perps_ set_ tpsl (changes something)Set or replace a position’s TP/SLfbyt_ perps_ set_ stop (changes something)One side of a TP/SLfbyt_ perps_ close_ position (changes something)Close a positionfbyt_ perps_ isolated_ margin (changes something)Add or remove isolated marginfbyt_ perps_ collateral (changes something)Move collateral to or from the vaultfbyt_ get_ vault_ statsReturns, risk, PnL, volume, entry pricesfbyt_ list_ vault_ activityFees, investors, deposits, withdrawalsfbyt_ get_ manager_ statsYour vaults in one summary, fees earnedfbyt_ get_ platform_ statsPlatform-wide totalsfbyt_ get_ execution_ walletStatus, SOL balance and historyfbyt_ create_ execution_ wallet (changes something)Create the vault’s execution walletfbyt_ report_ execution_ wallet_ top_ up (changes something)Record a SOL top-upfbyt_ withdraw_ execution_ wallet (changes something)Send its SOL back to the managerfbyt_ list_ webhook_ event_ typesEvent typesfbyt_ list_ webhooksYour endpointsfbyt_ get_ webhookOne endpointfbyt_ list_ webhook_ deliveriesDelivery logfbyt_ create_ webhook (changes something)Create an endpointfbyt_ update_ webhook (changes something)Change or switch on an endpointfbyt_ delete_ webhook (changes something)Delete an endpointfbyt_ rotate_ webhook_ secret (changes something)Rotate the signing secretfbyt_ send_ webhook_ test (changes something)Send a test eventfbyt_ redeliver_ webhook (changes something)Send a delivery againWebhooks
Register an HTTPS endpoint and FBYT sends each event to it as a signed JSON POST within seconds: 57 event types, from a filled order to a margin warning. Up to 10 endpoints per key, each limited to the vaults you choose.
order.createdorder.updatedorder.pausedorder.resumedorder.cancelledorder.executedorder.failedtrade.executedbot.createdbot.updatedbot.startedbot.stoppedbot.deletedbot.executedbot.waitingbot.failedperps.order.placedperps.order.filledperps.order.cancelledperps.order.failedperps.trigger.firedperps.trigger.failedperps.pegged.repricedperps.pegged.filledperps.tpsl.triggeredperps.twap.completedperps.twap.cancelledperps.position.openedperps.position.closedperps.position.liquidatedperps.margin.warningperps.funding.paidperps.collateral.depositedperps.collateral.withdrawnperps.exit.requestedperps.market.delistedlending.suppliedlending.redeemedlending.rate.changedvault.depositvault.withdrawalvault.daily_snapshotvault.fees.chargedvault.fees.claimablevault.stray_tokens.receivedexecution_wallet.low_balanceexecution_wallet.topped_upexecution_wallet.withdrawntrading_delegate.revokedapi_key.createdapi_key.revokedapi_key.rejectedplatform.trading_haltedplatform.trading_resumedwebhook.testwebhook.disabledwebhook.endpoint_updatedPOST /fbyt HTTP/1.1
Content-Type: application/json
FBYT-Signature: t=1764756000,v1=5f2b…c9a1
FBYT-Event-Id: 6b1e0c4a-8f2d-4e7b-9c3a-1d5f7e9b2a4c
FBYT-Event-Type: order.executed
{
"id": "6b1e0c4a-8f2d-4e7b-9c3a-1d5f7e9b2a4c",
"type": "order.executed",
"createdAt": "2026-12-03T10:00:00.000Z",
"apiVersion": "2026-12-03",
"vault": "YOUR_VAULT_ADDRESS",
"data": {
"order": { "orderType": "stop_loss", "status": "filled", "…": "…" },
"signature": "3pQx…",
"priceUsd": "131.20",
"amountIn": "1500000000",
"amountOut": "196800000",
"final": true
}
}import crypto from "node:crypto";
// HMAC-SHA256 over "<t>.<raw body>", keyed with the whole whsec_ secret.
function verify(header, rawBody, secret) {
const parts = header.split(",").map((p) => p.trim().split("="));
const t = Number(parts.find(([k]) => k === "t")?.[1]);
if (!Number.isInteger(t) || Math.abs(Date.now() / 1000 - t) > 300) return false;
const expected = crypto.createHmac("sha256", secret).update(`${t}.`).update(rawBody).digest();
return parts
.filter(([k, v]) => k === "v1" && /^[0-9a-f]{64}$/.test(v ?? ""))
.some(([, v]) => crypto.timingSafeEqual(Buffer.from(v, "hex"), expected));
}Refuse a timestamp more than 300 seconds from your clock and compare in constant time. Python, the full event catalogue and every field are in the webhooks guide.
The event id stays the same on every retry. Drop an id you have already handled.
A failed delivery is sent again with a growing delay, up to an hour apart, for a day.
Endpoints must resolve to public addresses, checked again at each delivery. Redirects are not followed.
An endpoint that fails 20 times in a row over 6 hours is switched off. Switch it on again once it is fixed.
Safety
A key, a bot or an agent can trade a vault’s funds but cannot send them to an outside wallet. It can still lose value through trades, slippage or a liquidated perps position, so give each key only the scopes and vaults it needs.
On FBYT, trades, lends and perps orders only move funds between the vault and positions it holds. No route sends vault tokens or SOL to an outside address. The execution wallet’s gas SOL can only go back to the manager.
Each key carries only the scopes you tick: read, trade, lend, perps. A key can be limited to some of your vaults, and every vault route checks that you manage the vault.
Optionally, a key can require an Ed25519 signature on every request, over the method, path, body, time and a one-time nonce, and accept calls only from the IPs you list.
Writes take an idempotency key, so a retry never trades twice. One action runs per vault at a time. Perps orders take a dry run, and swaps a quote.
Rate limits are the same for every key and cannot be changed through the API. Every request, accepted or refused, goes into the key’s audit log, which you read in the app.
Revoke a key in the app and its next request is refused. That does not stop the bots and orders it created: stop them in the app as well. While the platform halt is on, new trades, lends and perps orders are refused. Its state is public at /api/bot-trading/halt.
Anything that needs a wallet signature. Do these once in the app, then the API does the rest.
Use of the API, the MCP server and any bot or AI agent you connect is governed by the Automated Trading, Conditional Orders and API Terms. You are responsible for what your code and your agents do with your key. The vault program was audited by IronNode Security in November 2026 (see Security); report a vulnerability to [email protected]. Page last reviewed .
Reference
The full reference lives in the app, generated from the API itself: every route, parameter and error, with setup steps and a guide for each area.
FAQ
Yes. An AI agent can trade crypto when it has access to a trading API, often through an MCP server. On FBYT, a money manager can connect an AI trading agent such as Claude, Codex or Cursor to their vault through the FBYT MCP server and an API key. The agent can read the vault, quote and execute swaps, manage orders and strategy bots, lend and trade perps. It cannot send the vault’s funds to an outside wallet. Start with a read-only key, and set the MCP client to ask you before each trade.
The FBYT API is for money managers on FBYT. It acts on the vaults that the key’s owner manages. Register as a manager and create a vault in the app, accept the Automated Trading terms, then create an API key there. Investors do not need the API: they deposit and withdraw in the app.
No. On FBYT, trades, lends and perps orders only move funds between the vault and positions it holds. No route sends vault tokens or SOL to an outside address. The one withdrawal in the API returns the execution wallet’s SOL, which pays for gas, to the vault’s manager. Investor deposits and withdrawals happen only in the app, signed by the investor’s wallet.
Yes. The FBYT MCP server (@fbyt/mcp-server on npm) gives an AI agent 64 tools over the API, and works with any MCP client. Claude Code, Codex CLI, Cursor and Claude Desktop run the server locally with npx and read the key from the environment. Clients with remote MCP support can use the hosted server at mcp.fbyt.io/mcp and send the key as a Bearer token. Keys that require signed requests work only with the local server, so the signing key never leaves your machine.
An AI agent can make bad trades quickly, so limit what it can do. On FBYT, an agent’s API key can trade a vault’s funds but never send them to an outside wallet. Start with a read-only key, set your MCP client to ask before every trade, check swaps with a quote and perps orders with a dry run, and limit the key to one small vault. Every key is capped at 1,000 writes a day, and webhooks report each fill and failure.
FBYT runs on Solana mainnet, and there is no separate test network. A swap quote and a perps dry run check an action and its cost without sending it. Start with a read-only key, then a key limited to one small vault.
The FBYT API cannot do anything that needs a wallet signature. These stay in the app: registering as a manager, creating or closing a vault, accepting the terms, creating and revoking API keys, authorizing the trading delegate, enabling perps, claiming fees, and investor deposits and withdrawals.
Each FBYT API key can make 60 requests a minute, 20,000 a day and 1,000 writes a day. The limits are the same for every key and cannot be changed through the API. Webhook deliveries do not count against them. Apart from these request limits, the platform sets no limit on trade size.
Each FBYT webhook delivery carries an FBYT-Signature header with a timestamp and an HMAC-SHA256 signature of the timestamp and the raw body, keyed with your endpoint’s secret. Refuse a timestamp more than 300 seconds from your clock, then compare the signatures in constant time.
The vault’s execution wallet pays each transaction’s network fee and, for a spot swap, the protocol trading fee in SOL: a flat fee plus a tiered percentage of the trade’s value. The quote route shows the trading fee before you trade, and the execution wallet’s history lists every cost.