Calculate price slippage more reliably and allow specifying order type and time in force

This commit is contained in:
2022-11-15 07:20:17 +00:00
parent c8f776e2a8
commit 5c68191e5b
8 changed files with 176 additions and 43 deletions

View File

@@ -54,7 +54,7 @@ class OANDAExchange(BaseExchange):
# "price": "1.5000", - added later
"stopLossOnFill": {"timeInForce": "GTC", "price": str(trade.stop_loss)},
"takeProfitOnFill": {"price": str(trade.take_profit)},
"timeInForce": "GTC",
"timeInForce": trade.time_in_force.upper(),
"instrument": trade.symbol,
"units": str(amount),
"type": trade.type.upper(),