Skip to content
This repository has been archived by the owner on Nov 25, 2021. It is now read-only.

Latest commit

 

History

History
328 lines (248 loc) · 10.6 KB

LinearConditionalApi.md

File metadata and controls

328 lines (248 loc) · 10.6 KB

LinearConditionalApi

All URIs are relative to https://api.bybit.com

Method HTTP request Description
linearConditionalCancel POST /private/linear/stop-order/cancel Cancel Active Order
linearConditionalCancelAll POST /private/linear/stop-order/cancel-all Cancel all stop orders.
linearConditionalGetOrders GET /private/linear/stop-order/list Get linear Stop Orders
linearConditionalNew POST /private/linear/stop-order/create Create linear stop Order
linearConditionalQuery GET /private/linear/stop-order/search Get Stop Orders(real-time)
linearConditionalReplace POST /private/linear/stop-order/replace Replace conditional order

linearConditionalCancel

Object linearConditionalCancel(stopOrderId, orderLinkId, symbol)

Cancel Active Order

This will cancel linear active order

Example

// Import classes:
//import io.swagger.client.api.LinearConditionalApi;

LinearConditionalApi apiInstance = new LinearConditionalApi();
String stopOrderId = "stopOrderId_example"; // String | 
String orderLinkId = "orderLinkId_example"; // String | 
String symbol = "symbol_example"; // String | 
try {
    Object result = apiInstance.linearConditionalCancel(stopOrderId, orderLinkId, symbol);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LinearConditionalApi#linearConditionalCancel");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
stopOrderId String [optional]
orderLinkId String [optional]
symbol String [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

linearConditionalCancelAll

Object linearConditionalCancelAll(symbol)

Cancel all stop orders.

Example

// Import classes:
//import io.swagger.client.api.LinearConditionalApi;

LinearConditionalApi apiInstance = new LinearConditionalApi();
String symbol = "symbol_example"; // String | Contract type.
try {
    Object result = apiInstance.linearConditionalCancelAll(symbol);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LinearConditionalApi#linearConditionalCancelAll");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
symbol String Contract type.

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

linearConditionalGetOrders

Object linearConditionalGetOrders(stopOrderId, orderLinkId, symbol, order, page, limit, stopOrderStatus)

Get linear Stop Orders

This will get linear active orders

Example

// Import classes:
//import io.swagger.client.api.LinearConditionalApi;

LinearConditionalApi apiInstance = new LinearConditionalApi();
String stopOrderId = "stopOrderId_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 stopOrderStatus = "stopOrderStatus_example"; // String | 
try {
    Object result = apiInstance.linearConditionalGetOrders(stopOrderId, orderLinkId, symbol, order, page, limit, stopOrderStatus);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LinearConditionalApi#linearConditionalGetOrders");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
stopOrderId String [optional]
orderLinkId String [optional]
symbol String [optional]
order String [optional]
page String [optional]
limit String [optional]
stopOrderStatus String [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

linearConditionalNew

Object linearConditionalNew(symbol, side, orderType, qty, price, basePrice, stopPx, timeInForce, triggerBy, reduceOnly, closeOnTrigger, orderLinkId, takeProfit, stopLoss, tpTriggerBy, slTriggerBy)

Create linear stop Order

This will create linear stop order

Example

// Import classes:
//import io.swagger.client.api.LinearConditionalApi;

LinearConditionalApi apiInstance = new LinearConditionalApi();
String symbol = "symbol_example"; // String | 
String side = "side_example"; // String | 
String orderType = "orderType_example"; // String | 
Double qty = 3.4D; // Double | 
Double price = 3.4D; // Double | 
Double basePrice = 3.4D; // Double | 
Double stopPx = 3.4D; // Double | 
String timeInForce = "timeInForce_example"; // String | 
String triggerBy = "triggerBy_example"; // String | 
Boolean reduceOnly = true; // Boolean | 
Boolean closeOnTrigger = true; // Boolean | 
String orderLinkId = "orderLinkId_example"; // String | 
Double takeProfit = 3.4D; // Double | 
Double stopLoss = 3.4D; // Double | 
String tpTriggerBy = "tpTriggerBy_example"; // String | 
String slTriggerBy = "slTriggerBy_example"; // String | 
try {
    Object result = apiInstance.linearConditionalNew(symbol, side, orderType, qty, price, basePrice, stopPx, timeInForce, triggerBy, reduceOnly, closeOnTrigger, orderLinkId, takeProfit, stopLoss, tpTriggerBy, slTriggerBy);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LinearConditionalApi#linearConditionalNew");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
symbol String [optional]
side String [optional]
orderType String [optional]
qty Double [optional]
price Double [optional]
basePrice Double [optional]
stopPx Double [optional]
timeInForce String [optional]
triggerBy String [optional]
reduceOnly Boolean [optional]
closeOnTrigger Boolean [optional]
orderLinkId String [optional]
takeProfit Double [optional]
stopLoss Double [optional]
tpTriggerBy String [optional]
slTriggerBy String [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json

linearConditionalQuery

Object linearConditionalQuery(symbol, stopOrderId, orderLinkId)

Get Stop Orders(real-time)

This will get linear stop orders(real-time)

Example

// Import classes:
//import io.swagger.client.api.LinearConditionalApi;

LinearConditionalApi apiInstance = new LinearConditionalApi();
String symbol = "symbol_example"; // String | 
String stopOrderId = "stopOrderId_example"; // String | 
String orderLinkId = "orderLinkId_example"; // String | 
try {
    Object result = apiInstance.linearConditionalQuery(symbol, stopOrderId, orderLinkId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LinearConditionalApi#linearConditionalQuery");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
symbol String [optional]
stopOrderId String [optional]
orderLinkId String [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

linearConditionalReplace

Object linearConditionalReplace(symbol, stopOrderId, orderLinkId, pRQty, pRPrice, pRTriggerPrice)

Replace conditional order

Example

// Import classes:
//import io.swagger.client.api.LinearConditionalApi;

LinearConditionalApi apiInstance = new LinearConditionalApi();
String symbol = "symbol_example"; // String | 
String stopOrderId = "stopOrderId_example"; // String | 
String orderLinkId = "orderLinkId_example"; // String | 
String pRQty = "pRQty_example"; // String | 
BigDecimal pRPrice = new BigDecimal(); // BigDecimal | 
BigDecimal pRTriggerPrice = new BigDecimal(); // BigDecimal | 
try {
    Object result = apiInstance.linearConditionalReplace(symbol, stopOrderId, orderLinkId, pRQty, pRPrice, pRTriggerPrice);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling LinearConditionalApi#linearConditionalReplace");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
symbol String
stopOrderId String [optional]
orderLinkId String [optional]
pRQty String [optional]
pRPrice BigDecimal [optional]
pRTriggerPrice BigDecimal [optional]

Return type

Object

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded
  • Accept: application/json