Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  • Connect to multiple exchanges via WebSocket APIs to stream real-time price data
  • Connect to REST APIs (for fallback / metadata)
  • Track only tokens listed on at least two exchanges (to allow arbitrage)
  • Stream prices from exchange WebSockets.
  • Periodically or on request, fetch all prices from Redis for a token

Calculate:

  • Absolute difference from the highest price.
  • Percentage difference from the highest price.
  • Optional: full pairwise differences if needed.

WS for Client:

  • Every N seconds: Collect prices from Redis; Compute and format arbitrage opportunities; Send structured data (JSON) to the connected clients.

Cronjob:

  • Cleanup or update stale data

Error Handling:

  • Gracefully handle WebSocket disconnections (auto-reconnect every 24h or on drop).
  • Handle exchanges WebSocket ping/pong, errors, messages and etc.
  • Handle Redis connection errors.

Public API Endpoints:

  • /prices: Returns latest price data from Redis for all or specific tokens.
  • /tokens: Returns a list of available tokens (e.g., those present on 2+ exchanges)
  • /arbitrage: Returns calculated arbitrage opportunities.
  • /alerts: Returns alerts for significant price changes.
  • /health: Returns service health status.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages