DEV Community

Cover image for Building Trading Applications with the Fomo API The Fomo API
Voren Tai
Voren Tai

Posted on

Building Trading Applications with the Fomo API The Fomo API

Building Trading Applications with the Fomo API The Fomo API provides programmatic access to structured social and blockchain trading data from the Fomo ecosystem.

The Fomo API provides programmatic access to structured social and blockchain trading data from the Fomo ecosystem. Developers can use the API to connect trader activity, wallet information, performance metrics, and transaction history with their own applications.

This makes it possible to build data-driven tools without manually collecting or normalizing information from multiple sources.

These resources can support portfolio monitoring, trader discovery, alert systems, research platforms, and automated analytics.

Getting Started

To begin, create an account at getfomoapi.fun and generate an API key from the developer dashboard.

API keys should be stored securely as environment variables:

export FOMO_API_KEY="fomo_live_YOUR_API_KEY"
Enter fullscreen mode Exit fullscreen mode

Each authenticated request must include the key:

curl "https://getfomoapi.fun/api/leaderboard/7d?limit=10" \
  -H "X-API-Key: $FOMO_API_KEY"
Enter fullscreen mode Exit fullscreen mode

The API also accepts Bearer authentication:

curl "https://getfomoapi.fun/api/leaderboard/7d?limit=10" \
  -H "Authorization: Bearer $FOMO_API_KEY"
Enter fullscreen mode Exit fullscreen mode

Example: Finding a Trader

Developers can resolve a Fomo handle and obtain the associated profile and wallet information:

import os
import requests

api_key = os.environ["FOMO_API_KEY"]
handle = "starcatcher444"

response = requests.get(
    f"https://getfomoapi.fun/api/users/{handle}",
    headers={"X-API-Key": api_key},
    timeout=30,
)

response.raise_for_status()
profile = response.json()["responseObject"]

print(profile.get("displayName"))
print(profile.get("solana"))
print(profile.get("evm"))
Enter fullscreen mode Exit fullscreen mode

The returned user ID can then be used to request additional information, including balances, positions, rankings, and swap activity.

Example: Monitoring Swaps

user_id = "USER_ID"

response = requests.get(
    f"https://getfomoapi.fun/api/users/{user_id}/swaps",
    headers={"X-API-Key": api_key},
    params={"limit": 20},
    timeout=30,
)

response.raise_for_status()
swap_data = response.json()

print(swap_data)
Enter fullscreen mode Exit fullscreen mode

Swap responses are normalized so that developers can process transaction activity more consistently across their applications.

Common Use Cases

The Fomo API can serve as the data layer for:

  1. Trader dashboards that display rankings, PnL, and holdings.
  2. Wallet trackers that monitor verified on-chain addresses.
  3. Trading alerts that notify users about notable swaps.
  4. Research tools that compare trader performance across time periods.
  5. Telegram bots that deliver market and trader updates.
  6. AI applications that analyze social and trading behavior.

What Can You Access?

Through the API, applications can retrieve:

  • Trader profiles and handles
  • Verified Solana and EVM wallet addresses
  • Performance leaderboards
  • Token balances and holdings
  • Profit and loss data
  • Swap history
  • Featured trades and social activity
  • Historical portfolio snapshots

Request Limits

API access is subject to a limit of five requests per second per API key. Applications should implement appropriate error handling and respect the Retry-After header when receiving a 429 Too Many Requests response.

Developers should also protect their credentials, validate returned data, and avoid using the API as the sole basis for financial decisions.

Developer Resources

Fomo API is an independent developer service and is not an official Fomo Family product. Trading data may be delayed, incomplete, or inaccurate.

Top comments (0)