Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* SnapTrade
* Connect brokerage accounts to your app for live positions and trading
*
* The version of the OpenAPI document: 1.0.0
* Contact: [email protected]
*
* NOTE: This class is auto generated by Konfig (https://konfigthis.com).
* Do not edit the class manually.
*/
package com.konfigthis.client.api;
import com.konfigthis.client.ApiCallback;
import com.konfigthis.client.ApiClient;
import com.konfigthis.client.ApiException;
import com.konfigthis.client.ApiResponse;
import com.konfigthis.client.Configuration;
import com.konfigthis.client.Pair;
import com.konfigthis.client.ProgressRequestBody;
import com.konfigthis.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.konfigthis.client.model.Brokerage;
import com.konfigthis.client.model.BrokerageAuthorizationTypeReadOnly;
import com.konfigthis.client.model.Currency;
import com.konfigthis.client.model.Exchange;
import com.konfigthis.client.model.ExchangeRatePairs;
import com.konfigthis.client.model.PartnerData;
import com.konfigthis.client.model.SecurityType;
import com.konfigthis.client.model.SymbolQuery;
import java.util.UUID;
import com.konfigthis.client.model.UniversalSymbol;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class ReferenceDataApiGenerated {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public ReferenceDataApiGenerated() throws IllegalArgumentException {
this(Configuration.getDefaultApiClient());
}
public ReferenceDataApiGenerated(ApiClient apiClient) throws IllegalArgumentException {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
private okhttp3.Call getCurrencyExchangeRatePairCall(String currencyPair, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/currencies/rates/{currencyPair}"
.replace("{" + "currencyPair" + "}", localVarApiClient.escapeString(currencyPair.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getCurrencyExchangeRatePairValidateBeforeCall(String currencyPair, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'currencyPair' is set
if (currencyPair == null) {
throw new ApiException("Missing the required parameter 'currencyPair' when calling getCurrencyExchangeRatePair(Async)");
}
return getCurrencyExchangeRatePairCall(currencyPair, _callback);
}
private ApiResponse getCurrencyExchangeRatePairWithHttpInfo(String currencyPair) throws ApiException {
okhttp3.Call localVarCall = getCurrencyExchangeRatePairValidateBeforeCall(currencyPair, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getCurrencyExchangeRatePairAsync(String currencyPair, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getCurrencyExchangeRatePairValidateBeforeCall(currencyPair, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetCurrencyExchangeRatePairRequestBuilderGenerated {
final String currencyPair;
public GetCurrencyExchangeRatePairRequestBuilderGenerated(String currencyPair) {
this.currencyPair = currencyPair;
}
/**
* Build call for getCurrencyExchangeRatePair
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getCurrencyExchangeRatePairCall(currencyPair, _callback);
}
/**
* Execute getCurrencyExchangeRatePair request
* @return ExchangeRatePairs
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public ExchangeRatePairs execute() throws ApiException {
ApiResponse localVarResp = getCurrencyExchangeRatePairWithHttpInfo(currencyPair);
return localVarResp.getResponseBody();
}
/**
* Execute getCurrencyExchangeRatePair request with HTTP info returned
* @return ApiResponse<ExchangeRatePairs>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getCurrencyExchangeRatePairWithHttpInfo(currencyPair);
}
/**
* Execute getCurrencyExchangeRatePair request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getCurrencyExchangeRatePairAsync(currencyPair, _callback);
}
}
/**
* Get exchange rate of a currency pair
* Returns an Exchange Rate Pair object for the specified Currency Pair.
* @param currencyPair A currency pair based on currency code for example, {CAD-USD} (required)
* @return GetCurrencyExchangeRatePairRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public ReferenceDataApi.GetCurrencyExchangeRatePairRequestBuilder getCurrencyExchangeRatePair(String currencyPair) throws IllegalArgumentException {
if (currencyPair == null) throw new IllegalArgumentException("\"currencyPair\" is required but got null");
return ((ReferenceDataApi) this).new GetCurrencyExchangeRatePairRequestBuilder(currencyPair);
}
private okhttp3.Call getPartnerInfoCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/snapTrade/partners";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPartnerInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getPartnerInfoCall(_callback);
}
private ApiResponse getPartnerInfoWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getPartnerInfoValidateBeforeCall(null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getPartnerInfoAsync(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPartnerInfoValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetPartnerInfoRequestBuilderGenerated {
public GetPartnerInfoRequestBuilderGenerated() {
}
/**
* Build call for getPartnerInfo
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
500
Unexpected Error
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getPartnerInfoCall(_callback);
}
/**
* Execute getPartnerInfo request
* @return PartnerData
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
500
Unexpected Error
-
*/
public PartnerData execute() throws ApiException {
ApiResponse localVarResp = getPartnerInfoWithHttpInfo();
return localVarResp.getResponseBody();
}
/**
* Execute getPartnerInfo request with HTTP info returned
* @return ApiResponse<PartnerData>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
500
Unexpected Error
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getPartnerInfoWithHttpInfo();
}
/**
* Execute getPartnerInfo request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
500
Unexpected Error
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getPartnerInfoAsync(_callback);
}
}
/**
* Get Client Info
* Returns configurations for your SnapTrade Client ID, including allowed brokerages and data access.
* @return GetPartnerInfoRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
500
Unexpected Error
-
*/
public ReferenceDataApi.GetPartnerInfoRequestBuilder getPartnerInfo() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new GetPartnerInfoRequestBuilder();
}
private okhttp3.Call getSecurityTypesCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/securityTypes";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSecurityTypesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getSecurityTypesCall(_callback);
}
private ApiResponse> getSecurityTypesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getSecurityTypesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getSecurityTypesAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getSecurityTypesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetSecurityTypesRequestBuilderGenerated {
public GetSecurityTypesRequestBuilderGenerated() {
}
/**
* Build call for getSecurityTypes
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getSecurityTypesCall(_callback);
}
/**
* Execute getSecurityTypes request
* @return List<SecurityType>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = getSecurityTypesWithHttpInfo();
return localVarResp.getResponseBody();
}
/**
* Execute getSecurityTypes request with HTTP info returned
* @return ApiResponse<List<SecurityType>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return getSecurityTypesWithHttpInfo();
}
/**
* Execute getSecurityTypes request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return getSecurityTypesAsync(_callback);
}
}
/**
* List security types
* Return all available security types supported by SnapTrade.
* @return GetSecurityTypesRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ReferenceDataApi.GetSecurityTypesRequestBuilder getSecurityTypes() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new GetSecurityTypesRequestBuilder();
}
private okhttp3.Call getStockExchangesCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/exchanges";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getStockExchangesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return getStockExchangesCall(_callback);
}
private ApiResponse> getStockExchangesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = getStockExchangesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getStockExchangesAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getStockExchangesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetStockExchangesRequestBuilderGenerated {
public GetStockExchangesRequestBuilderGenerated() {
}
/**
* Build call for getStockExchanges
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all supported stock exchanges
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getStockExchangesCall(_callback);
}
/**
* Execute getStockExchanges request
* @return List<Exchange>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all supported stock exchanges
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = getStockExchangesWithHttpInfo();
return localVarResp.getResponseBody();
}
/**
* Execute getStockExchanges request with HTTP info returned
* @return ApiResponse<List<Exchange>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all supported stock exchanges
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return getStockExchangesWithHttpInfo();
}
/**
* Execute getStockExchanges request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all supported stock exchanges
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return getStockExchangesAsync(_callback);
}
}
/**
* Get exchanges
* Returns a list of all supported Exchanges.
* @return GetStockExchangesRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
A list of all supported stock exchanges
-
*/
public ReferenceDataApi.GetStockExchangesRequestBuilder getStockExchanges() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new GetStockExchangesRequestBuilder();
}
private okhttp3.Call getSymbolsCall(SymbolQuery symbolQuery, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = symbolQuery;
// create path and map variables
String localVarPath = "/symbols";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSymbolsValidateBeforeCall(SymbolQuery symbolQuery, final ApiCallback _callback) throws ApiException {
return getSymbolsCall(symbolQuery, _callback);
}
private ApiResponse> getSymbolsWithHttpInfo(SymbolQuery symbolQuery) throws ApiException {
okhttp3.Call localVarCall = getSymbolsValidateBeforeCall(symbolQuery, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getSymbolsAsync(SymbolQuery symbolQuery, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getSymbolsValidateBeforeCall(symbolQuery, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetSymbolsRequestBuilderGenerated {
String substring;
public GetSymbolsRequestBuilderGenerated() {
}
/**
* Set substring
* @param substring The search query for symbols. (optional)
* @return ReferenceDataApi.GetSymbolsRequestBuilder
*/
public ReferenceDataApi.GetSymbolsRequestBuilder substring(String substring) {
this.substring = substring;
return (ReferenceDataApi.GetSymbolsRequestBuilder) this;
}
/**
* Build call for getSymbols
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
return getSymbolsCall(symbolQuery, _callback);
}
private SymbolQuery buildBodyParams() {
SymbolQuery symbolQuery = new SymbolQuery();
symbolQuery.substring(this.substring);
return symbolQuery;
}
/**
* Execute getSymbols request
* @return List<UniversalSymbol>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public List execute() throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
ApiResponse> localVarResp = getSymbolsWithHttpInfo(symbolQuery);
return localVarResp.getResponseBody();
}
/**
* Execute getSymbols request with HTTP info returned
* @return ApiResponse<List<UniversalSymbol>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
return getSymbolsWithHttpInfo(symbolQuery);
}
/**
* Execute getSymbols request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
return getSymbolsAsync(symbolQuery, _callback);
}
}
/**
* Search symbols
* Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned.
* @return GetSymbolsRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ReferenceDataApi.GetSymbolsRequestBuilder getSymbols() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new GetSymbolsRequestBuilder();
}
private okhttp3.Call getSymbolsByTickerCall(String query, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/symbols/{query}"
.replace("{" + "query" + "}", localVarApiClient.escapeString(query.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getSymbolsByTickerValidateBeforeCall(String query, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'query' is set
if (query == null) {
throw new ApiException("Missing the required parameter 'query' when calling getSymbolsByTicker(Async)");
}
return getSymbolsByTickerCall(query, _callback);
}
private ApiResponse getSymbolsByTickerWithHttpInfo(String query) throws ApiException {
okhttp3.Call localVarCall = getSymbolsByTickerValidateBeforeCall(query, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getSymbolsByTickerAsync(String query, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getSymbolsByTickerValidateBeforeCall(query, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class GetSymbolsByTickerRequestBuilderGenerated {
final String query;
public GetSymbolsByTickerRequestBuilderGenerated(String query) {
this.query = query;
}
/**
* Build call for getSymbolsByTicker
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getSymbolsByTickerCall(query, _callback);
}
/**
* Execute getSymbolsByTicker request
* @return UniversalSymbol
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public UniversalSymbol execute() throws ApiException {
ApiResponse localVarResp = getSymbolsByTickerWithHttpInfo(query);
return localVarResp.getResponseBody();
}
/**
* Execute getSymbolsByTicker request with HTTP info returned
* @return ApiResponse<UniversalSymbol>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getSymbolsByTickerWithHttpInfo(query);
}
/**
* Execute getSymbolsByTicker request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getSymbolsByTickerAsync(query, _callback);
}
}
/**
* Get symbol detail
* Returns the Universal Symbol object specified by the ticker or the Universal Symbol ID. When a ticker is specified, the first matching result is returned. We largely follow the [Yahoo Finance ticker format](https://help.yahoo.com/kb/SLN2310.html)(click on \"Yahoo Finance Market Coverage and Data Delays\"). For example, for securities traded on the Toronto Stock Exchange, the symbol has a '.TO' suffix. For securities traded on NASDAQ or NYSE, the symbol does not have a suffix. Please use the ticker with the proper suffix for the best results.
* @param query The ticker or Universal Symbol ID to look up the symbol with. (required)
* @return GetSymbolsByTickerRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ReferenceDataApi.GetSymbolsByTickerRequestBuilder getSymbolsByTicker(String query) throws IllegalArgumentException {
if (query == null) throw new IllegalArgumentException("\"query\" is required but got null");
return ((ReferenceDataApi) this).new GetSymbolsByTickerRequestBuilder(query);
}
private okhttp3.Call listAllBrokerageAuthorizationTypeCall(String brokerage, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/brokerageAuthorizationTypes";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (brokerage != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("brokerage", brokerage));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listAllBrokerageAuthorizationTypeValidateBeforeCall(String brokerage, final ApiCallback _callback) throws ApiException {
return listAllBrokerageAuthorizationTypeCall(brokerage, _callback);
}
private ApiResponse> listAllBrokerageAuthorizationTypeWithHttpInfo(String brokerage) throws ApiException {
okhttp3.Call localVarCall = listAllBrokerageAuthorizationTypeValidateBeforeCall(brokerage, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listAllBrokerageAuthorizationTypeAsync(String brokerage, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listAllBrokerageAuthorizationTypeValidateBeforeCall(brokerage, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ListAllBrokerageAuthorizationTypeRequestBuilderGenerated {
String brokerage;
public ListAllBrokerageAuthorizationTypeRequestBuilderGenerated() {
}
/**
* Set brokerage
* @param brokerage Comma separated value of brokerage slugs (optional)
* @return ReferenceDataApi.ListAllBrokerageAuthorizationTypeRequestBuilder
*/
public ReferenceDataApi.ListAllBrokerageAuthorizationTypeRequestBuilder brokerage(String brokerage) {
this.brokerage = brokerage;
return (ReferenceDataApi.ListAllBrokerageAuthorizationTypeRequestBuilder) this;
}
/**
* Build call for listAllBrokerageAuthorizationType
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage Authorization Type objects.
-
0
Unexpected error.
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listAllBrokerageAuthorizationTypeCall(brokerage, _callback);
}
/**
* Execute listAllBrokerageAuthorizationType request
* @return List<BrokerageAuthorizationTypeReadOnly>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage Authorization Type objects.
-
0
Unexpected error.
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = listAllBrokerageAuthorizationTypeWithHttpInfo(brokerage);
return localVarResp.getResponseBody();
}
/**
* Execute listAllBrokerageAuthorizationType request with HTTP info returned
* @return ApiResponse<List<BrokerageAuthorizationTypeReadOnly>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage Authorization Type objects.
-
0
Unexpected error.
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return listAllBrokerageAuthorizationTypeWithHttpInfo(brokerage);
}
/**
* Execute listAllBrokerageAuthorizationType request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage Authorization Type objects.
-
0
Unexpected error.
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return listAllBrokerageAuthorizationTypeAsync(brokerage, _callback);
}
}
/**
* Get all brokerage authorization types
* Returns a list of all defined Brokerage authorization Type objects.
* @return ListAllBrokerageAuthorizationTypeRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage Authorization Type objects.
-
0
Unexpected error.
-
*/
public ReferenceDataApi.ListAllBrokerageAuthorizationTypeRequestBuilder listAllBrokerageAuthorizationType() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new ListAllBrokerageAuthorizationTypeRequestBuilder();
}
private okhttp3.Call listAllBrokeragesCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/brokerages";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listAllBrokeragesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return listAllBrokeragesCall(_callback);
}
private ApiResponse> listAllBrokeragesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = listAllBrokeragesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listAllBrokeragesAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listAllBrokeragesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ListAllBrokeragesRequestBuilderGenerated {
public ListAllBrokeragesRequestBuilderGenerated() {
}
/**
* Build call for listAllBrokerages
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage objects.
-
0
Unexpected error.
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listAllBrokeragesCall(_callback);
}
/**
* Execute listAllBrokerages request
* @return List<Brokerage>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage objects.
-
0
Unexpected error.
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = listAllBrokeragesWithHttpInfo();
return localVarResp.getResponseBody();
}
/**
* Execute listAllBrokerages request with HTTP info returned
* @return ApiResponse<List<Brokerage>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage objects.
-
0
Unexpected error.
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return listAllBrokeragesWithHttpInfo();
}
/**
* Execute listAllBrokerages request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage objects.
-
0
Unexpected error.
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return listAllBrokeragesAsync(_callback);
}
}
/**
* Get brokerages
* Returns a list of all defined Brokerage objects.
* @return ListAllBrokeragesRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
A list of all defined Brokerage objects.
-
0
Unexpected error.
-
*/
public ReferenceDataApi.ListAllBrokeragesRequestBuilder listAllBrokerages() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new ListAllBrokeragesRequestBuilder();
}
private okhttp3.Call listAllCurrenciesCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/currencies";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listAllCurrenciesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return listAllCurrenciesCall(_callback);
}
private ApiResponse> listAllCurrenciesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = listAllCurrenciesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listAllCurrenciesAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listAllCurrenciesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ListAllCurrenciesRequestBuilderGenerated {
public ListAllCurrenciesRequestBuilderGenerated() {
}
/**
* Build call for listAllCurrencies
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all currencies.
-
0
Unexpected error.
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listAllCurrenciesCall(_callback);
}
/**
* Execute listAllCurrencies request
* @return List<Currency>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all currencies.
-
0
Unexpected error.
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = listAllCurrenciesWithHttpInfo();
return localVarResp.getResponseBody();
}
/**
* Execute listAllCurrencies request with HTTP info returned
* @return ApiResponse<List<Currency>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all currencies.
-
0
Unexpected error.
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return listAllCurrenciesWithHttpInfo();
}
/**
* Execute listAllCurrencies request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all currencies.
-
0
Unexpected error.
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return listAllCurrenciesAsync(_callback);
}
}
/**
* Get currencies
* Returns a list of all defined Currency objects.
* @return ListAllCurrenciesRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
A list of all currencies.
-
0
Unexpected error.
-
*/
public ReferenceDataApi.ListAllCurrenciesRequestBuilder listAllCurrencies() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new ListAllCurrenciesRequestBuilder();
}
private okhttp3.Call listAllCurrenciesRatesCall(final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/currencies/rates";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listAllCurrenciesRatesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return listAllCurrenciesRatesCall(_callback);
}
private ApiResponse> listAllCurrenciesRatesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = listAllCurrenciesRatesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call listAllCurrenciesRatesAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listAllCurrenciesRatesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class ListAllCurrenciesRatesRequestBuilderGenerated {
public ListAllCurrenciesRatesRequestBuilderGenerated() {
}
/**
* Build call for listAllCurrenciesRates
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return listAllCurrenciesRatesCall(_callback);
}
/**
* Execute listAllCurrenciesRates request
* @return List<ExchangeRatePairs>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public List execute() throws ApiException {
ApiResponse> localVarResp = listAllCurrenciesRatesWithHttpInfo();
return localVarResp.getResponseBody();
}
/**
* Execute listAllCurrenciesRates request with HTTP info returned
* @return ApiResponse<List<ExchangeRatePairs>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
return listAllCurrenciesRatesWithHttpInfo();
}
/**
* Execute listAllCurrenciesRates request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
return listAllCurrenciesRatesAsync(_callback);
}
}
/**
* Get currency exchange rates
* Returns a list of all Exchange Rate Pairs for all supported Currencies.
* @return ListAllCurrenciesRatesRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
A list of all exchange rates pairs for supported currencies
-
*/
public ReferenceDataApi.ListAllCurrenciesRatesRequestBuilder listAllCurrenciesRates() throws IllegalArgumentException {
return ((ReferenceDataApi) this).new ListAllCurrenciesRatesRequestBuilder();
}
private okhttp3.Call symbolSearchUserAccountCall(String userId, String userSecret, UUID accountId, SymbolQuery symbolQuery, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = symbolQuery;
// create path and map variables
String localVarPath = "/accounts/{accountId}/symbols"
.replace("{" + "accountId" + "}", localVarApiClient.escapeString(accountId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (userId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId));
}
if (userSecret != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("userSecret", userSecret));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "PartnerClientId", "PartnerSignature", "PartnerTimestamp" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call symbolSearchUserAccountValidateBeforeCall(String userId, String userSecret, UUID accountId, SymbolQuery symbolQuery, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'userId' is set
if (userId == null) {
throw new ApiException("Missing the required parameter 'userId' when calling symbolSearchUserAccount(Async)");
}
// verify the required parameter 'userSecret' is set
if (userSecret == null) {
throw new ApiException("Missing the required parameter 'userSecret' when calling symbolSearchUserAccount(Async)");
}
// verify the required parameter 'accountId' is set
if (accountId == null) {
throw new ApiException("Missing the required parameter 'accountId' when calling symbolSearchUserAccount(Async)");
}
return symbolSearchUserAccountCall(userId, userSecret, accountId, symbolQuery, _callback);
}
private ApiResponse> symbolSearchUserAccountWithHttpInfo(String userId, String userSecret, UUID accountId, SymbolQuery symbolQuery) throws ApiException {
okhttp3.Call localVarCall = symbolSearchUserAccountValidateBeforeCall(userId, userSecret, accountId, symbolQuery, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call symbolSearchUserAccountAsync(String userId, String userSecret, UUID accountId, SymbolQuery symbolQuery, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = symbolSearchUserAccountValidateBeforeCall(userId, userSecret, accountId, symbolQuery, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class SymbolSearchUserAccountRequestBuilderGenerated {
final String userId;
final String userSecret;
final UUID accountId;
String substring;
public SymbolSearchUserAccountRequestBuilderGenerated(String userId, String userSecret, UUID accountId) {
this.userId = userId;
this.userSecret = userSecret;
this.accountId = accountId;
}
/**
* Set substring
* @param substring The search query for symbols. (optional)
* @return ReferenceDataApi.SymbolSearchUserAccountRequestBuilder
*/
public ReferenceDataApi.SymbolSearchUserAccountRequestBuilder substring(String substring) {
this.substring = substring;
return (ReferenceDataApi.SymbolSearchUserAccountRequestBuilder) this;
}
/**
* Build call for symbolSearchUserAccount
* @param _callback ApiCallback API callback
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
return symbolSearchUserAccountCall(userId, userSecret, accountId, symbolQuery, _callback);
}
private SymbolQuery buildBodyParams() {
SymbolQuery symbolQuery = new SymbolQuery();
symbolQuery.substring(this.substring);
return symbolQuery;
}
/**
* Execute symbolSearchUserAccount request
* @return List<UniversalSymbol>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public List execute() throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
ApiResponse> localVarResp = symbolSearchUserAccountWithHttpInfo(userId, userSecret, accountId, symbolQuery);
return localVarResp.getResponseBody();
}
/**
* Execute symbolSearchUserAccount request with HTTP info returned
* @return ApiResponse<List<UniversalSymbol>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ApiResponse> executeWithHttpInfo() throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
return symbolSearchUserAccountWithHttpInfo(userId, userSecret, accountId, symbolQuery);
}
/**
* Execute symbolSearchUserAccount request (asynchronously)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public okhttp3.Call executeAsync(final ApiCallback> _callback) throws ApiException {
SymbolQuery symbolQuery = buildBodyParams();
return symbolSearchUserAccountAsync(userId, userSecret, accountId, symbolQuery, _callback);
}
}
/**
* Search account symbols
* Returns a list of Universal Symbol objects that match the given query. The matching takes into consideration both the ticker and the name of the symbol. Only the first 20 results are returned. The search results are further limited to the symbols supported by the brokerage for which the account is under.
* @param userId (required)
* @param userSecret (required)
* @param accountId (required)
* @return SymbolSearchUserAccountRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
0
Unexpected Error
-
*/
public ReferenceDataApi.SymbolSearchUserAccountRequestBuilder symbolSearchUserAccount(String userId, String userSecret, UUID accountId) throws IllegalArgumentException {
if (userId == null) throw new IllegalArgumentException("\"userId\" is required but got null");
if (userSecret == null) throw new IllegalArgumentException("\"userSecret\" is required but got null");
if (accountId == null) throw new IllegalArgumentException("\"accountId\" is required but got null");
return ((ReferenceDataApi) this).new SymbolSearchUserAccountRequestBuilder(userId, userSecret, accountId);
}
}