hardcoded leverage to Bitfinex connector response

This commit is contained in:
Giulio De Pasquale 2021-02-22 00:24:27 +00:00
parent 20b838f635
commit a73e59e0e3

View File

@ -201,6 +201,11 @@ impl ActiveOrder {
self
}
pub fn with_leverage(mut self, leverage: Option<f64>) -> Self {
self.order_form = self.order_form.with_leverage(leverage);
self
}
pub fn exchange(&self) -> Exchange {
self.exchange
}
@ -244,6 +249,22 @@ impl PartialEq for ActiveOrder {
impl Eq for ActiveOrder {}
impl Clone for ActiveOrder {
fn clone(&self) -> Self {
Self {
exchange: self.exchange,
id: self.id,
group_id: self.group_id,
client_id: self.client_id,
pair: self.pair.clone(),
order_form: self.order_form.clone(),
creation_timestamp: self.creation_timestamp,
update_timestamp: self.update_timestamp,
strategy: self.strategy.as_ref().map(|x| clone_box(&**x))
}
}
}
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum TradingPlatform {
Exchange,