Skip to content

Commit 6587d1a

Browse files
author
Shlomi Kushchi
authored
example using get_barset
1 parent 43181bb commit 6587d1a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@ account = api.get_account()
3636
api.list_positions()
3737
```
3838

39+
#### Using `get_barset()`
40+
```python
41+
import pandas as pd
42+
NY = 'America/New_York'
43+
start=pd.Timestamp('2020-08-01', tz=NY).isoformat()
44+
end=pd.Timestamp('2020-08-30', tz=NY).isoformat()
45+
print(api.get_barset(['AAPL', 'GOOG'], 'day', start=start, end=end).df)
46+
```
47+
please note the exact format of the dates
48+
3949
## Example Scripts
4050

4151
Please see the `examples/` folder for some example scripts that make use of this API

0 commit comments

Comments
 (0)