alpaca-trade-api-python icon indicating copy to clipboard operation
alpaca-trade-api-python copied to clipboard

[Feature]: Rest methods should take pd.Timestamp types as well for consistency

Open bdowling opened this issue 7 years ago • 0 comments

Entities return pd.Timestamp for time related entries, but calls that accept time don't accept that as a valid format.

So doing something like:

orders = api.list_orders(after='2018-01-01', status='all', direction='asc')
orders.extend( api.list_orders(after=orders[-1].submitted_at, status='all', direction='asc') )

results in a API format error on the after str(pd.Timestamp).

Perhaps this library could check the isinstance and use the .isoformat() automatically?

bdowling avatar Jan 14 '19 05:01 bdowling