diff --git a/README.md b/README.md index 478cc1c..5987d29 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can use `.get()`, `.get_history()` and `.update()` with all avaliable apis. * `bitmex.funding` * `bitmex.quote` -Supported symbols: `btcusd`, `ethusd`, `ltcusd`. These are guaranteed to work with every module. You can stil use any symbol that an exchange supports. But same pair is different for each exchange of course. Using an unsupported symbold will give you a warning, but it should work just fine as long as you are using a correct symbol for that api. +Supported symbols: `btcusd`, `ethusd`, `ltcusd`. These are guaranteed to work with every module. You can stil use any symbol that an exchange supports. But same pair is different for each exchange of course. Using an unsupported symbol will give you a warning, but it should work just fine as long as you are using a correct symbol for that api. ### Get history with .get() @@ -39,7 +39,9 @@ Supported symbols: `btcusd`, `ethusd`, `ltcusd`. These are guaranteed to work wi df2 = bitfinex.get(2000, symbol='ethusd') # Default is btcusd, you can pass others in symbol parameter -Just pass how much data you want. It will return the amount in most recent 1h data. Currently only 1h data is supported. If history amount is above api limit, `.get()` will run `.get_history()` under the hood, so you don't need to worry about it. But if you want everything and don't want to guess how much data avaliable on each exchange, just run `.get_history()` and get everything. + df3 = bitfinex.get(20000, interval='1m') # You can pass any interval that exchange api supports + +Just pass how much data you want. It will return the amount in most recent 1h data. If history amount is above api limit, `.get()` will run `.get_history()` under the hood, so you don't need to worry about it. But if you want everything avaliable on an exchange, just run `.get_history()`. ### Download all available history with .get_history() The tool will download all avaliable history while respecting request per minute limits. Using it easy, and it takes couple of minutes for 1h data. @@ -59,6 +61,6 @@ The tool will download all avaliable history while respecting request per minute bitstamp = bitstamp() - bitstamp.update_csv('bitstamp.csv') + bitstamp.update('bitstamp.csv') Update takes a path variable to csv file and updates it. diff --git a/tradingfeatures/api_base.py b/tradingfeatures/api_base.py index 54ccf6e..a6491f8 100644 --- a/tradingfeatures/api_base.py +++ b/tradingfeatures/api_base.py @@ -175,7 +175,7 @@ def calc_start(self, limit, start=None, end=None, interval=3600, scale=1): interval = self.interval_check(interval)[0] limit = self.limit if limit is None else limit - limit = int(limit / scale) # for 8h funding, bad solution + limit = int(limit / scale) # for 8h funding scaling end = current_time if end is None else end if start is None: start = end - (interval * (limit-1)) # limit -1 to be sure to get the latest hour diff --git a/tradingfeatures/uber.py b/tradingfeatures/uber.py index 6814d4f..9643af3 100644 --- a/tradingfeatures/uber.py +++ b/tradingfeatures/uber.py @@ -41,7 +41,7 @@ def eval_get(self, limit=1000, **kwargs): with ThreadPoolExecutor(8) as executor: for api in self.apis: api_columns = self.column_kwargs[api.name] if api.name in self.column_kwargs else None - future = executor.submit(api.get, limit=limit, columns=api_columns) + future = executor.submit(api.get, limit=limit, columns=api_columns, **kwargs) futures.append([api.name, future]) datasets = [[item[0], item[1].result()[-limit:]] for item in futures]