All URIs are relative to https://api.bybit.com
Method | HTTP request | Description |
---|---|---|
linearOrderCancel | POST /private/linear/order/cancel | Cancel Active Order |
linearOrderCancelAll | POST /private/linear/order/cancel-all | Cancel all active orders. |
linearOrderGetOrders | GET /private/linear/order/list | Get linear Active Orders |
linearOrderNew | POST /private/linear/order/create | Create Active Order |
linearOrderQuery | GET /private/linear/order/search | Get Active Orders(real-time) |
linearOrderReplace | POST /private/linear/order/replace | Replace Active Order |
Object linearOrderCancel(orderId, orderLinkId, symbol)
Cancel Active Order
This will cancel linear active order
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LinearOrderApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: apiSignature
ApiKeyAuth apiSignature = (ApiKeyAuth) defaultClient.getAuthentication("apiSignature");
apiSignature.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.setApiKeyPrefix("Token");
// Configure API key authorization: timestamp
ApiKeyAuth timestamp = (ApiKeyAuth) defaultClient.getAuthentication("timestamp");
timestamp.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.setApiKeyPrefix("Token");
LinearOrderApi apiInstance = new LinearOrderApi();
String orderId = "orderId_example"; // String |
String orderLinkId = "orderLinkId_example"; // String |
String symbol = "symbol_example"; // String |
try {
Object result = apiInstance.linearOrderCancel(orderId, orderLinkId, symbol);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LinearOrderApi#linearOrderCancel");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
orderId | String | [optional] | |
orderLinkId | String | [optional] | |
symbol | String | [optional] |
Object
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Object linearOrderCancelAll(symbol)
Cancel all active orders.
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LinearOrderApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: apiSignature
ApiKeyAuth apiSignature = (ApiKeyAuth) defaultClient.getAuthentication("apiSignature");
apiSignature.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.setApiKeyPrefix("Token");
// Configure API key authorization: timestamp
ApiKeyAuth timestamp = (ApiKeyAuth) defaultClient.getAuthentication("timestamp");
timestamp.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.setApiKeyPrefix("Token");
LinearOrderApi apiInstance = new LinearOrderApi();
String symbol = "symbol_example"; // String | Contract type.
try {
Object result = apiInstance.linearOrderCancelAll(symbol);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LinearOrderApi#linearOrderCancelAll");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | Contract type. |
Object
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Object linearOrderGetOrders(orderId, orderLinkId, symbol, order, page, limit, orderStatus)
Get linear Active Orders
This will get linear active orders
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LinearOrderApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: apiSignature
ApiKeyAuth apiSignature = (ApiKeyAuth) defaultClient.getAuthentication("apiSignature");
apiSignature.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.setApiKeyPrefix("Token");
// Configure API key authorization: timestamp
ApiKeyAuth timestamp = (ApiKeyAuth) defaultClient.getAuthentication("timestamp");
timestamp.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.setApiKeyPrefix("Token");
LinearOrderApi apiInstance = new LinearOrderApi();
String orderId = "orderId_example"; // String |
String orderLinkId = "orderLinkId_example"; // String |
String symbol = "symbol_example"; // String |
String order = "order_example"; // String |
String page = "page_example"; // String |
String limit = "limit_example"; // String |
String orderStatus = "orderStatus_example"; // String |
try {
Object result = apiInstance.linearOrderGetOrders(orderId, orderLinkId, symbol, order, page, limit, orderStatus);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LinearOrderApi#linearOrderGetOrders");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
orderId | String | [optional] | |
orderLinkId | String | [optional] | |
symbol | String | [optional] | |
order | String | [optional] | |
page | String | [optional] | |
limit | String | [optional] | |
orderStatus | String | [optional] |
Object
apiKey, apiSignature, timestamp
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object linearOrderNew(symbol, side, orderType, timeInForce, qty, price, takeProfit, stopLoss, reduceOnly, tpTriggerBy, slTriggerBy, closeOnTrigger, orderLinkId)
Create Active Order
This will create linear order
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LinearOrderApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: apiSignature
ApiKeyAuth apiSignature = (ApiKeyAuth) defaultClient.getAuthentication("apiSignature");
apiSignature.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.setApiKeyPrefix("Token");
// Configure API key authorization: timestamp
ApiKeyAuth timestamp = (ApiKeyAuth) defaultClient.getAuthentication("timestamp");
timestamp.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.setApiKeyPrefix("Token");
LinearOrderApi apiInstance = new LinearOrderApi();
String symbol = "symbol_example"; // String |
String side = "side_example"; // String |
String orderType = "orderType_example"; // String |
String timeInForce = "timeInForce_example"; // String |
Double qty = 3.4D; // Double |
Double price = 3.4D; // Double |
Double takeProfit = 3.4D; // Double |
Double stopLoss = 3.4D; // Double |
Boolean reduceOnly = true; // Boolean |
String tpTriggerBy = "tpTriggerBy_example"; // String |
String slTriggerBy = "slTriggerBy_example"; // String |
Boolean closeOnTrigger = true; // Boolean |
String orderLinkId = "orderLinkId_example"; // String |
try {
Object result = apiInstance.linearOrderNew(symbol, side, orderType, timeInForce, qty, price, takeProfit, stopLoss, reduceOnly, tpTriggerBy, slTriggerBy, closeOnTrigger, orderLinkId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LinearOrderApi#linearOrderNew");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | [optional] | |
side | String | [optional] | |
orderType | String | [optional] | |
timeInForce | String | [optional] | |
qty | Double | [optional] | |
price | Double | [optional] | |
takeProfit | Double | [optional] | |
stopLoss | Double | [optional] | |
reduceOnly | Boolean | [optional] | |
tpTriggerBy | String | [optional] | |
slTriggerBy | String | [optional] | |
closeOnTrigger | Boolean | [optional] | |
orderLinkId | String | [optional] |
Object
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
Object linearOrderQuery(symbol, orderId, orderLinkId)
Get Active Orders(real-time)
This will get linear active orders(real-time)
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LinearOrderApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: apiSignature
ApiKeyAuth apiSignature = (ApiKeyAuth) defaultClient.getAuthentication("apiSignature");
apiSignature.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.setApiKeyPrefix("Token");
// Configure API key authorization: timestamp
ApiKeyAuth timestamp = (ApiKeyAuth) defaultClient.getAuthentication("timestamp");
timestamp.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.setApiKeyPrefix("Token");
LinearOrderApi apiInstance = new LinearOrderApi();
String symbol = "symbol_example"; // String |
String orderId = "orderId_example"; // String |
String orderLinkId = "orderLinkId_example"; // String |
try {
Object result = apiInstance.linearOrderQuery(symbol, orderId, orderLinkId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LinearOrderApi#linearOrderQuery");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | [optional] | |
orderId | String | [optional] | |
orderLinkId | String | [optional] |
Object
apiKey, apiSignature, timestamp
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
Object linearOrderReplace(symbol, orderId, orderLinkId, pRQty, pRPrice)
Replace Active Order
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.LinearOrderApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: apiKey
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("apiKey");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: apiSignature
ApiKeyAuth apiSignature = (ApiKeyAuth) defaultClient.getAuthentication("apiSignature");
apiSignature.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiSignature.setApiKeyPrefix("Token");
// Configure API key authorization: timestamp
ApiKeyAuth timestamp = (ApiKeyAuth) defaultClient.getAuthentication("timestamp");
timestamp.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//timestamp.setApiKeyPrefix("Token");
LinearOrderApi apiInstance = new LinearOrderApi();
String symbol = "symbol_example"; // String |
String orderId = "orderId_example"; // String |
String orderLinkId = "orderLinkId_example"; // String |
String pRQty = "pRQty_example"; // String |
BigDecimal pRPrice = new BigDecimal(); // BigDecimal |
try {
Object result = apiInstance.linearOrderReplace(symbol, orderId, orderLinkId, pRQty, pRPrice);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LinearOrderApi#linearOrderReplace");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | ||
orderId | String | [optional] | |
orderLinkId | String | [optional] | |
pRQty | String | [optional] | |
pRPrice | BigDecimal | [optional] |
Object
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json