hardcoded leverage to Bitfinex connector response
This commit is contained in:
		
							parent
							
								
									20b838f635
								
							
						
					
					
						commit
						a73e59e0e3
					
				| @ -201,6 +201,11 @@ impl ActiveOrder { | |||||||
|         self |         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 { |     pub fn exchange(&self) -> Exchange { | ||||||
|         self.exchange |         self.exchange | ||||||
|     } |     } | ||||||
| @ -244,6 +249,22 @@ impl PartialEq for ActiveOrder { | |||||||
| 
 | 
 | ||||||
| impl Eq 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)] | #[derive(Debug, Clone, Copy, Eq, PartialEq)] | ||||||
| pub enum TradingPlatform { | pub enum TradingPlatform { | ||||||
|     Exchange, |     Exchange, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user