Tracking FNCS Tournament Data in Real-Time

How to build a live leaderboard for Fortnite competitive events using webhooks and the Cito API.

Author:
Cito Team

Building an FNCS Leaderboard

Fortnite Champion Series (FNCS) events are some of the most-watched esports competitions. In this tutorial, we'll build a real-time leaderboard that updates as games are played.

The Challenge

FNCS uses a points-based system across multiple games:

  • Victory Royale: 25 points
  • Eliminations: 1 point each
  • Placement points based on finish position

Tracking this in real-time requires constant API polling or webhooks.

Setting Up Webhooks

Webhooks push data to your server instantly when events occur:

JavaScript
// Webhook handler (Express.js)app.post('/webhook/fortnite', (req, res) => {  const { event, data } = req.body;   switch (event) {    case 'match.ended':      updateLeaderboard(data.results);      break;    case 'elimination':      incrementKills(data.player_id);      break;  }   res.status(200).send('OK');});

The Leaderboard Component

JSX
function FNCSLeaderboard({ tournamentId }) {  const [standings, setStandings] = useState([]);   // Subscribe to real-time updates  useEffect(() => {    const ws = new WebSocket('wss://api.citoapi.com/ws');     ws.onmessage = (event) => {      const update = JSON.parse(event.data);      if (update.tournament_id === tournamentId) {        setStandings(update.standings);      }    };     return () => ws.close();  }, [tournamentId]);   return (    <table>      <thead>        <tr>          <th>Rank</th>          <th>Player</th>          <th>Points</th>          <th>Elims</th>          <th>Wins</th>        </tr>      </thead>      <tbody>        {standings.map((player, i) => (          <tr key={player.id}>            <td>{i + 1}</td>            <td>{player.name}</td>            <td>{player.points}</td>            <td>{player.eliminations}</td>            <td>{player.victories}</td>          </tr>        ))}      </tbody>    </table>  );}

Caching Strategy

For high-traffic events:

  • Cache the full leaderboard in Redis
  • Update cache on webhook events
  • Serve cached data to clients
  • Use WebSocket for real-time updates
  • Conclusion

    Real-time FNCS leaderboards are engaging for viewers and relatively simple to build with the right API. Check out our Fortnite API documentation for more details.

    Start building with esports data today

    Free tier available. Same API shape across Call of Duty, Fortnite, LoL, Dota 2, and more.