Home / Blog / Data API

Data API

FOMO Trading API: REST API for Social Trading Data & Wallets

A FOMO trading API connects social trader handles to their on-chain wallets across Solana and EVM chains, delivering real PnL, holdings, trade history, and leaderboards through REST endpoints and WebSocket feeds. Because fomoapi.io resolves each handle to a real address, the trades behind a track record are there to check.

Pixel-art identity network resolving an anonymous trader profile into verified blockchain wallets.

A FOMO trading API connects social trader handles to real on-chain wallets and available position history. Instead of scraping screenshots or trusting self-reported PnL, you query a single endpoint and get back live balances, available position history, leaderboard rankings, and who holds what tokens. This guide covers how handle-to-wallet resolution works, the core REST endpoints, real-time WebSocket feeds, and what on-chain wallet data actually means for your trading tools.

What is a FOMO Trading API?

A FOMO trading API resolves any social trader's username (Twitter, Telegram, or platform handle) to their actual on-chain wallets on Solana and EVM chains. Once you have the wallet addresses, the API serves:

  • PnL and track record: fomo.family's figures, returned with the wallets so you can audit them.
  • Live holdings: current token balances across all supported chains.
  • available trade history: every buy and sell, with timestamps, amounts, and realized gains.
  • Ranked leaderboards: traders sorted by 24h, 7d, or 30d performance.
  • Token ownership graph: see which traders hold a specific token and how much.
  • Real-time WebSocket feed: live trade events as FOMO publishes them.

You authenticate once with an API key and get all of this through a handful of REST endpoints plus a WebSocket connection. Resolved wallet activity can be checked against public chain records, while identity mapping, source coverage, and derived metrics still need to be evaluated separately.

Use cases include building trader dashboards, copy-trading bots, social sentiment tools, portfolio analytics, and leaderboards. If you need to know what a trader actually owns and how they performed, a FOMO trading API gives you the ground truth.

How Handle-to-Wallet Resolution Works

Most social traders share a Twitter or Telegram handle, not a wallet address. A social trading API must map that handle to the correct on-chain wallets. Here is how it works:

  1. User lookup: you call GET /v2/users/{handle} with a Twitter username or numeric user ID.
  2. Wallet discovery: the API returns both Solana and EVM wallet addresses linked to that handle.
  3. Cross-chain aggregation: the API returns balances, trades, and PnL for every wallet and chain a trader uses, in a single response.

For example, if you query GET /v2/users/traderhandle, you get back:

{
  "user_id": "12345",
  "handle": "traderhandle",
  "solana_wallet": "7xKXt...",
  "evm_wallet": "0xABC...",
  "pnl_24h": 12500.00,
  "pnl_7d": 48000.00,
  "rank_24h": 42
}

This single call gives you everything you need to start tracking that trader. You do not need to maintain your own wallet registry or run your own indexers.

The API supports six chains in total: Solana, Ethereum, Base, BSC, and two more EVM networks. Each trader's EVM wallet is used across all EVM chains, so you get a unified view of their activity.

Core REST Endpoints for Trading Data

A crypto trader wallet API exposes several REST endpoints. Each one serves a specific part of the trading data pipeline.

GET /v2/leaderboard/{window}

Returns the top traders ranked by PnL over a time window (24h, 7d, or 30d). This is the fastest way to discover high-performing traders.

Request:

GET https://api.fomoapi.io/v2/leaderboard/24h?limit=50

Response:

{
  "window": "24h",
  "traders": [
    {
      "user_id": "12345",
      "handle": "traderA",
      "pnl": 85000.00,
      "rank": 1
    },
    {
      "user_id": "67890",
      "handle": "traderB",
      "pnl": 72000.00,
      "rank": 2
    }
  ]
}

You can see the live trader leaderboard to explore real rankings before you write any code.

GET /v2/users/{handle}

