diff --git a/.gitignore b/.gitignore index 22ce0da..9bc7fa6 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,6 @@ /.pytest_cache /.vscode -.env \ No newline at end of file +.env + +.idea \ No newline at end of file diff --git a/nomics/api/candles.py b/nomics/api/candles.py index e2b5577..d00b0b4 100644 --- a/nomics/api/candles.py +++ b/nomics/api/candles.py @@ -56,6 +56,9 @@ def get_candles(self, interval, currency = None, base = None, quote = None, exch resp = requests.get(url, params = params) if resp.status_code == 200: - return resp.json() + if format and format == 'csv': + return resp.text + else: + return resp.json() else: - return resp.text \ No newline at end of file + return resp.text