# Path: nowtrade/data_connection.py
# class NoDataException(Exception):
# class DataConnection(object):
# class YahooConnection(DataConnection):
# class GoogleConnection(DataConnection):
# class OandaConnection(DataConnection):
# class ForexiteConnection(DataConnection):
# class MySQLConnection(DataConnection):
# class MongoDatabaseConnection(DataConnection):
#     def __init__(self):
#     def __str__(self):
#     def get_data(self, symbol, start, end):
#     def _request(self, url):
#     def get_data(self, symbol, start, end, symbol_in_column=True):
#     def get_ticks(self, symbol, period='15d', interval=60, symbol_in_column=True):
#     def __init__(self, account_id, access_token, environment='practice'):
#     def __str__(self):
#     def __repr__(self):
#     def get_data(self, symbol, granularity='H1', periods=5000, \
#                        realtime=False, symbol_in_column=True):
#     def get_data(self, start, end):
#     def __init__(self, host='localhost', port=3306, database='symbol_data', \
#                  username='root', password=''):
#     def get_data(self, symbol, start, end, volume=False,
#                  date_column='date', custom_cols=None):
#     def __init__(self, host='127.0.0.1', port=27017, database='symbol-data', \
#                  username=None, password=None):
#     def get_data(self, symbol, start, end, symbol_in_column=True):
#     def set_data(self, data_frame, symbols, volume=True, adj_close=True):
# def populate_mongo_day(symbols, start, end, database='symbol-data'):
# def populate_mongo_minute(symbols, period='15d', database='symbol-data-1min'):
# def populate_currency_minute(start, end, sleep=None, database='symbol-data-1min-currency'):
# def populate_oanda_currency(account_id, access_token, symbols, granularity='M5', \
#                             periods=5000, database='symbol-data-5min-currency'):
# def convert_1min_to_5min(db_name_1min, db_name_5min, symbols, start, end, volume=False):
# def convert_5min_to_15min(db_name_5min, db_name_15min, symbols, start, end, volume=False):
#     URL = "http://www.forexite.com/free_forex_quotes/%s/%s/%s%s%s.zip"


from nowtrade import data_connection
#!/usr/bin/python
# Updates a local mongo db with currency minute/hour data using the OandaConnection class.
ACCOUNT_ID = ''
ACCESS_TOKEN = ''
data_connection.populate_oanda_currency(ACCOUNT_ID, ACCESS_TOKEN, ['EUR_USD', 'USD_JPY', 'GBP_USD', 'USD_CAD', 'USD_CHF', 'AUD_USD'], granularity='M5', periods=5000, database='oanda-5min')

# Path: nowtrade/data_connection.py
# class NoDataException(Exception):
# class DataConnection(object):
# class YahooConnection(DataConnection):
# class GoogleConnection(DataConnection):
# class OandaConnection(DataConnection):
# class ForexiteConnection(DataConnection):
# class MySQLConnection(DataConnection):
# class MongoDatabaseConnection(DataConnection):
#     def __init__(self):
#     def __str__(self):
#     def get_data(self, symbol, start, end):
#     def _request(self, url):
#     def get_data(self, symbol, start, end, symbol_in_column=True):
#     def get_ticks(self, symbol, period='15d', interval=60, symbol_in_column=True):
#     def __init__(self, account_id, access_token, environment='practice'):
#     def __str__(self):
#     def __repr__(self):
#     def get_data(self, symbol, granularity='H1', periods=5000, \
#                        realtime=False, symbol_in_column=True):
#     def get_data(self, start, end):
#     def __init__(self, host='localhost', port=3306, database='symbol_data', \
#                  username='root', password=''):
#     def get_data(self, symbol, start, end, volume=False,
#                  date_column='date', custom_cols=None):
#     def __init__(self, host='127.0.0.1', port=27017, database='symbol-data', \
#                  username=None, password=None):
#     def get_data(self, symbol, start, end, symbol_in_column=True):
#     def set_data(self, data_frame, symbols, volume=True, adj_close=True):
# def populate_mongo_day(symbols, start, end, database='symbol-data'):
# def populate_mongo_minute(symbols, period='15d', database='symbol-data-1min'):
# def populate_currency_minute(start, end, sleep=None, database='symbol-data-1min-currency'):
# def populate_oanda_currency(account_id, access_token, symbols, granularity='M5', \
#                             periods=5000, database='symbol-data-5min-currency'):
# def convert_1min_to_5min(db_name_1min, db_name_5min, symbols, start, end, volume=False):
# def convert_5min_to_15min(db_name_5min, db_name_15min, symbols, start, end, volume=False):
#     URL = "http://www.forexite.com/free_forex_quotes/%s/%s/%s%s%s.zip"


# Path: scripts/update_oanda_currency.py
from nowtrade import data_connection

#!/usr/bin/python
# Updates a local mongo db with currency minute/hour data using the OandaConnection class.
ACCOUNT_ID = ''
ACCESS_TOKEN = ''
data_connection.populate_oanda_currency(ACCOUNT_ID, ACCESS_TOKEN, ['EUR_USD', 'USD_JPY', 'GBP_USD', 'USD_CAD', 'USD_CHF', 'AUD_USD'], granularity='M5', periods=5000, database='oanda-5min')

data_connection.populate_oanda_currency(ACCOUNT_ID, ACCESS_TOKEN, ['EUR_USD', 'USD_JPY', 'GBP_USD', 'USD_CAD', 'USD_CHF', 'AUD_USD'], granularity='M15', periods=5000, database='oanda-15min')