mirror of
https://github.com/exchanges-lab/tradesync.git
synced 2026-08-06 05:34:49 +08:00
refactor: rename project to tradesync and update docker image tags to latest
This commit is contained in:
+3
-1
@@ -22,9 +22,11 @@
|
|||||||
- 添加外部参考库作为 Git 子模块:`noc` (notion-client) 与 `hype` (hyperliquid-rust-sdk)。
|
- 添加外部参考库作为 Git 子模块:`noc` (notion-client) 与 `hype` (hyperliquid-rust-sdk)。
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- 将项目与 Crate 命名从 `nosync` 统一重命名为 `tradesync`,并同步更新了所有 Rust 源码包导入和 Docker 镜像名称。
|
||||||
|
- 更新 Docker Compose 配置,移除了 `tradesnap` 和 `tradesync` (原 `nosync`)多余的 volumes 目录挂载,并统一使用 `:latest` 镜像标签以替代固定版本。
|
||||||
- 移除 `Level` 字段的相关计算与 Notion 写入逻辑(交由用户后续手动设置)。
|
- 移除 `Level` 字段的相关计算与 Notion 写入逻辑(交由用户后续手动设置)。
|
||||||
- 重构 `src/main.rs`,实现从 Hyperliquid WebSocket 捕获开仓事件并自动格式化写入 Notion Database 的闭环服务。
|
- 重构 `src/main.rs`,实现从 Hyperliquid WebSocket 捕获开仓事件并自动格式化写入 Notion Database 的闭环服务。
|
||||||
- 将 `hyperliquid_rust_sdk` 与 `notion-client` 依赖方式更改为指向官方 Git 仓库的远程依赖,移除本地 Path 依赖。
|
- 将 `hyperliquid_rust_sdk` 与 `notion-client` 依赖方式更改为指向官方 Git 仓库 of 远程依赖,移除本地 Path 依赖。
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- 移除初始化模版中未使用的占位模块 (`ModuleA`, `ModuleB`) 及其对应测试文件。
|
- 移除初始化模版中未使用的占位模块 (`ModuleA`, `ModuleB`) 及其对应测试文件。
|
||||||
|
|||||||
Generated
+19
-19
@@ -2963,25 +2963,6 @@ dependencies = [
|
|||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "nosync"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"alloy 2.0.5",
|
|
||||||
"anyhow",
|
|
||||||
"chrono",
|
|
||||||
"dotenvy",
|
|
||||||
"hyperliquid_rust_sdk",
|
|
||||||
"notion-client",
|
|
||||||
"reqwest 0.13.4",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"thiserror 2.0.18",
|
|
||||||
"tokio",
|
|
||||||
"tracing",
|
|
||||||
"tracing-subscriber",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notion-client"
|
name = "notion-client"
|
||||||
version = "1.1.1"
|
version = "1.1.1"
|
||||||
@@ -4770,6 +4751,25 @@ dependencies = [
|
|||||||
"tracing-log",
|
"tracing-log",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tradesync"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"alloy 2.0.5",
|
||||||
|
"anyhow",
|
||||||
|
"chrono",
|
||||||
|
"dotenvy",
|
||||||
|
"hyperliquid_rust_sdk",
|
||||||
|
"notion-client",
|
||||||
|
"reqwest 0.13.4",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"thiserror 2.0.18",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
"tracing-subscriber",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "try-lock"
|
name = "try-lock"
|
||||||
version = "0.2.5"
|
version = "0.2.5"
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "nosync"
|
name = "tradesync"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# nosync
|
# tradesync
|
||||||
|
|
||||||
An efficient, decoupled Hyperliquid wallet position monitor and Notion database logger.
|
An efficient, decoupled Hyperliquid wallet position monitor and Notion database logger.
|
||||||
|
|
||||||
## 1. Introduction
|
## 1. Introduction
|
||||||
`nosync` is a real-time wallet position monitoring and analysis tool built with Rust. It subscribes to a specified Hyperliquid wallet address via WebSockets, captures position-opening trades in real-time, aggregates multi-tick partial fills of a single order (using a 500ms debounce aggregation mechanism), and automatically synchronizes the formatted trade data to a Notion database.
|
`tradesync` is a real-time wallet position monitoring and analysis tool built with Rust. It subscribes to a specified Hyperliquid wallet address via WebSockets, captures position-opening trades in real-time, aggregates multi-tick partial fills of a single order (using a 500ms debounce aggregation mechanism), and automatically synchronizes the formatted trade data to a Notion database.
|
||||||
|
|
||||||
## 2. Key Features
|
## 2. Key Features
|
||||||
* **Real-time Wallet Subscription**: Uses `hyperliquid-rust-sdk` to establish a persistent WebSocket connection to the wallet's `UserEvents`, sensing position changes at millisecond latency.
|
* **Real-time Wallet Subscription**: Uses `hyperliquid-rust-sdk` to establish a persistent WebSocket connection to the wallet's `UserEvents`, sensing position changes at millisecond latency.
|
||||||
@@ -17,7 +17,7 @@ An efficient, decoupled Hyperliquid wallet position monitor and Notion database
|
|||||||
The directory structure and modules are as follows:
|
The directory structure and modules are as follows:
|
||||||
|
|
||||||
```
|
```
|
||||||
nosync/
|
tradesync/
|
||||||
├── src/
|
├── src/
|
||||||
│ ├── lib.rs # Unified module exports
|
│ ├── lib.rs # Unified module exports
|
||||||
│ ├── structs.rs # Data models and event definitions (e.g., NotionRowData)
|
│ ├── structs.rs # Data models and event definitions (e.g., NotionRowData)
|
||||||
@@ -46,8 +46,8 @@ nosync/
|
|||||||
## 5. Getting Started
|
## 5. Getting Started
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone https://github.com/cathiefish/nosync.git
|
git clone https://github.com/cathiefish/tradesync.git
|
||||||
cd nosync
|
cd tradesync
|
||||||
|
|
||||||
# Copy and configure environment variables
|
# Copy and configure environment variables
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
@@ -64,10 +64,10 @@ cargo run --example demo
|
|||||||
```
|
```
|
||||||
|
|
||||||
## 6. Code Example
|
## 6. Code Example
|
||||||
A minimal running example for the monitor is located at [examples/demo.rs](file:///home/cathiefish/App/nosync/examples/demo.rs):
|
A minimal running example for the monitor is located at [examples/demo.rs](file:///home/cathiefish/App/tradesync/examples/demo.rs):
|
||||||
```rust
|
```rust
|
||||||
use alloy::primitives::address;
|
use alloy::primitives::address;
|
||||||
use nosync::HyperliquidMonitor;
|
use tradesync::HyperliquidMonitor;
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
@@ -123,4 +123,4 @@ cargo test
|
|||||||
```
|
```
|
||||||
|
|
||||||
## 9. Changelog
|
## 9. Changelog
|
||||||
For a detailed log of project updates, please refer to [CHANGELOG.md](file:///home/cathiefish/App/nosync/CHANGELOG.md).
|
For a detailed log of project updates, please refer to [CHANGELOG.md](file:///home/cathiefish/App/tradesync/CHANGELOG.md).
|
||||||
|
|||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
nosync:
|
tradesync:
|
||||||
image: ghcr.io/exchanges-lab/nosync:v1.0
|
image: ghcr.io/exchanges-lab/tradesync:latest
|
||||||
container_name: nosync
|
container_name: tradesync
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
use alloy::primitives::address;
|
use alloy::primitives::address;
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use nosync::HyperliquidMonitor;
|
use tradesync::HyperliquidMonitor;
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
use tracing_subscriber::{EnvFilter, FmtSubscriber};
|
use tracing_subscriber::{EnvFilter, FmtSubscriber};
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
use anyhow::{Context, Result};
|
use anyhow::{Context, Result};
|
||||||
use chrono::{TimeZone, Utc};
|
use chrono::{TimeZone, Utc};
|
||||||
use dotenvy::dotenv;
|
use dotenvy::dotenv;
|
||||||
use nosync::{HyperliquidMonitor, NotionRowData, NotionWriter};
|
use tradesync::{HyperliquidMonitor, NotionRowData, NotionWriter};
|
||||||
use std::env;
|
use std::env;
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
use tracing::{error, info};
|
use tracing::{error, info};
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use alloy::primitives::address;
|
use alloy::primitives::address;
|
||||||
use nosync::HyperliquidMonitor;
|
use tradesync::HyperliquidMonitor;
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
use tokio::time::{Duration, timeout};
|
use tokio::time::{Duration, timeout};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user