Resolves a handle to wallets and returns aggregated stats. This is your entry point for any trader-specific query.

Request:

GET https://api.fomoapi.io/v2/users/traderhandle

Response includes:

  • User ID and handle
  • Solana and EVM wallet addresses
  • 24h, 7d, and 30d PnL
  • Current rank in each leaderboard window

GET /v2/users/{handle}/positions

Returns the available trade history for a trader. Each trade record includes token address, buy or sell, amount, price, timestamp, and realized PnL.

Request:

GET https://api.fomoapi.io/v2/users/12345/positions?limit=100

Response:

{
  "trades": [
    {
      "trade_id": "abc123",
      "token": "0xDEF...",
      "side": "buy",
      "amount": 1000,
      "price_usd": 0.05,
      "timestamp": "2025-01-15T10:30:00Z",
      "chain": "base"
    },
    {
      "trade_id": "xyz789",
      "token": "0xDEF...",
      "side": "sell",
      "amount": 1000,
      "price_usd": 0.12,
      "timestamp": "2025-01-15T14:00:00Z",
      "chain": "base",
      "realized_pnl": 70.00
    }
  ]
}

This endpoint is critical for backtesting, performance analysis, and building copy-trading logic.

GET /v2/users/{id}/balances

Returns current token holdings for a trader across all chains.

Request:

GET https://api.fomoapi.io/v2/users/12345/balances

Response:

{
  "balances": [
    {
      "token": "0xABC...",
      "symbol": "TOKEN",
      "amount": 5000,
      "value_usd": 250.00,
      "chain": "ethereum"
    },
    {
      "token": "7xKXt...",
      "symbol": "SOL",
      "amount": 10,
      "value_usd": 2300.00,
      "chain": "solana"
    }
  ]
}

This is how you build live portfolio views or detect when a trader enters or exits a position.

GET /token/{address}/holders

Returns the list of traders who hold a specific token, sorted by holdings.

Request:

GET https://api.fomoapi.io/token/0xDEF.../holders?limit=20

Response:

{
  "token": "0xDEF...",
  "holders": [
    {
      "user_id": "12345",
      "handle": "traderA",
      "amount": 100000,
      "value_usd": 5000.00
    },
    {
      "user_id": "67890",
      "handle": "traderB",
      "amount": 50000,
      "value_usd": 2500.00
    }
  ]
}

This endpoint powers social sentiment analysis: if top traders are accumulating a token, you want to know about it.

You can explore all API endpoints in the full documentation.

Real-Time WebSocket Feed for Live Trades

A verified trading data API is not complete without real-time updates. The WebSocket feed pushes trade events as FOMO publishes them, so you can react immediately.

Connecting to the WebSocket

const ws = new WebSocket('wss://api.fomoapi.io/ws/alerts?key=YOUR_KEY');

ws.onopen = () => {
  console.log('Connected to fomoapi.io WebSocket');
};

ws.onmessage = (event) => {
  const trade = JSON.parse(event.data);
  console.log('New trade:', trade);
};

Event Structure

Each message is a JSON object with the same fields as the REST /trades endpoint:

{
  "event": "trade",
  "user_id": "12345",
  "handle": "traderA",
  "token": "0xDEF...",
  "side": "buy",
  "amount": 2000,
  "price_usd": 0.08,
  "timestamp": "2025-01-15T15:45:00Z",
  "chain": "base"
}

You can filter events client-side or subscribe to specific traders or tokens (check the docs for subscription options).

Real-time feeds are essential for copy-trading bots, live dashboards, and alert systems. End-to-end delivery time varies by stream, chain, confirmation state, network conditions, and client execution. Measure the stream you use and alert on observed delay instead of assuming a fixed bound.

Solana and EVM Chain Support

An on-chain trading history API must cover the chains where traders are active. fomoapi.io indexes six chains:

