- if self.action == "sell":
- # I have 10 BTC worth of FOO, and I want to sell 9 BTC worth of it
- # At rate 1 Foo = 0.1 BTC
- delta = delta_in_base
- # Action: "buy" "9 BTC" at rate "1/0.1" "FOO" on market
-
- # FIXME: Need to round up to the correct amount of FOO in case
- # we want to sell all
- else:
- delta = delta_in_base
- # I want to buy 9 / 0.1 FOO
- # Action: "sell" "9 BTC" at rate "1/0.1" "FOO" on "market"
-
- # FIXME: Need to round up to the correct amount of FOO in case
- # we want to use all BTC
-