@@ -90,22 +90,23 @@ def get_contracts() -> Dict[str, Contract]:
9090 contract .secType = "FUT"
9191 contract .exchange = "GLOBEX"
9292 contract .currency = "USD"
93- contract .lastTradeDateOrContractMonth = "202209 "
93+ contract .lastTradeDateOrContractMonth = "202212 "
9494 rst ["future_1" ] = contract
9595
96+ # find more contracts at https://www.cmegroup.com/markets/equities/sp/e-mini-sandp500.quotes.html
9697 contract = Contract ()
9798 contract .secType = "FUT"
9899 contract .exchange = "GLOBEX"
99100 contract .currency = "USD"
100- contract .localSymbol = "MESU2 "
101+ contract .localSymbol = "ESZ2 "
101102 rst ["future_2" ] = contract
102103
103104 contract = Contract ()
104105 contract .symbol = "DAX"
105106 contract .secType = "FUT"
106107 contract .exchange = "EUREX"
107108 contract .currency = "EUR"
108- contract .lastTradeDateOrContractMonth = "202209 "
109+ contract .lastTradeDateOrContractMonth = "202212 "
109110 contract .multiplier = "1"
110111 rst ["future_3" ] = contract
111112
@@ -357,8 +358,8 @@ def get_contracts() -> Dict[str, Contract]:
357358 bar_type = dhib .BarDataType .ASK )
358359client .request_bars_historical (rc , duration = dhib .Duration .days (10 ), bar_size = dhib .BarSize .MIN_5 ,
359360 bar_type = dhib .BarDataType .BID_ASK , keep_up_to_date = False )
360- client .request_bars_historical (rc , duration = dhib .Duration .days (10 ), bar_size = dhib .BarSize .MIN_5 ,
361- bar_type = dhib .BarDataType .AGGTRADES )
361+ # client.request_bars_historical(rc, duration=dhib.Duration.days(10), bar_size=dhib.BarSize.MIN_5,
362+ # bar_type=dhib.BarDataType.AGGTRADES)
362363client .request_bars_historical (rc , duration = dhib .Duration .days (10 ), bar_size = dhib .BarSize .MIN_5 ,
363364 bar_type = dhib .BarDataType .ADJUSTED_LAST , keep_up_to_date = False )
364365
@@ -482,7 +483,7 @@ def get_contracts() -> Dict[str, Contract]:
482483order .action = "BUY"
483484order .orderType = "LIMIT"
484485order .totalQuantity = 1
485- order .lmtPrice = 3000
486+ order .lmtPrice = 100
486487
487488print ("Placing order: START" )
488489client .order_place (rc , order )
@@ -493,7 +494,7 @@ def get_contracts() -> Dict[str, Contract]:
493494order .action = "BUY"
494495order .orderType = "LIMIT"
495496order .totalQuantity = 1
496- order .lmtPrice = 2600
497+ order .lmtPrice = 90
497498
498499print ("Placing order: START" )
499500client .order_place (rc , order )
@@ -504,7 +505,7 @@ def get_contracts() -> Dict[str, Contract]:
504505order .action = "BUY"
505506order .orderType = "LIMIT"
506507order .totalQuantity = 1
507- order .lmtPrice = 2700
508+ order .lmtPrice = 91
508509
509510print ("Placing order: START" )
510511req = client .order_place (rc , order )
0 commit comments