Skip to content

Commit

Permalink
update bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
realiti4 committed Mar 14, 2021
1 parent bc456cd commit e5523d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions tradingfeatures/api_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def get_hist(self,
steps = (total_entries // self.per_step) + 1

df = pd.DataFrame(columns=columns)
df.index.name = 'timestamp'
# df = None

print(f' Downloading {name}')

Expand All @@ -90,6 +92,10 @@ def get_hist(self,
print('error between timestamps: ', start_batch, end_batch)
if steps <= 1: return None

# if df is None:
# df = df_temp
# else:

df_temp = pd.concat([df, df_temp])
df = df_temp

Expand Down
2 changes: 1 addition & 1 deletion tradingfeatures/apis/bitmex/funding.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get(self, symbol=None, query=None, start=None, end=None, *args, **kwargs):
def get_hist(self, convert_funds=False, *args, **kwargs):
df_fundings = apiBase.get_hist(
self,
columns=['timestamp', 'fundingRate', 'fundingRateDaily'],
columns=['fundingRate', 'fundingRateDaily'],
interval='8h',
*args, **kwargs
)
Expand Down

0 comments on commit e5523d3

Please sign in to comment.