feat: implement NotionWriter database insertion and wire it with HyperliquidMonitor

This commit is contained in:
0xcathiefish
2026-05-30 09:35:36 +00:00
parent e721988984
commit d86b03f3bb
8 changed files with 324 additions and 13 deletions
+15
View File
@@ -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
}