# Path: speculator/utils/poloniex.py
# def json_to_url(json, symbol):
# def chart_json(start, end, period, symbol):
# def parse_changes(json):
# def get_gains_losses(changes):
# def get_attribute(json, attr):
# def get_json_shift(year, month, day, unit, count, period, symbol):


from speculator.utils import poloniex
import unittest

# https://poloniex.com/public?command=returnChartData&currencyPair=USDT_BTC&start=1483228800&end=1483315200&period=86400

EXPECTED_RESPONSE = [{'close': 999.36463982,
                      'date': 1483228800,
                      'high': 1008.54999326,
                      'low': 957.02,
                      'open': 965.00000055,
                      'quoteVolume': 1207.33863593,
                      'volume': 1196868.2615889,
                      'weightedAverage': 991.32772361},
                     {'close': 1019.00000076,
                      'date': 1483315200,
                      'high': 1034.32896003,
                      'low': 994.00000044,
                      'open': 999.92218873,

# Path: speculator/utils/poloniex.py
# def json_to_url(json, symbol):
# def chart_json(start, end, period, symbol):
# def parse_changes(json):
# def get_gains_losses(changes):
# def get_attribute(json, attr):
# def get_json_shift(year, month, day, unit, count, period, symbol):


# Path: speculator/tests/integration/test_poloniex.py
from speculator.utils import poloniex
import unittest


# https://poloniex.com/public?command=returnChartData&currencyPair=USDT_BTC&start=1483228800&end=1483315200&period=86400

EXPECTED_RESPONSE = [{'close': 999.36463982,
                      'date': 1483228800,
                      'high': 1008.54999326,
                      'low': 957.02,
                      'open': 965.00000055,
                      'quoteVolume': 1207.33863593,
                      'volume': 1196868.2615889,
                      'weightedAverage': 991.32772361},
                     {'close': 1019.00000076,
                      'date': 1483315200,
                      'high': 1034.32896003,
                      'low': 994.00000044,
                      'open': 999.92218873,

                      'quoteVolume': 1818.58703006,