Trivial formatting changes
This commit is contained in:
parent
ec4cca5869
commit
04721ae4fe
@ -69,12 +69,12 @@ def get_historical_data(symbol: str, interval: int,
|
||||
end_filter_time: datetime = datetime.strptime('160000', '%H%M%S').time()) -> pd.DataFrame:
|
||||
|
||||
message = 'HIT,{symbol},{interval},{begin},{end},,{begin_filter},{end_filter},1\n'.format(
|
||||
symbol=symbol,
|
||||
interval=interval,
|
||||
begin=start_date.strftime('%Y%m%d %H%M%S'),
|
||||
end=end_date.strftime('%Y%m%d %H%M%S') if end_date else '',
|
||||
begin_filter=start_filter_time.strftime('%H%M%S') if start_filter_time else '',
|
||||
end_filter=end_filter_time.strftime('%H%M%S') if end_filter_time else ''
|
||||
symbol = symbol,
|
||||
interval = interval,
|
||||
begin = start_date.strftime('%Y%m%d %H%M%S'),
|
||||
end = end_date.strftime('%Y%m%d %H%M%S') if end_date else '',
|
||||
begin_filter = start_filter_time.strftime('%H%M%S') if start_filter_time else '',
|
||||
end_filter = end_filter_time.strftime('%H%M%S') if end_filter_time else ''
|
||||
)
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
@ -89,7 +89,7 @@ def get_historical_data(symbol: str, interval: int,
|
||||
data = data.replace(',\n','\n')[:-1]
|
||||
|
||||
data = StringIO(data)
|
||||
return pd.read_csv(data, index_col=False,
|
||||
return pd.read_csv(data, index_col = False,
|
||||
names=['Date', 'High', 'Low', 'Open', 'Close', 'Total Volume', 'Period Volume'])
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Loading…
Reference in New Issue
Block a user