@@ -55,23 +55,23 @@ The returned addon state object is used in many other functions below.
5555#### start_addon
5656``` python
5757# Call this to start the communication between your addon and Bookmap.
58- bm.start_addon(addon, add_instrument_handler, detach_instrument_handler )
58+ bm.start_addon(addon, handle_subscribe_instrument, handle_unsubscribe_instrument )
5959```
6060It starts the communication between Bookmap and your Python script. Call it once you have added all
6161your [ Event handlers] ( #Event-handlers ) .
6262
63- ` add_instrument_handler ` is a function that you should define. It will be called each time you
63+ ` handle_subscribe_instrument ` is a function that you should define. It will be called each time you
6464enable the addon in Bookmap for a certain instrument. All handlers, including this one, must have
6565a proper signature (a list of parameters), as defined below.
6666
67- ` detach_instrument_handler ` is similar to above, except is called when the user disables the addon
67+ ` handle_unsubscribe_instrument ` is similar to above, except is called when the user disables the addon
6868for a certain instrument.
6969
7070Example:
7171``` python
7272import pyl1api as bm
7373
74- def add_instrument_handler (
74+ def handle_subscribe_instrument (
7575 addon : Any,
7676 alias : str ,
7777 full_name : str ,
@@ -93,7 +93,7 @@ def add_instrument_handler(
9393 """
9494 print (" Subscribing to the instrument " + alias, flush = True )
9595
96- def detach_instrument_handler (
96+ def handle_unsubscribe_instrument (
9797 addon : Any,
9898 alias : str
9999) -> None :
@@ -110,7 +110,7 @@ if __name__ == "__main__":
110110 addon = bm.create_addon()
111111 # start addon, requires 3 arguments - addon itself, handler for subscribe event
112112 # and handler for unsubscribe event
113- bm.start_addon(addon, add_instrument_handler, detach_instrument_handler )
113+ bm.start_addon(addon, handle_subscribe_instrument, handle_unsubscribe_instrument )
114114 bm.wait_until_addon_is_turned_off(addon)
115115```
116116
@@ -142,7 +142,7 @@ How to convert these levels to a real price or size? The rule are simple:
142142> moment.
143143
144144How to know what the instrument's ` pips ` and ` size_multiplier ` values are? You receive them via the
145- [ add_instrument_handler ] ( #start_addon ) callback when the user subscribes to an instrument.
145+ [ handle_subscribe_instrument ] ( #start_addon ) callback when the user subscribes to an instrument.
146146
147147### Event handlers
148148
0 commit comments