npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

arbitrage-loader-cryptoscan

v1.0.0

Published

A real-time cryptocurrency arbitrage detection system that monitors price differences between various exchanges (CEX and DEX) and identifies profitable trading opportunities.

Downloads

67

Readme

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

Current Price: $360 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

# Clone the repository
git clone [repository-url]

# Install dependencies
bun install

Usage

Starting the Server

bun start

The server will start on port 3000 by default.

WebSocket API

Connect to the WebSocket server to receive real-time arbitrage opportunities:

Basic Connection

wscat -c ws://localhost:3000/

Filtered Connection with Thresholds

Connect and set spread thresholds to receive only specific opportunities:

# Connect and send threshold configuration
wscat -c ws://localhost:3000/

Setting Spread Thresholds

Send a JSON message after connection to configure spread thresholds:

{
  "thresholds": {
    "spread": {
      "min": 0.1,
      "max": 10
    }
  }
}

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%):

wscat -c ws://localhost:3000/listen

Architecture

Core Components

  1. Price Listeners

    • listenCexPrices: Monitors centralized exchange prices
    • listenDexPrices: Monitors decentralized exchange prices
  2. Arbitrage Detectors

    • listenCexArbitrage: Detects arbitrage between centralized exchanges
    • listenDexCexArbitrage: Detects arbitrage between DEX and CEX
  3. WebSocket Server

    • Handles real-time client connections
    • Manages spread thresholds
    • Broadcasts arbitrage opportunities

Configuration

Key constants in constants.ts:

SPREAD_CHANGE_TRIGGER = 0.05  // Minimum spread change to trigger notification (5%)

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:

{
  exchangeFrom: string;    // Source exchange
  exchangeTo: string;      // Destination exchange
  symbol: string;         // Trading pair symbol
  priceFrom: string;      // Buy price
  priceTo: string;        // Sell price
  spread: number;         // Percentage profit potential
}

Dependencies

  • bignumber.js: Precise numerical calculations
  • hono: Web framework
  • ws: WebSocket client
  • @javeoff/ws-reconnect: WebSocket reconnection handling
  • cryptoscan-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