com.bybit.api.client.exception.BybitApiException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bybit-java-api Show documentation
Show all versions of bybit-java-api Show documentation
The Official Java API connector for Bybit's HTTP and WebSocket APIs.
Dive into a plethora of functionalities:
- Market Data Retrieval
- Trade Execution
- Position Management
- Account and Asset Info Retrieval
- User and Upgrade Management
— Public Websocket Streaming
- Private Websocket Streaming
- Lending Institution and Client
- Broker Earning Data
The newest version!
package com.bybit.api.client.exception;
import lombok.Getter;
/**
* An exception which can occur while invoking methods of the Bybit API.
*/
@Getter
public class BybitApiException extends RuntimeException {
private static final long serialVersionUID = 3788669840036201041L;
/**
* Error response object returned by Bybit API.
* -- GETTER --
*/
private BybitApiError error;
/**
* Instantiates a new Bybit api exception.
*
* @param error an error response object
*/
public BybitApiException(BybitApiError error) {
this.error = error;
}
/**
* Instantiates a new Bybit api exception.
*/
public BybitApiException() {
super();
}
/**
* Instantiates a new Bybit api exception.
*
* @param message the message
*/
public BybitApiException(String message) {
super(message);
}
/**
* Instantiates a new Bybit api exception.
*
* @param cause the cause
*/
public BybitApiException(Throwable cause) {
super(cause);
}
/**
* Instantiates a new Bybit api exception.
*
* @param message the message
* @param cause the cause
*/
public BybitApiException(String message, Throwable cause) {
super(message, cause);
}
@Override
public String getMessage() {
if (error != null) {
return error.getMsg();
}
return super.getMessage();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy