All URIs are relative to https://api.bybit.com
Method | HTTP request | Description |
---|---|---|
marketAccountRatio | GET /v2/public/account-ratio | Query Account Long Short Ratio |
marketBigDeal | GET /v2/public/big-deal | Query Big Deal |
marketLiqRecords | GET /v2/public/liq-records | Query liq records. |
marketOpenInterest | GET /v2/public/open-interest | Query Open Interest |
marketOrderbook | GET /v2/public/orderBook/L2 | Get the orderbook. |
marketSymbolInfo | GET /v2/public/tickers | Get the latest information for symbol. |
marketTradingRecords | GET /v2/public/trading-records | Get recent trades |
Object marketAccountRatio(symbol, period, limit)
Query Account Long Short Ratio
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
String period = "period_example"; // String | Data recording period. 5min, 15min, 30min, 1h, 4h, 1d
Integer limit = 56; // Integer | Limit for data size, max size is 500. Default size is 50
try {
Object result = apiInstance.marketAccountRatio(symbol, period, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketAccountRatio");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
period | String | Data recording period. 5min, 15min, 30min, 1h, 4h, 1d | |
limit | Integer | Limit for data size, max size is 500. Default size is 50 | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object marketBigDeal(symbol, limit)
Query Big Deal
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
Integer limit = 56; // Integer | Limit for data size, max size is 1000. Default size is 500
try {
Object result = apiInstance.marketBigDeal(symbol, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketBigDeal");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
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
Object marketLiqRecords(symbol, from, limit, startTime, endTime)
Query liq records.
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
Integer from = 56; // Integer | From ID. Default: return latest data
Integer limit = 56; // Integer | Limit for data size, max size is 1000. Default size is 500
Integer startTime = 56; // Integer | Start timestamp point for result, in millisecond
Integer endTime = 56; // Integer | End timestamp point for result, in millisecond
try {
Object result = apiInstance.marketLiqRecords(symbol, from, limit, startTime, endTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketLiqRecords");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
from | Integer | From ID. Default: return latest data | [optional] |
limit | Integer | Limit for data size, max size is 1000. Default size is 500 | [optional] |
startTime | Integer | Start timestamp point for result, in millisecond | [optional] |
endTime | Integer | End timestamp point for result, in millisecond | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object marketOpenInterest(symbol, period, limit)
Query Open Interest
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
String period = "period_example"; // String | Data recording period. 5min, 15min, 30min, 1h, 4h, 1d
Integer limit = 56; // Integer | Limit for data size, max size is 200. Default size is 50
try {
Object result = apiInstance.marketOpenInterest(symbol, period, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketOpenInterest");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
period | String | Data recording period. 5min, 15min, 30min, 1h, 4h, 1d | |
limit | Integer | Limit for data size, max size is 200. Default size is 50 | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object marketOrderbook(symbol)
Get the orderbook.
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
try {
Object result = apiInstance.marketOrderbook(symbol);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketOrderbook");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object marketSymbolInfo(symbol)
Get the latest information for symbol.
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
try {
Object result = apiInstance.marketSymbolInfo(symbol);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketSymbolInfo");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object marketTradingRecords(symbol, from, limit)
Get recent trades
// Import classes:
//import io.swagger.client.api.MarketApi;
MarketApi apiInstance = new MarketApi();
String symbol = "symbol_example"; // String | Contract type.
Integer from = 56; // Integer | From ID. Default: return latest data
Integer limit = 56; // Integer | Number of results. Default 500; max 1000
try {
Object result = apiInstance.marketTradingRecords(symbol, from, limit);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MarketApi#marketTradingRecords");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. | |
from | Integer | From ID. Default: return latest data | [optional] |
limit | Integer | Number of results. Default 500; max 1000 | [optional] |
Object
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json