Exemple #1
0
def create_data(coin, coin_list, start, end, period):
    polo = Poloniex()
    chart = get_chart_until_success(polo=polo,
                                    pair=coin_list.at[coin, 'pair'],
                                    start=start,
                                    end=end,
                                    period=period)
    for c in chart:
        if c["date"] > 0:
            if c['weightedAverage'] == 0: c['weightedAverage'] = c['close']

            # NOTE here the USDT is in reversed order
            if 'reversed_' in coin:
                c['low'], c['high'], c[
                    'open'] = 1.0 / c['low'], 1.0 / c['high'], 1.0 / c['open']
                c['close'], c['weightedAverage'] = 1.0 / c['close'], 1.0 / c[
                    'weightedAverage']
    return chart
Exemple #2
0
 def get_chart_until_success(self, pair, start, period, end):
     return get_chart_until_success(self._polo, pair, start, period, end)
Exemple #3
0
 def get_chart_until_success(self, pair, start, period, end):
     return get_chart_until_success(self._polo, pair, start, period, end)