Interface ServiceProvider.MetaApiConnectionProvider

  • Enclosing class:
    ServiceProvider

    public static interface ServiceProvider.MetaApiConnectionProvider
    Interface for creating MetaApiConnection. Using this interface it is possible to set MetaApiConnection mock with function instead of passing already created object.
    • Method Detail

      • create

        MetaApiConnection create​(MetaApiWebsocketClient websocketClient,
                                 MetatraderAccount account,
                                 HistoryStorage historyStorage,
                                 ConnectionRegistry connectionRegistry)
        Creates MetaApiConnection mock
        Parameters:
        websocketClient - MetaApi websocket client
        account - MetaTrader account to connect to
        historyStorage - optional local terminal history storage. Use for accounts in user synchronization mode. By default an instance of MemoryHistoryStorage will be used.
        connectionRegistry - metatrader account connection registry
        Returns:
        MetaApiConnection mock