Arbitrage Loader - Cryptoscan
A real-time cryptocurrency arbitrage detection system that monitors price differences between various exchanges (CEX and DEX) and identifies profitable trading opportunities.
Contacts: https://t.me/dan_cryptoscan
What you get:
Free setup into your hosting
Free help to integrate app to your server
Full access to the codebase and code updates
Free updates for app, you can request for free updates via access to issues
Full access to Project Time tracking by developers
Features
Real-time monitoring of cryptocurrency prices across multiple exchanges
Detection of arbitrage opportunities between:
CEX to CEX (Centralized Exchanges)
DEX to CEX (Decentralized to Centralized Exchanges)
Configurable spread thresholds for notifications
WebSocket API for real-time updates
Spread change triggers to minimize noise
Installation
Usage
Starting the Server
The server will start on port 3000 by default.
WebSocket API
Connect to the WebSocket server to receive real-time arbitrage opportunities:
Basic Connection
Filtered Connection with Thresholds
Connect and set spread thresholds to receive only specific opportunities:
Setting Spread Thresholds
Send a JSON message after connection to configure spread thresholds:
This will only show arbitrage opportunities with spreads between 0.1% and 10%.
Listen Endpoint
For a simplified connection with default thresholds (-999% to 999%):
Architecture
Core Components
Price Listeners
listenCexPrices
: Monitors centralized exchange priceslistenDexPrices
: Monitors decentralized exchange prices
Arbitrage Detectors
listenCexArbitrage
: Detects arbitrage between centralized exchangeslistenDexCexArbitrage
: Detects arbitrage between DEX and CEX
WebSocket Server
Handles real-time client connections
Manages spread thresholds
Broadcasts arbitrage opportunities
Configuration
Key constants in constants.ts
:
API Endpoints:
CEX Prices:
ALL_API_URL
DEX Prices:
DEX_PRICES_URL
WebSocket Prices:
LISTEN_CEX_PRICES_API
,LISTEN_DEX_PRICES_API
Message Format
Arbitrage opportunities are broadcast in the following format:
Dependencies
bignumber.js
: Precise numerical calculationshono
: Web frameworkws
: WebSocket client@javeoff/ws-reconnect
: WebSocket reconnection handlingcryptoscan-provider
: Price data provider
Development
The project is built with:
TypeScript
Bun runtime
WebSocket for real-time communications
BigNumber.js for precise calculations
License
ISC
Last updated