Struct fxoanda::PositionFinancing
source · pub struct PositionFinancing {
pub instrument: Option<String>,
pub financing: Option<f32>,
pub open_trade_financings: Option<Vec<OpenTradeFinancing>>,
}
Fields§
§instrument: Option<String>
The instrument of the Position that financing is being paid/collected for. format: A string containing the base currency and quote currency delimited by a “_”.
financing: Option<f32>
The amount of financing paid/collected for the Position. format: A decimal number encoded as a string. The amount of precision provided depends on the Account’s home currency.
open_trade_financings: Option<Vec<OpenTradeFinancing>>
The financing paid/collecte for each open Trade within the Position.
Implementations§
source§impl PositionFinancing
impl PositionFinancing
pub fn new() -> PositionFinancing
sourcepub fn with_instrument(self, x: String) -> PositionFinancing
pub fn with_instrument(self, x: String) -> PositionFinancing
The instrument of the Position that financing is being paid/collected for. format: A string containing the base currency and quote currency delimited by a “_”.
- param String
- return PositionFinancing
sourcepub fn with_financing(self, x: f32) -> PositionFinancing
pub fn with_financing(self, x: f32) -> PositionFinancing
The amount of financing paid/collected for the Position. format: A decimal number encoded as a string. The amount of precision provided depends on the Account’s home currency.
- param f32
- return PositionFinancing
sourcepub fn with_open_trade_financings(
self,
x: Vec<OpenTradeFinancing>
) -> PositionFinancing
pub fn with_open_trade_financings( self, x: Vec<OpenTradeFinancing> ) -> PositionFinancing
The financing paid/collecte for each open Trade within the Position.
- param Vec
- return PositionFinancing