Chain Type Notes
Solana Non-EVM Native SOL and SPL tokens
Ethereum EVM Mainnet
Base EVM Coinbase L2
BSC EVM Binance Smart Chain
(Two more) EVM Additional EVM networks

Each trader has one Solana wallet and one EVM wallet. The EVM wallet is used across all EVM chains, so a single address gives you Ethereum, Base, and BSC activity.

Why This Matters

Traders do not stay on one chain. A trader might buy a memecoin on Solana in the morning and trade a Base token in the afternoon. If your API only covers one chain, you miss half the picture.

Cross-chain aggregation means you get a complete view of a trader's performance without running multiple indexers or stitching data together yourself. The API handles chain-specific RPC calls, transaction parsing, and token price lookups.

On-Chain Wallet Data vs. Self-Reported Metrics

Most trading leaderboards rely on self-reported PnL. A trader submits a screenshot or manually enters their gains, and the platform displays it. This creates two problems:

  1. Manipulation: traders can cherry-pick winning trades or fabricate numbers.
  2. Incompleteness: you do not see the available trade history, only what the trader chooses to share.

An on-chain data API solves this by handing you the address behind the handle. Every trade is a transaction with a timestamp, token amount, and price, so the record is:

  • Complete, because a wallet cannot show you only its good days.
  • Timestamped, so entries and exits are in order.
  • Permanent, because settled transactions are not editable.
  • Yours to check, against any block explorer.

That is the useful part. If a trader claims a 500% gain, you can go and look.

Trade-Offs

Wallet-level data is slower to index than self-reported data. It requires running full nodes, indexing every block, and maintaining a price feed for thousands of tokens. But the payoff is trust: your users know the leaderboard is real.

For copy-trading bots, this is non-negotiable. You cannot risk following a trader who faked their track record.

Pricing, Rate Limits, and Free Tier

Every data request requires an API key. Create a free key in the dashboard, then send authorization: Bearer YOUR_API_KEY.

Usage is metered in credits, and endpoints have different costs. A monthly credit allowance is not a fixed number of requests. See the pricing page for current credit allowances, endpoint costs, subscriptions, and optional prepaid payment methods. Use the API reference for response headers and rate limits.

The app-feed stream at /ws/alerts is separate from the on-chain stream at /ws/trades. Free keys receive an initial realtime app-feed trial, followed by a delay; paid keys receive the realtime app feed. The on-chain stream requires Growth or Scale. See the docs for current timing and access rules.

Getting Started with fomoapi.io

To start using the API:

  1. Get an API key: create a free key in the dashboard. Every data call requires your key.
  2. Read the docs: visit fomoapi.io and click the documentation link.
  3. Test an endpoint: try GET /v2/leaderboard/24h to see live data.
  4. Build your first query: resolve a trader handle with GET /v2/users/{handle}.
  5. Connect to WebSocket: open /ws/alerts on any plan, or upgrade to Growth for the on-chain /ws/trades.

The API returns JSON for all endpoints. Authentication is via an apikey query parameter or an Authorization: Bearer YOUR_KEY header.

If you are building a trading bot, start with the leaderboard to find high-performing traders, then use the /trades endpoint to backtest their strategies. If you are building a dashboard, use /balances and the WebSocket feed to show live portfolio updates.

fomoapi.io handles the hard parts (chain indexing, wallet resolution, PnL calculation) so you can focus on building features your users care about. For access or questions, reach out at t.me/eulatxt.

Ship on fomo.family trader data

Both-chain wallets, PnL and holdings, plus two live streams: the app feed on every plan, the on-chain stream on Growth. One API.

Get an API key

FAQ

