Esempio n. 1
0
 def setUp(self):
     home_currency = "GBP"
     position_type = "short"
     currency_pair = "GBPUSD"
     units = Decimal("2000")
     ticker = TickerMock()
     self.position = Position(home_currency, position_type, currency_pair,
                              units, ticker)
Esempio n. 2
0
 def add_new_position(
     self, position_type, currency_pair, units, ticker
 ):
     ps = Position(
         self.home_currency, position_type, 
         currency_pair, units, ticker
     )
     self.positions[currency_pair] = ps
Esempio n. 3
0
 def add_new_position(self, side, market, units, exposure, add_price,
                      remove_price):
     ps = Position(side, market, units, exposure, add_price, remove_price)
     self.positions[market] = ps
Esempio n. 4
0
 def add_new_position(self, position_type, market, units, exposure, bid,
                      ask):
     ps = Position(position_type, market, units, exposure, bid, ask)
     self.positions[market] = ps