Class MetaApiClient

    • Constructor Detail

      • MetaApiClient

        public MetaApiClient​(HttpClient httpClient,
                             String token)
        Constructs MetaTrader API client instance. Domain is set to agiliumtrade.agiliumtrade.ai
        Parameters:
        httpClient - HTTP client
        token - authorization token
      • MetaApiClient

        public MetaApiClient​(HttpClient httpClient,
                             String token,
                             String domain)
        Constructs MetaTrader API client instance
        Parameters:
        httpClient - HTTP client
        token - authorization token
        domain - domain to connect to
    • Method Detail

      • getTokenType

        protected String getTokenType()
        Returns type of current token
        Returns:
        Type of current token
      • isNotJwtToken

        protected boolean isNotJwtToken()
        Checks that current token is not api token
        Returns:
        Indicator of absence api token
      • isNotAccountToken

        protected boolean isNotAccountToken()
        Checks that current token is not account token
        Returns:
        Indicator of absence account token
      • handleNoAccessError

        protected <T> CompletableFuture<T> handleNoAccessError​(String methodName)
        Handles no accessing to the method
        Parameters:
        methodName - Name of method