public class MetaApiClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected String |
host |
protected HttpClient |
httpClient |
protected String |
token |
| Constructor and Description |
|---|
MetaApiClient(HttpClient httpClient,
String token)
Constructs MetaTrader API client instance.
|
MetaApiClient(HttpClient httpClient,
String token,
String domain)
Constructs MetaTrader API client instance
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
getTokenType()
Returns type of current token
|
protected <T> CompletableFuture<T> |
handleNoAccessError(String methodName)
Handles no accessing to the method
|
protected boolean |
isNotAccountToken()
Checks that current token is not account token
|
protected boolean |
isNotJwtToken()
Checks that current token is not api token
|
protected HttpClient httpClient
protected String host
protected String token
public MetaApiClient(HttpClient httpClient, String token)
agiliumtrade.agiliumtrade.aihttpClient - HTTP clienttoken - authorization tokenpublic MetaApiClient(HttpClient httpClient, String token, String domain)
httpClient - HTTP clienttoken - authorization tokendomain - domain to connect toprotected String getTokenType()
protected boolean isNotJwtToken()
protected boolean isNotAccountToken()
protected <T> CompletableFuture<T> handleNoAccessError(String methodName)
T - any type returned by the calling methodmethodName - Name of methodCopyright © 2022. All rights reserved.