from pyfmp.api import history as history_call
from datetime import datetime

columns = {
    'close': [float, 0]
}

class history:
    data = None

    def __init__(self, ticker, client):
        self.data = []
        data = history_call(client, ticker)
        for row in data['historical']:
            for key in row:
                if key in columns:
                    value = columns[key][0](row[key])

            self.data.append(value)
