1313
1414
1515# mandatory callback used to register instrument info inside the python
16- def handle_instrument_info (addon , alias : str , full_name : str , is_crypto : bool , pips : float , size_granularity : float ,
17- instrument_multiplier : float ):
16+ def handle_subscribe_instrument (addon , alias : str , full_name : str , is_crypto : bool , pips : float , size_granularity : float ,
17+ instrument_multiplier : float , supported_features : dict [ str , object ] ):
1818 global cvd_accumulator
1919 global alias_to_size_granularity
2020 global req_id
@@ -80,7 +80,7 @@ def handle_trades(addon, alias: str, price: float, size: int, is_otc: bool, is_b
8080
8181
8282# callback notifying that unsubscription appeared
83- def handle_detach_instrument (addon , alias ):
83+ def handle_unsubscribe_instrument (addon , alias ):
8484 global cvd_accumulator
8585 del cvd_accumulator [alias ]
8686 print ("Detached " + alias , flush = True )
@@ -91,7 +91,7 @@ def handle_detach_instrument(addon, alias):
9191 bm .add_trades_handler (addon , handle_trades ) # register callback for trades
9292 # register indicator response callback
9393 bm .add_indicator_response_handler (addon , handle_indicator_response )
94- bm .start_addon (addon , handle_instrument_info ,
95- handle_detach_instrument ) # starting an addon
94+ bm .start_addon (addon , handle_subscribe_instrument ,
95+ handle_unsubscribe_instrument ) # starting an addon
9696 # give control over python scrip to Bookmap, so it won't be finished until it is turned off from Bookmap
9797 bm .wait_until_addon_is_turned_off (addon )
0 commit comments