sandbox-quant 1.0.8

Exchange-truth trading core for Binance Spot and Futures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::domain::exposure::Exposure;

#[derive(Debug, Clone, Copy, PartialEq)]
pub struct TargetNotional {
    pub target_usdt: f64,
}

pub fn exposure_to_notional(exposure: Exposure, equity_usdt: f64) -> TargetNotional {
    TargetNotional {
        target_usdt: exposure.value() * equity_usdt,
    }
}