Example #1
0
 def requests(self):
     base_index = self._index
     self._index += 1
     return [
         stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % (base_index + index))
         for index in range(STREAM_LENGTH)
     ]
Example #2
0
 def requests(self):
     return [
         stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % index)
         for index in range(STREAM_LENGTH)
     ]
Example #3
0
 def request(self):
     symbol = SYMBOL_FORMAT % self._index
     self._index += 1
     return stock_pb2.StockRequest(symbol=symbol,
                                   num_trades_to_watch=STREAM_LENGTH)
Example #4
0
 def request(self):
     symbol = SYMBOL_FORMAT % self._index
     self._index += 1
     return stock_pb2.StockRequest(symbol=symbol)