What is a FOMO trading API?
A FOMO trading API provides programmatic access to social trading data, including verified trader wallets, PnL, holdings, and trade history. It resolves social handles (Twitter, Telegram) to on-chain addresses across multiple blockchains, then serves real wallet data through REST endpoints and WebSocket feeds. This lets developers build leaderboards, copy-trading tools, portfolio trackers, and analytics dashboards without scraping or manual wallet lookups. The API aggregates data from Solana and EVM chains, delivering a unified view of any trader's activity.
How does fomoapi.io verify trader wallets?
fomoapi.io resolves each social handle to the on-chain wallets behind it, and returns PnL, trades, and holdings against those addresses. A wallet's history cannot be edited after the fact, so the trades behind a record stay checkable. The service resolves a handle to both Solana and EVM addresses, so every swap, transfer, and balance change is on a ledger you can read. That removes the self-reported stats and ensures that leaderboard rankings reflect actual performance, not inflated claims.
Which blockchains does the FOMO trading API support?
fomoapi.io supports six chains: Solana, Ethereum, Base, BSC (Binance Smart Chain), and two additional EVM networks. This coverage spans the majority of DeFi and memecoin trading volume. The API resolves a single social handle to wallets on both Solana and EVM simultaneously, so you get a complete cross-chain view of any trader's activity. All endpoints return unified data structures regardless of the underlying chain, simplifying multi-chain integrations.
Can I get real-time trade data via WebSocket?
Yes. fomoapi.io offers a WebSocket endpoint at wss://api.fomoapi.io/ws/alerts that streams live trade events as FOMO publishes them. You subscribe to specific traders or tokens and receive JSON payloads for every swap, buy, or sell in real time. This is useful for building live dashboards, trade alerts, or copy-trading bots that want events pushed rather than polled. The WebSocket feed complements the REST endpoints, which serve historical and aggregated data.
What's the difference between verified and self-reported trading data?
A wallet's transaction history is public and cannot be altered after the fact. Self-reported data relies on traders manually entering their PnL or linking wallets, which opens the door to inflated stats, cherry-picked trades, or outright fabrication. fomoapi.io uses only on-chain wallet data by indexing real on-chain activity tied to social handles. This means leaderboards and track records reflect actual wallet performance, not what a trader claims. For any application where trust matters, on-chain wallet data is the only reliable source.
How do I resolve a Twitter handle to on-chain wallets?
Use the GET /v2/users/{handle} endpoint, passing the Twitter or Telegram handle as the path parameter. The response includes both Solana and EVM wallet addresses associated with that handle, plus aggregated PnL, traded volume, and trade count. For example, GET /v2/users/elonmusk returns all linked wallets and trading stats. This single call replaces manual wallet lookups and gives you a complete cross-chain profile. The endpoint works for any handle indexed by fomoapi.io.
Does fomoapi.io offer a free tier?
Yes. Create a free API key at https://fomoapi.io/dashboard and send it as authorization: Bearer YOUR_API_KEY. Data endpoints, including leaderboards, profiles, and trades, require a key. The free plan has a monthly credit allowance, and each endpoint has a credit cost. See https://fomoapi.io/pricing for current allowances and https://fomoapi.io/docs for rate limits and stream access.
What rate limits apply to the REST endpoints?
See https://fomoapi.io/docs for current per-key rate limits and response headers. Monthly usage is metered in credits, with a different cost for each endpoint; see https://fomoapi.io/pricing. Handle HTTP 429 responses by backing off rather than retrying immediately.
How do I get an API key for fomoapi.io?
Create a free API key at https://fomoapi.io/dashboard. Include authorization: Bearer YOUR_API_KEY with every data request. You do not need to contact support to create a standard data API key. Public information endpoints such as /health and /v1 are exceptions; data feeds and cached leaderboards still require authentication.
Can I query token holders and ownership graphs?
Yes. The GET /token/{address}/holders endpoint returns a list of wallets holding a specific token, along with each holder's balance and associated social handle (if known). This builds a who-holds-what ownership graph, useful for identifying whale wallets, tracking token distribution, or finding influential traders in a given asset. The endpoint works across all supported chains, so you can map holder networks for any Solana or EVM token indexed by fomoapi.io.