Rugplay Logger

A powerful TypeScript WebSocket client for real-time logging and exporting of Rugplay trading events with support for file exports and Discord notifications.

Quick Start View on GitHub


Features

  • Real-time WebSocket Connection: Connect to Rugplay’s WebSocket API for live trading data
  • Event Logging: Comprehensive logging of all trading events with timestamps
  • Multiple Export Formats: Export data to JSON, YAML, or CSV formats
  • Discord Integration: Send trading alerts directly to Discord via webhooks
  • Auto-reconnection: Robust connection handling with automatic reconnection
  • TypeScript Support: Full TypeScript implementation with type safety
  • Event-driven Architecture: Subscribe to specific events with custom handlers
  • Dark Mode Support: Toggle between light and dark themes for comfortable viewing

Quick Start

Installation

# Clone the repository
git clone https://github.com/your-repo/rugplay-logger.git
cd rugplay-logger

# Install dependencies
npm install

# Build the project
npm run build

# Run the logger
npm start

Basic Usage

import { RugplayClient } from './src/client/RugplayClient';
import { webSocketConfig } from './src/configuration/websocket';
import { exportConfig } from './src/configuration/export';

// Create client with auto-connect
const client = new RugplayClient({
    config: webSocketConfig,
    exportConfig: exportConfig,
    autoConnect: true,
    debug: false
});

// Listen for trade events
client.on('trade', (data) => {
    console.log('New trade:', data);
});

// Listen for price updates
client.on('price', (data) => {
    console.log('Price update:', data);
});

Project Structure

src/
β”œβ”€β”€ client/           # WebSocket client implementation
β”œβ”€β”€ configuration/    # Configuration files
β”œβ”€β”€ logger/          # Event logging system
β”œβ”€β”€ types/           # TypeScript type definitions
β”œβ”€β”€ index.ts         # Main entry point
└── sdk.ts           # SDK exports

docs/                # Documentation (Jekyll)
exports/             # Generated export files
tests/               # Test files

Documentation


License

This project is licensed under the GNU License. See the LICENSE file for details.


Copyright © 2025 Gir0fa. Distributed under the GNU License.