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 |
-(NSURLSessionTask*) linearOrderCancelWithOrderId: (NSString*) orderId
orderLinkId: (NSString*) orderLinkId
symbol: (NSString*) symbol
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Cancel Active Order
This will cancel linear active order
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure API key authorization: (authentication scheme: apiSignature)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sign"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sign"];
// Configure API key authorization: (authentication scheme: timestamp)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"timestamp"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"timestamp"];
NSString* orderId = @"orderId_example"; // (optional)
NSString* orderLinkId = @"orderLinkId_example"; // (optional)
NSString* symbol = @"symbol_example"; // (optional)
SWGLinearOrderApi*apiInstance = [[SWGLinearOrderApi alloc] init];
// Cancel Active Order
[apiInstance linearOrderCancelWithOrderId:orderId
orderLinkId:orderLinkId
symbol:symbol
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGLinearOrderApi->linearOrderCancel: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
orderId | NSString* | [optional] | |
orderLinkId | NSString* | [optional] | |
symbol | NSString* | [optional] |
NSObject*
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) linearOrderCancelAllWithSymbol: (NSString*) symbol
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Cancel all active orders.
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure API key authorization: (authentication scheme: apiSignature)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sign"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sign"];
// Configure API key authorization: (authentication scheme: timestamp)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"timestamp"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"timestamp"];
NSString* symbol = @"symbol_example"; // Contract type.
SWGLinearOrderApi*apiInstance = [[SWGLinearOrderApi alloc] init];
// Cancel all active orders.
[apiInstance linearOrderCancelAllWithSymbol:symbol
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGLinearOrderApi->linearOrderCancelAll: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
symbol | NSString* | Contract type. |
NSObject*
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) linearOrderGetOrdersWithOrderId: (NSString*) orderId
orderLinkId: (NSString*) orderLinkId
symbol: (NSString*) symbol
order: (NSString*) order
page: (NSString*) page
limit: (NSString*) limit
orderStatus: (NSString*) orderStatus
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Get linear Active Orders
This will get linear active orders
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure API key authorization: (authentication scheme: apiSignature)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sign"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sign"];
// Configure API key authorization: (authentication scheme: timestamp)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"timestamp"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"timestamp"];
NSString* orderId = @"orderId_example"; // (optional)
NSString* orderLinkId = @"orderLinkId_example"; // (optional)
NSString* symbol = @"symbol_example"; // (optional)
NSString* order = @"order_example"; // (optional)
NSString* page = @"page_example"; // (optional)
NSString* limit = @"limit_example"; // (optional)
NSString* orderStatus = @"orderStatus_example"; // (optional)
SWGLinearOrderApi*apiInstance = [[SWGLinearOrderApi alloc] init];
// Get linear Active Orders
[apiInstance linearOrderGetOrdersWithOrderId:orderId
orderLinkId:orderLinkId
symbol:symbol
order:order
page:page
limit:limit
orderStatus:orderStatus
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGLinearOrderApi->linearOrderGetOrders: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
orderId | NSString* | [optional] | |
orderLinkId | NSString* | [optional] | |
symbol | NSString* | [optional] | |
order | NSString* | [optional] | |
page | NSString* | [optional] | |
limit | NSString* | [optional] | |
orderStatus | NSString* | [optional] |
NSObject*
apiKey, apiSignature, timestamp
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) linearOrderNewWithSymbol: (NSString*) symbol
side: (NSString*) side
orderType: (NSString*) orderType
timeInForce: (NSString*) timeInForce
qty: (NSNumber*) qty
price: (NSNumber*) price
takeProfit: (NSNumber*) takeProfit
stopLoss: (NSNumber*) stopLoss
reduceOnly: (NSNumber*) reduceOnly
tpTriggerBy: (NSString*) tpTriggerBy
slTriggerBy: (NSString*) slTriggerBy
closeOnTrigger: (NSNumber*) closeOnTrigger
orderLinkId: (NSString*) orderLinkId
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Create Active Order
This will create linear order
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure API key authorization: (authentication scheme: apiSignature)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sign"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sign"];
// Configure API key authorization: (authentication scheme: timestamp)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"timestamp"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"timestamp"];
NSString* symbol = @"symbol_example"; // (optional)
NSString* side = @"side_example"; // (optional)
NSString* orderType = @"orderType_example"; // (optional)
NSString* timeInForce = @"timeInForce_example"; // (optional)
NSNumber* qty = @1.2; // (optional)
NSNumber* price = @1.2; // (optional)
NSNumber* takeProfit = @1.2; // (optional)
NSNumber* stopLoss = @1.2; // (optional)
NSNumber* reduceOnly = @true; // (optional)
NSString* tpTriggerBy = @"tpTriggerBy_example"; // (optional)
NSString* slTriggerBy = @"slTriggerBy_example"; // (optional)
NSNumber* closeOnTrigger = @true; // (optional)
NSString* orderLinkId = @"orderLinkId_example"; // (optional)
SWGLinearOrderApi*apiInstance = [[SWGLinearOrderApi alloc] init];
// Create Active Order
[apiInstance linearOrderNewWithSymbol:symbol
side:side
orderType:orderType
timeInForce:timeInForce
qty:qty
price:price
takeProfit:takeProfit
stopLoss:stopLoss
reduceOnly:reduceOnly
tpTriggerBy:tpTriggerBy
slTriggerBy:slTriggerBy
closeOnTrigger:closeOnTrigger
orderLinkId:orderLinkId
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGLinearOrderApi->linearOrderNew: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
symbol | NSString* | [optional] | |
side | NSString* | [optional] | |
orderType | NSString* | [optional] | |
timeInForce | NSString* | [optional] | |
qty | NSNumber* | [optional] | |
price | NSNumber* | [optional] | |
takeProfit | NSNumber* | [optional] | |
stopLoss | NSNumber* | [optional] | |
reduceOnly | NSNumber* | [optional] | |
tpTriggerBy | NSString* | [optional] | |
slTriggerBy | NSString* | [optional] | |
closeOnTrigger | NSNumber* | [optional] | |
orderLinkId | NSString* | [optional] |
NSObject*
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) linearOrderQueryWithSymbol: (NSString*) symbol
orderId: (NSString*) orderId
orderLinkId: (NSString*) orderLinkId
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Get Active Orders(real-time)
This will get linear active orders(real-time)
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure API key authorization: (authentication scheme: apiSignature)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sign"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sign"];
// Configure API key authorization: (authentication scheme: timestamp)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"timestamp"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"timestamp"];
NSString* symbol = @"symbol_example"; // (optional)
NSString* orderId = @"orderId_example"; // (optional)
NSString* orderLinkId = @"orderLinkId_example"; // (optional)
SWGLinearOrderApi*apiInstance = [[SWGLinearOrderApi alloc] init];
// Get Active Orders(real-time)
[apiInstance linearOrderQueryWithSymbol:symbol
orderId:orderId
orderLinkId:orderLinkId
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGLinearOrderApi->linearOrderQuery: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
symbol | NSString* | [optional] | |
orderId | NSString* | [optional] | |
orderLinkId | NSString* | [optional] |
NSObject*
apiKey, apiSignature, timestamp
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
-(NSURLSessionTask*) linearOrderReplaceWithSymbol: (NSString*) symbol
orderId: (NSString*) orderId
orderLinkId: (NSString*) orderLinkId
pRQty: (NSString*) pRQty
pRPrice: (NSNumber*) pRPrice
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Replace Active Order
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiKey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api_key"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api_key"];
// Configure API key authorization: (authentication scheme: apiSignature)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sign"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sign"];
// Configure API key authorization: (authentication scheme: timestamp)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"timestamp"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"timestamp"];
NSString* symbol = @"symbol_example"; //
NSString* orderId = @"orderId_example"; // (optional)
NSString* orderLinkId = @"orderLinkId_example"; // (optional)
NSString* pRQty = @"pRQty_example"; // (optional)
NSNumber* pRPrice = @8.14; // (optional)
SWGLinearOrderApi*apiInstance = [[SWGLinearOrderApi alloc] init];
// Replace Active Order
[apiInstance linearOrderReplaceWithSymbol:symbol
orderId:orderId
orderLinkId:orderLinkId
pRQty:pRQty
pRPrice:pRPrice
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGLinearOrderApi->linearOrderReplace: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
symbol | NSString* | ||
orderId | NSString* | [optional] | |
orderLinkId | NSString* | [optional] | |
pRQty | NSString* | [optional] | |
pRPrice | NSNumber* | [optional] |
NSObject*
apiKey, apiSignature, timestamp
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]