Example #1
0
 def sync_candle_minute15(self, market, exchange):
     self.logger.debug("get candles %s %s "%(market, str(exchange)))
     candles = self.afacade.get_candles_timeframe(market, exchange,self.acafade.TIMEFRAME_15MINUTE)
     n = exc.NAMES[exchange]
     [nom,denom] = models.market_parts(market)
     dt = datetime.datetime.utcnow()        
     dts = dt.strftime('%H:%M:%S')        
     self.db.candles.insert({"exchange":n,"market":market,"nom":n,"denom":d,"candles":candles,"interval": "1m", "time_insert":dts})
Example #2
0
 def sync_candle_daily(self, market, exchange):
     self.logger.debug("get candles %s %s " % (market, str(exchange)))
     candles = self.afacade.get_candles_timeframe(
         market, exchange, self.acafade.TIMEFRAME_DAILY)
     n = exc.NAMES[exchange]
     [nom, denom] = models.market_parts(market)
     self.db.candles.insert({
         "exchange": n,
         "market": market,
         "nom": nom,
         "denom": denom,
         "candles": candles,
         "interval": "1d"
     })