mirror of
https://github.com/exchanges-lab/tradesync.git
synced 2026-08-07 05:54:42 +08:00
feat: implement NotionWriter database insertion and wire it with HyperliquidMonitor
This commit is contained in:
@@ -20,7 +20,22 @@ pub struct PositionTradeEvent {
|
||||
pub sz: String, // Trade size as string
|
||||
pub time: u64, // Epoch timestamp in milliseconds
|
||||
pub tid: u64, // Unique trade ID
|
||||
pub oid: u64, // Hyperliquid Order ID
|
||||
pub action: TradeAction,
|
||||
pub start_pos: String, // Position size before the trade
|
||||
pub end_pos: String, // Position size after the trade
|
||||
}
|
||||
|
||||
/// Represents the structured row data formatted for Notion database insertion.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct NotionRowData {
|
||||
pub symbol: String, // e.g., "BTCUSDC"
|
||||
pub quantity: String, // e.g., "0.02484"
|
||||
pub filled_price: String, // e.g., "72543"
|
||||
pub direction: String, // "Long" or "Short"
|
||||
pub exchange: String, // e.g., "Hyperliquid"
|
||||
pub date_time: String, // Format: "YYYY/MM/DD HH:MM"
|
||||
pub time: u64, // Unix timestamp in milliseconds
|
||||
pub order_id: u64, // Hyperliquid order ID (oid)
|
||||
pub check: bool, // false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user