Quick start · FOMO
FOMO WebSocket API quick start
Track traders and coins on FOMO, the social trading app, and receive their theses, trades and token verifications as JSON on one WebSocket. This page gets a consumer running; the API reference holds every op and field.
- WebSocket
wss://fomo.1322.io/fomo_<hex>?key={key}- REST base
https://fomo.1322.io- Auth
- One key: X-Api-Key or Bearer (REST), ?key= (WebSocket)
- Updated
What you get
Theses posted by the FOMO users you track, every thesis posted on a coin you track, and your users' buys, sells and closes with USD size, price and PnL. A tracked coin also sends token_verified when FOMO verifies it. Optional global feeds add every new FOMO account, every verified token, large trades, multi-trader buys and sells, new listings and profit milestones.
Every plan tracks the same number of users and coins, with WebSocket delivery included. Events arrive in real time, typically within seconds.
Price: From $79/month for 10 FOMO users and 10 coins; WebSocket included. Plans: Lite $79/month (10 users and coins each), Standard $149/month (50 users and coins each), Pro $299/month (100 users and coins each). Pay monthly, or prepay 3 months (10% off), 6 months (15% off) or a year (25% off). See FOMO pricing.
Set up
- Pick a plan on the pricing page and check out with card or crypto. Checkout provisions your FOMO client immediately; your key appears on the API access page in your dashboard.
- If your plan is linked to a Discord server, invite the 1322 FOMO bot to that server and run
/fomo channelto choose where alerts post. Slash commands need the Manage Server permission. - Add traders and coins with
/fomo track-userand/fomo track-coin, from your 1322 dashboard, or over REST withPOST /v1/usersandPOST /v1/coins. - Optionally switch on global feeds (
/fomo feedsorPUT /v1/feeds) and set trade filters (/fomo filtersorPUT /v1/filters). - Connect a WebSocket consumer as below. The dashboard live feed, Telegram and webhooks can carry the same events.
Authentication
- FOMO uses one key for REST and the WebSocket. REST takes
X-Api-Key: <key>orAuthorization: Bearer <key>. - The WebSocket takes the same key as
?key=on your account's own path:wss://fomo.1322.io/fomo_<hex>?key=<key>.GET /v1/dashboardreturns the URL asws_url(without the key) and the key asws_key. - The key and URL are on the API access page in your dashboard, and
/fomo websocketshows them in Discord.
Connect to the WebSocket
Set these environment variables, then run either consumer from your server:
FOMO_WS_URL: ws_url from GET /v1/dashboard (wss://fomo.1322.io/fomo_<hex>)FOMO_API_KEY: your FOMO key (REST and WebSocket)
# pip install "websockets>=13" (Python 3.9+)
import asyncio, json, os
from websockets.asyncio.client import connect
# ws_url: GET /v1/dashboard -> "ws_url". The same key works for REST and the WebSocket.
WS_URL = os.environ["FOMO_WS_URL"] + "?key=" + os.environ["FOMO_API_KEY"]
def handle(event):
if event.get("status") == "LIVE_MODE_ACTIVATED":
print("connected")
return
op = event.get("op")
d = event.get("d") or {}
coin = d.get("coin") or {}
if op == "thesis":
author = d.get("author") or {}
text = (d.get("thesis") or {}).get("text") or ""
print("thesis", author.get("username"), coin.get("symbol"), text[:80])
elif op == "trade":
user = d.get("user") or {}
print("trade", user.get("username"), d.get("side"), coin.get("symbol"),
(d.get("trade") or {}).get("usdAmount"))
else:
print(op, coin.get("symbol") or (d.get("user") or {}).get("username"))
async def main():
backoff = 1
while True:
try:
async with connect(WS_URL) as ws:
backoff = 1
async for raw in ws:
try:
event = json.loads(raw)
except ValueError:
continue
if isinstance(event, dict):
handle(event)
except Exception as exc:
print("disconnected:", exc)
await asyncio.sleep(backoff)
backoff = min(backoff * 2, 30)
asyncio.run(main())// npm install ws, save as consumer.mjs, run: node consumer.mjs (Node 18+)
import WebSocket from "ws"
// ws_url: GET /v1/dashboard -> "ws_url". The same key works for REST and the WebSocket.
const BASE_URL = process.env.FOMO_WS_URL
const API_KEY = process.env.FOMO_API_KEY
if (!BASE_URL || !API_KEY) throw new Error("Set FOMO_WS_URL and FOMO_API_KEY")
const WS_URL = BASE_URL + "?key=" + encodeURIComponent(API_KEY)
function handle(event) {
if (event.status === "LIVE_MODE_ACTIVATED") return console.log("connected")
const d = event.d ?? {}
const coin = d.coin ?? {}
if (event.op === "thesis") {
console.log("thesis", d.author?.username, coin.symbol, (d.thesis?.text ?? "").slice(0, 80))
} else if (event.op === "trade") {
console.log("trade", d.user?.username, d.side, coin.symbol, d.trade?.usdAmount)
} else {
console.log(event.op, coin.symbol ?? d.user?.username)
}
}
let backoff = 1000
function connect() {
const ws = new WebSocket(WS_URL)
ws.on("open", () => { backoff = 1000 })
ws.on("message", (raw) => {
let event
try { event = JSON.parse(raw.toString()) } catch { return }
if (event && typeof event === "object" && !Array.isArray(event)) handle(event)
})
ws.on("error", (err) => console.error("socket error:", err.message))
ws.on("close", () => {
setTimeout(connect, backoff)
backoff = Math.min(backoff * 2, 30000)
})
}
connect()- The first message after connecting is
{"status": "LIVE_MODE_ACTIVATED", "platform": "fomo"}. Every message after it is one event envelope; branch onop. - Send the text
PINGat any time and the server answersPONG. Handshake failures return before the upgrade: 401 missing or wrong key, 404 wrong path, 429 connection limit. - Events are not queued while you are disconnected, so reconnect promptly with a capped backoff, as above.
One example frame
Illustrative values for fictional accounts, trimmed to the fields most consumers read first. A real frame carries the full set for your tracked accounts.
{
"v": 1,
"t": "account",
"op": "thesis",
"id": "fomo:thesis:5c0e2a91-7d43-4b8e-9f21-3a6d8e4b1c70",
"ts": 1760537001412,
"d": {
"platform": "fomo",
"author": {
"id": "8b3f1d2e-4a6c-4e9b-a1d7-2f5c9e0b3a48",
"username": "exampletrader",
"displayName": "Example Trader",
"url": "https://fomo.family/profile/exampletrader"
},
"coin": {
"networkId": 1399811149,
"network": "solana",
"address": "Exmp1eCoinMint4Fake9aBcDeFgHjKmNpQrStUvWxYz",
"symbol": "EXMPL",
"priceUsd": "0.00412",
"marketCapUsd": "4120000"
},
"thesis": {
"id": "5c0e2a91-7d43-4b8e-9f21-3a6d8e4b1c70",
"text": "Volume is building into the weekly level. Adding here.",
"createdAt": 1760537000981,
"marketCapAtCreation": "4050000",
"likes": 12,
"replies": 3
},
"position": {
"usdValue": "1250.5",
"unrealizedPnlUsd": "84.2",
"unrealizedPnlPercent": "7.21"
}
}
}- Every message is
{ v, t, op, id, ts, d }. Dedupe onid. Times are Unix milliseconds, money and amounts are decimal strings, and a missing field means the value is unavailable, not zero. opisthesis,trade,token_verified,new_account,multi_user,listingormilestone. Atradecarriesd.user,d.side(buyorsell),d.kindandd.trade.
Manage the list over REST
REST base https://fomo.1322.io. Each call below sends X-Api-Key with your API key.
| Method | Path | What it does |
|---|---|---|
| GET | /v1/dashboard | Subscription status, limits, tracked users and coins, feeds, filters, ws_url and ws_key. |
| POST | /v1/users | Track a FOMO user by handle or profile URL. |
| DELETE | /v1/users | Stop tracking a FOMO user. |
| POST | /v1/coins | Track a coin by FOMO token URL, chain:address or Solana address. |
| PUT | /v1/feeds | Choose the global feeds you receive. |
| PUT | /v1/filters | Trade filters for your tracked users. |
curl "https://fomo.1322.io/v1/dashboard" \
-H "X-Api-Key: $FOMO_API_KEY"
curl -X POST "https://fomo.1322.io/v1/users" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $FOMO_API_KEY" \
-d '{ "input": "exampletrader" }'
curl -X DELETE "https://fomo.1322.io/v1/users" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $FOMO_API_KEY" \
-d '{ "input": "exampletrader" }'
curl -X POST "https://fomo.1322.io/v1/coins" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $FOMO_API_KEY" \
-d '{ "input": "solana:Exmp1eCoinMint4Fake9aBcDeFgHjKmNpQrStUvWxYz" }'
curl -X PUT "https://fomo.1322.io/v1/feeds" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $FOMO_API_KEY" \
-d '{ "feeds": [ "verified_all", "listings" ] }'
curl -X PUT "https://fomo.1322.io/v1/filters" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $FOMO_API_KEY" \
-d '{ "min_trade_usd": 500, "trade_sides": [ "buy" ], "user_events": [ "thesis", "trade" ] }'- A full list returns HTTP 422 with
{"error": "..."}, and something already on your list returns 409.GET /v1/trackedlists users, coins, feeds and limits;GET /v1/ws/statusshows your live connections.
Full reference
Every field, endpoint and edge case for FOMO lives in the API reference. Jump straight to the part you need:
Common questions
What counts against my FOMO plan limit?
One number covers both lists: a plan for 50 tracks up to 50 FOMO users and up to 50 coins. Global feeds do not use a slot. Adding past the limit returns HTTP 422.
How do I add a coin?
Paste its fomo.family/tokens/<chain>/<address> link, write chain:address (solana, base, bnb, monad, ethereum, hyperliquid or robinhood), use the address:networkId form, or give a bare Solana address. An 0x address must name its chain.
Can I get only large buys from the traders I track?
Yes. PUT /v1/filters with min_trade_usd and trade_sides set to ["buy"]; user_events chooses whether tracked users send theses, trades or both. The same settings are under /fomo filters in Discord.
Which Discord commands does the 1322 FOMO bot have?
/fomo track-user, /fomo untrack-user, /fomo track-coin, /fomo untrack-coin, /fomo list, /fomo channel (post alerts in a channel, optionally one event type per channel), /fomo feeds (turn a global feed on or off), /fomo filters (trade filters), /fomo websocket (show the WebSocket URL and key) and /fomo status.
Is 1322 affiliated with FOMO?
No. FOMO is an independent social trading app. 1322 is a separate monitoring service and is not affiliated with or endorsed by FOMO.
Other quick starts
- X (Twitter) WebSocket quick start: Tweets, deletes, profile and follow events
- Truth Social WebSocket quick start: Posts, retruths, quotes and media
- Instagram WebSocket quick start: Posts, Reels, carousels and Stories
- YouTube WebSocket quick start: Uploads, Shorts and deletions
- TikTok WebSocket quick start: Uploads, reposts, LIVE start and end
- Binance Square WebSocket quick start: Posts, pin changes and sentiment
- News WebSocket quick start: Full-text articles from news feeds
Related: