Class BybitApiClientFactory


  • public class BybitApiClientFactory
    extends Object
    A factory for creating BybitApi client objects.
    • Method Detail

      • newInstance

        public static BybitApiClientFactory newInstance​(String apiKey,
                                                        String secret)
        New instance of Api Mainnet Client
        Parameters:
        apiKey - the API key
        secret - the Secret
        Returns:
        the Bybit api client factory
      • newInstance

        public static BybitApiClientFactory newInstance​(String apiKey,
                                                        String secret,
                                                        String baseUrl)
        New instance of Api Mainnet Client with url
        Parameters:
        apiKey - the API key
        secret - the Secret
        baseUrl - the baseUrl
        Returns:
        the Bybit api client factory.
      • newInstance

        public static BybitApiClientFactory newInstance​(String apiKey,
                                                        String secret,
                                                        boolean debugMode)
        New instance of Api Mainnet Client with debug mode
        Parameters:
        apiKey - the API key
        secret - the Secret
        debugMode - to print request and response header
        Returns:
        the Bybit api client factory.
      • newInstance

        public static BybitApiClientFactory newInstance​(String apiKey,
                                                        String secret,
                                                        String baseUrl,
                                                        boolean debugMode)
        New instance of Api Client without debug mode and set URL
        Parameters:
        apiKey - the API key
        secret - the Secret
        baseUrl - base url
        Returns:
        the Bybit api client factory
      • newInstance

        public static BybitApiClientFactory newInstance()
        New instance without authentication.
        Returns:
        the Bybit api client factory
      • newInstance

        public static BybitApiClientFactory newInstance​(String baseUrl)
        New instance without authentication and with optional url
        Parameters:
        baseUrl - base url
        Returns:
        the Bybit api client factory.
      • newInstance

        public static BybitApiClientFactory newInstance​(boolean debugMode)
        New instance without authentication and with optional debug mode
        Parameters:
        debugMode - debug mode
        Returns:
        the Bybit api client factory.
      • newInstance

        public static BybitApiClientFactory newInstance​(String baseUrl,
                                                        boolean debugMode,
                                                        String logOption)
        New instance without authentication and with optional base url and debug mode
        Parameters:
        baseUrl - base url
        debugMode - debug mode
        Returns:
        the Bybit api client factory.
      • newSpotMarginRestClient

        public BybitApiSpotMarginRestClient newSpotMarginRestClient()
        Creates a new synchronous/blocking REST client to spot leverage token and spot margin endpoints.
      • newUserRestClient

        public BybitApiUserRestClient newUserRestClient()
        Creates a new synchronous/blocking REST client.
      • newAsyncUserRestClient

        public BybitApiAsyncUserRestClient newAsyncUserRestClient()
        Creates a new asynchronous/non-blocking REST client to User and upgrade endpoints.
      • newMarketDataRestClient

        public BybitApiMarketRestClient newMarketDataRestClient()
        Creates a new synchronous/blocking REST client to Market Data Endpoints
      • newAsyncMarketDataRestClient

        public BybitApiAsyncMarketDataRestClient newAsyncMarketDataRestClient()
        Creates a new asynchronous/non-blocking client to Market Data Endpoints
      • newLendingRestClient

        public BybitApiLendingRestClient newLendingRestClient()
        Creates a new synchronous/blocking REST client to Institution and Broker Endpoints
      • newAsyncLendingRestClient

        public BybitApiAsyncLendingRestClient newAsyncLendingRestClient()
        Creates a new asynchronous/non-blocking REST client to Institution Lending Endpoints
      • newTradeRestClient

        public BybitApiTradeRestClient newTradeRestClient()
        Creates a new synchronous/blocking REST client to trading
      • newAsyncTradeRestClient

        public BybitApiAsyncTradeRestClient newAsyncTradeRestClient()
        Creates a new asynchronous/non-blocking REST client to trading
      • newPositionRestClient

        public BybitApiPositionRestClient newPositionRestClient()
        Creates a new synchronous/blocking REST client to position data
      • newAsyncPositionRestClient

        public BybitApiAsyncPositionRestClient newAsyncPositionRestClient()
        Creates a new asynchronous/non-blocking client to position data
      • newAccountRestClient

        public BybitApiAccountRestClient newAccountRestClient()
        Creates a new synchronous/blocking REST client to Account data
      • newAsyncAccountRestClient

        public BybitApiAsyncAccountRestClient newAsyncAccountRestClient()
        Creates a new asynchronous/non-blocking client to Account data
      • newAssetRestClient

        public BybitApiAssetRestClient newAssetRestClient()
        Creates a new synchronous/blocking REST client to Asset data
      • newAsyncAssetRestClient

        public BybitApiAsyncAssetRestClient newAsyncAssetRestClient()
        Creates a new asynchronous/non-blocking client to Asset data
      • newBrokerRestClient

        public BybitApiBrokerRestClient newBrokerRestClient()
        Creates a new synchronous/blocking REST client to Broker earning data
      • newAsyncBrokerRestClient

        public BybitApiAsyncBrokerRestClient newAsyncBrokerRestClient()
        Creates a new asynchronous/non-blocking client to Broker earning data
      • newWebsocketClient

        public WebsocketClient newWebsocketClient()
        Access to public websocket
      • newWebsocketClient

        public WebsocketClient newWebsocketClient​(int pingInterval)
      • newWebsocketClient

        public WebsocketClient newWebsocketClient​(int pingInterval,
                                                  String maxAliveTime)