All URIs are relative to https://api.bybit.com
Method | HTTP request | Description |
---|---|---|
klineGet | GET /v2/public/kline/list | Query historical kline. |
klineMarkPrice | GET /v2/public/mark-price-kline | Query mark price kline. |
Object klineGet(symbol, interval, from, limit)
Query historical kline.
// Import classes:
//import io.swagger.client.api.KlineApi;
KlineApi apiInstance = new KlineApi();
String symbol = "symbol_example"; // String | Contract type.
String interval = "interval_example"; // String | Kline interval.
BigDecimal from = new BigDecimal(); // BigDecimal | from timestamp.
BigDecimal limit = new BigDecimal(); // BigDecimal | Contract type.
try {
Object result = apiInstance.klineGet(symbol, interval, from, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling KlineApi#klineGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
interval | String | Kline interval. | |
from | BigDecimal | from timestamp. | |
limit | BigDecimal | Contract type. | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object klineMarkPrice(symbol, interval, from, limit)
Query mark price kline.
// Import classes:
//import io.swagger.client.api.KlineApi;
KlineApi apiInstance = new KlineApi();
String symbol = "symbol_example"; // String | Contract type.
String interval = "interval_example"; // String | Data refresh interval
Integer from = 56; // Integer | From timestamp in seconds
Integer limit = 56; // Integer | Limit for data size, max size is 1000. Default size is 500
try {
Object result = apiInstance.klineMarkPrice(symbol, interval, from, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling KlineApi#klineMarkPrice");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
interval | String | Data refresh interval | |
from | Integer | From timestamp in seconds | |
limit | Integer | Limit for data size, max size is 1000. Default size is 500 | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json