Skip to content

Commit 8907cd9

Browse files
committed
adjust mkOrder output price to preserve total quote money amount spent
1 parent ff95fbe commit 8907cd9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pub/bfx/src/Bfx.hs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,11 @@ mkOrder args = do
586586
{ SubmitOrder.buyOrSell = bos,
587587
SubmitOrder.baseAmount = grossBaseAmt,
588588
SubmitOrder.symbol = sym,
589-
SubmitOrder.rate = price,
589+
SubmitOrder.rate =
590+
QuotePerBase
591+
$ unQuotePerBase price
592+
* unMoneyAmount netBaseAmt
593+
/ unMoneyAmount grossBaseAmt,
590594
SubmitOrder.options = SubmitOrder.optsDef
591595
}
592596
where

0 commit comments

Comments
 (0)