DeribitEx.AdapterExtensions (deribit_ex v0.2.0)
View SourceExtensions to the Adapter for integration with token management.
This module contains the functions needed to modify Adapter to integrate with the token management system without directly modifying the adapter itself.
When MM0207 is fully integrated, these functions should be moved directly into the Adapter module.
Summary
Functions
Enhances process_method_specific_request to handle resubscription after authentication.
Gets all active orders from the token manager.
Handles resubscription after reconnection and authentication.
Extends Adapter.init/1 to initialize the token manager.
Registers an order with the token manager.
Registers a subscription with the token manager.
Unregisters a subscription from the token manager.
Updates an order in the token manager.
Extends Adapter.handle_auth_response/2 to integrate with token manager.
Extends Adapter.handle_exchange_token_response/2 to integrate with token manager.
Extends Adapter.handle_fork_token_response/2 to integrate with token manager.
Extends Adapter.handle_logout_response/2 to integrate with token manager.
Functions
Enhances process_method_specific_request to handle resubscription after authentication.
This function adds resubscription handling to the existing process_method_specific_request function.
Gets all active orders from the token manager.
Use this function to access active orders.
Handles resubscription after reconnection and authentication.
Call this function after handling reconnection with authentication.
Extends Adapter.init/1 to initialize the token manager.
Call this function from Adapter.init/1 to add token manager to state.
Registers an order with the token manager.
Call this function when creating a new order.
Registers a subscription with the token manager.
Call this function from Adapter.handle_subscription_response/2 after state updates.
Unregisters a subscription from the token manager.
Call this function when unsubscribing from a channel.
Updates an order in the token manager.
Call this function when order status changes.
Extends Adapter.handle_auth_response/2 to integrate with token manager.
Call this function from Adapter.handle_auth_response/2 after state updates.
Extends Adapter.handle_exchange_token_response/2 to integrate with token manager.
Call this function from Adapter.handle_exchange_token_response/2 after state updates.
Extends Adapter.handle_fork_token_response/2 to integrate with token manager.
Call this function from Adapter.handle_fork_token_response/2 after state updates.
Extends Adapter.handle_logout_response/2 to integrate with token manager.
Call this function from Adapter.handle_logout_response/2 after state updates.