Class BybitApiServiceGenerator


  • public class BybitApiServiceGenerator
    extends Object
    Generates a Bybit API implementation based on @see BybitApiService.
    • Constructor Detail

      • BybitApiServiceGenerator

        public BybitApiServiceGenerator()
    • Method Detail

      • createService

        public static <S> S createService​(Class<S> serviceClass,
                                          String baseUrl,
                                          boolean debugMode,
                                          long recvWindow,
                                          String logOption)
      • createService

        public static <S> S createService​(Class<S> serviceClass,
                                          String apiKey,
                                          String secret,
                                          String baseUrl,
                                          boolean debugMode,
                                          long recvWindow,
                                          String logOption)
        Create a Bybit API service.
        Parameters:
        serviceClass - the type of service.
        apiKey - Bybit API key.
        secret - Bybit secret.
        Returns:
        a new implementation of the API endpoints for the Bybit API service.
      • executeSync

        public static <T> Object executeSync​(retrofit2.Call<T> call)
        Execute a REST call and block until the response is received.