Skip to content

Commit

Permalink
Merge pull request #37 from Tim-Vrhn/patch-1
Browse files Browse the repository at this point in the history
Error fix caused by Kraken's naming system for asset pairs
  • Loading branch information
dominiktraxl authored Aug 24, 2020
2 parents dfb0239 + fdb51f3 commit ceb9af7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pykrakenapi/pykrakenapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ def get_ohlc_data(self, pair, interval=1, since=None, ascending=False):
raise KrakenAPIError(res['error'])

# create dataframe
pair = list(res['result'].keys())[0]
ohlc = pd.DataFrame(res['result'][pair])
last = res['result']['last']

Expand Down Expand Up @@ -700,6 +701,7 @@ def get_recent_trades(self, pair, since=None, ascending=False):
raise KrakenAPIError(res['error'])

# create dataframe
pair = list(res['result'].keys())[0]
trades = pd.DataFrame(res['result'][pair])

# last timestamp
Expand Down Expand Up @@ -792,6 +794,7 @@ def get_recent_spread_data(self, pair, since=None, ascending=False):
raise KrakenAPIError(res['error'])

# create dataframe
pair = list(res['result'].keys())[0]
spread = pd.DataFrame(res['result'][pair])

# last timestamp
Expand Down

0 comments on commit ceb9af7

Please sign in to comment.