From 997e6ff3b78c1b5847e5196ee08284e29ab69317 Mon Sep 17 00:00:00 2001 From: Frederick Schaller IV Date: Tue, 22 Jun 2021 00:54:01 -0500 Subject: [PATCH] ids param for currencies.get_sparkline Added ids parameter for currencies.get_sparkline --- nomics/api/currencies.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nomics/api/currencies.py b/nomics/api/currencies.py index a4abf20..7c0246d 100644 --- a/nomics/api/currencies.py +++ b/nomics/api/currencies.py @@ -93,17 +93,20 @@ def get_metadata(self, ids = None, attributes = None): else: return resp.text - def get_sparkline(self, start, end = None): + def get_sparkline(self, start, ids = None, end = None): ''' Returns prices for all currencies within a customizable time interval suitable for sparkline charts. :param str start: Start time of the interval in RFC3339 format - :param str end: End time of the interval in RFC3339 format. If not provided, the current time is used. + :param str ids: Comma separated list of Nomics Currency IDs to filter result rows. Optional + + :param str end: End time of the interval in RFC3339 format. If not provided, the current time is used. ''' url = self.client.get_url('currencies/sparkline') params = { + 'ids': ids, 'start': start, 'end': end }