示例#1
0
 def _buildOrder(self, price, amount):
     jsonDict = {
         'id': self.__nextOrderId,
         'datetime': str(datetime.datetime.now()),
         'type': 0 if amount > 0 else 1,
         'price': str(price),
         'amount': str(abs(amount)),
     }
     self.__nextOrderId += 1
     return httpclient.Order(jsonDict)
示例#2
0
 def getOpenOrders(self):
     return [httpclient.Order(jsonDict) for jsonDict in self.__openOrders]