com.bybit.api.client.impl.BybitApBrokerRestClientImpl 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.impl;
import com.bybit.api.client.restApi.BybitApiBrokerRestClient;
import com.bybit.api.client.restApi.BybitApiService;
import com.bybit.api.client.domain.broker.BrokerDataRequest;
import static com.bybit.api.client.service.BybitApiServiceGenerator.createService;
import static com.bybit.api.client.service.BybitApiServiceGenerator.executeSync;
public class BybitApBrokerRestClientImpl implements BybitApiBrokerRestClient {
private final BybitApiService bybitApiService;
public BybitApBrokerRestClientImpl(String apiKey, String secret, String baseUrl, boolean debugMode, long recvWindow, String logOption) {
bybitApiService = createService(BybitApiService.class, apiKey, secret, baseUrl, debugMode, recvWindow, logOption, "");
}
// Broker
@Override
public Object getBrokerEarningData(BrokerDataRequest brokerDataRequest) {
return executeSync(bybitApiService.getBrokerEarningData(
brokerDataRequest.getBizType() == null ? null : brokerDataRequest.getBizType().getType(),
brokerDataRequest.getStartTime(),
brokerDataRequest.getEndTime(),
brokerDataRequest.getLimit(),
brokerDataRequest.getCursor()
));
}
@Override
public Object getBrokerAccountInfo() {
return executeSync(bybitApiService.getBrokerAccountInfo());
}
@Override
public Object getSubAccountsDeposits(BrokerDataRequest brokerDataRequest) {
return executeSync(bybitApiService.getBrokerSubDeposits(
brokerDataRequest.getSubMemberId(),
brokerDataRequest.getCoin(),
brokerDataRequest.getStartTime(),
brokerDataRequest.getEndTime(),
brokerDataRequest.getLimit(),
brokerDataRequest.getCursor()
));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy