hyperliquid_backtest/
backtest.rs

1use chrono::{DateTime, FixedOffset};
2
3/// Minimal representation of a funding payment used in tests and simplified workflows.
4#[derive(Debug, Clone, PartialEq)]
5pub struct FundingPayment {
6    /// Timestamp of the payment.
7    pub timestamp: DateTime<FixedOffset>,
8    /// Position size in contracts at the time of the payment.
9    pub position_size: f64,
10    /// Funding rate that was applied for the interval.
11    pub funding_rate: f64,
12    /// Amount paid or received because of funding. Positive values represent income.
13    pub payment_amount: f64,
14    /// Mark price when the payment was settled.
15    pub mark_price: f64,
16}