8000 GitHub - blueogin/trade-data-collector: It is a Rust-based application that collects and exports trade order events from Ethereum-based DEX contracts into a CSV file for analysis.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

It is a Rust-based application that collects and exports trade order events from Ethereum-based DEX contracts into a CSV file for analysis.

Notifications You must be signed in to change notification settings

blueogin/trade-data-collector

Repository files navigation

Trade Data Collector

The Trade Data Collector is a Rust-based application designed to collect and export trade order events from a specified Ethereum-based decentralized exchange (DEX) contract which has IOrderBookV4.json as it's abi. It connects to the blockchain using a WebSocket RPC connection and listens for contract events, such as TakeOrderV2 and ClearV2, that collects all orders actions on a DEX. The collected events are then written to a CSV file for further analysis.

Features

  • Connects to Ethereum networks using WebSocket RPC.
  • Collects order-related events from smart contracts.
  • Supports filtering events by type (TakeOrderV2, ClearV2, etc.).
  • Exports collected events to a CSV file.
  • Configurable network and contract address via command-line arguments.
  • Supports multiple Ethereum networks (Mainnet, Arbitrum, Optimism, etc.).

Prerequisites

  • Rust 1.58 or higher.
  • WebSocket RPC URL for the Ethereum network you want to connect to.
  • Etherscan API key for fetching contract creation blocks (optional).
  • ABI JSON file for the contract you want to track events from(README.md).

Installation

  1. Clone the repository:

    git clone git@github.com:blueogin/trade-data-collector.git
    cd trade-data-collector
  2. Set up environment variables:

    • Create a .env file in the project root directory by referencing .env.example file.

    • Replace YOUR_INFURA_PROJECT_ID with your Infura or Alchemy WebSocket RPC URL.

  3. Install dependencies:

    cargo build --release

Usage

Run the application with the desired options using the following command format:

cargo run -- --network <NETWORK> --contract <CONTRACT_ADDRESS> --event <EVENT_TYPE>

You can find result in order_events.csv.

About

It is a Rust-based application that collects and exports trade order events from Ethereum-based DEX contracts into a CSV file for analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0