Esempio n. 1
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.tradeId, format_data + "Trade Id")
     PrintBasic.print_basic(self.ts, format_data + "Trade Time")
     PrintBasic.print_basic(self.price, format_data + "Price")
     PrintBasic.print_basic(self.amount, format_data + "Amount")
     PrintBasic.print_basic(self.direction, format_data + "Direction")
Esempio n. 2
0
    def print_object(self, format_data=""):
        from loex.utils.print_mix_object import PrintBasic
        PrintBasic.print_basic(self.ts, format_data + "UTC Time")
        PrintBasic.print_basic(self.version, format_data + "Version")
        if len(self.bids):
            i = 0
            print(format_data,
                  "---- Top " + str(len(self.bids)) + " bids ----")
            for entry in self.bids:
                i = i + 1
                print(
                    format_data,
                    str(i) + ": price: " + str(entry.price) + ", amount: " +
                    str(entry.amount))
                #print()

        if len(self.asks):
            i = 0
            print(format_data,
                  "---- Top " + str(len(self.asks)) + " asks ----")
            for entry in self.asks:
                i = i + 1
                print(
                    format_data,
                    str(i) + ": price: " + str(entry.price) + ", amount: " +
                    str(entry.amount))
Esempio n. 3
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.rep, format_data + "Channel")
     print()
     if len(self.data):
         for trade_detail in self.data:
             trade_detail.print_object()
             print()
Esempio n. 4
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.rep, format_data + "Channel")
     PrintBasic.print_basic(self.id, format_data + "Unix Time")
     print()
     if len(self.data):
         for row in self.data:
             row.print_object()
             print()
Esempio n. 5
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.ch, format_data + "Channel")
     PrintBasic.print_basic(self.id, format_data + "ID")
     PrintBasic.print_basic(self.ts, format_data + "Unix Time")
     if len(self.data):
         for trade_detail in self.data:
             trade_detail.print_object()
             print()
Esempio n. 6
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.ch, format_data + "Channel")
     self.tick.print_object("\t")
Esempio n. 7
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.price, format_data + "Price")
     PrintBasic.print_basic(self.amount, format_data + "Amount")
Esempio n. 8
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.id, format_data + "Id")
     #PrintBasic.print_basic(self.timestamp, format_data + "Unix Time")
     PrintBasic.print_basic(self.high, format_data + "High")
     PrintBasic.print_basic(self.low, format_data + "Low")
     PrintBasic.print_basic(self.open, format_data + "Open")
     PrintBasic.print_basic(self.close, format_data + "Close")
     PrintBasic.print_basic(self.count, format_data + "Count")
     PrintBasic.print_basic(self.amount, format_data + "Amount")
     PrintBasic.print_basic(self.vol, format_data + "Volume")
Esempio n. 9
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.ts, format_data + "Timestamp")
     PrintBasic.print_basic(self.rep, format_data + "Channel")
     self.data.print_object()
Esempio n. 10
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.amount, format_data + "Amount")
     PrintBasic.print_basic(self.count, format_data + "Count")
     PrintBasic.print_basic(self.open, format_data + "Opening Price")
     PrintBasic.print_basic(self.close, format_data + "Last Price")
     PrintBasic.print_basic(self.low, format_data + "Low Price")
     PrintBasic.print_basic(self.high, format_data + "High Price")
     PrintBasic.print_basic(self.vol, format_data + "Vol")
     PrintBasic.print_basic(self.symbol, format_data + "Trading Symbol")
     PrintBasic.print_basic(self.bid, format_data + "Best Bid Price")
     PrintBasic.print_basic(self.bidSize, format_data + "Best Bid Size")
     PrintBasic.print_basic(self.ask, format_data + "Best Ask Price")
     PrintBasic.print_basic(self.askSize, format_data + "Best Ask Size")
Esempio n. 11
0
    def print_object(self, format_data=""):
        from loex.utils.print_mix_object import PrintBasic
        PrintBasic.print_basic(self.ch, format_data + "Topic")

        orderupdate = self.data
        orderupdate.print_object()
Esempio n. 12
0
 def print_object(self, format_data=""):
     from loex.utils.print_mix_object import PrintBasic
     PrintBasic.print_basic(self.orderId, format_data + "Order Id")
     PrintBasic.print_basic(self.tradePrice, format_data + "Trade Price")
     PrintBasic.print_basic(self.tradeVolume, format_data + "Trade Volume")
     PrintBasic.print_basic(self.tradeId, format_data + "Trade Id")
     PrintBasic.print_basic(self.tradeTime, format_data + "Trade Timestamp")
     PrintBasic.print_basic(self.aggressor, format_data + "is Taker")
     PrintBasic.print_basic(self.orderStatus, format_data + "Order State")
     PrintBasic.print_basic(self.clientOrderId,
                            format_data + "Client Order Id")
     PrintBasic.print_basic(self.eventType, format_data + "Event Type")
     PrintBasic.print_basic(self.symbol, format_data + "Symbol")
     PrintBasic.print_basic(self.type, format_data + "Order Type")
     PrintBasic.print_basic(self.accountId, format_data + "Account Id")