hardcoded leverage to Bitfinex connector response

This commit is contained in:
Giulio De Pasquale 2021-02-22 00:23:40 +00:00
parent 2aa9bcdb95
commit 20b838f635

View File

@ -361,7 +361,11 @@ impl Connector for BitfinexConnector {
let response =
BitfinexConnector::retry_nonce(|| self.bfx.orders.submit_order(&order_form)).await?;
Ok((&response).try_into()?)
// parsing response into ActiveOrder and adding leverage from order form
let order_response: ActiveOrder = (&response).try_into()?;
// TODO: CHANGEME!!!!
Ok(order_response.with_leverage(Some(15.0)))
}
async fn cancel_order(&self, order: &ActiveOrder) -> Result<ActiveOrder, BoxError> {