forked from polygon-io/client-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
launchpad.py
31 lines (22 loc) · 802 Bytes
/
launchpad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from polygon import RESTClient
from polygon.rest.models.request import RequestOptionBuilder
def get_list_trades_launchpad():
client = RESTClient()
"""
set headers example:
options = RequestOptionBuilder()
.edge_headers(edge_id="EDGE_ID", edge_ip_address="EDGE_ID_ADDRESS", edge_user="EDGE_USER")
update headers example:
options = options.update_edge_header(edge_ip_address="NEW_IP")
"""
options = RequestOptionBuilder().edge_headers(
edge_id="EDGE_ID", edge_ip_address="EDGE_ID_ADDRESS", edge_user="EDGE_USER"
)
trades = []
for t in client.list_trades("AAA", "2022-04-04", limit=5, options=options):
trades.append(t)
print(trades)
def main():
get_list_trades_launchpad()
if __name__ == "__main__":
main()