Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 2.17 KB

SWGOrderBookApi.md

File metadata and controls

61 lines (42 loc) · 2.17 KB

SWGOrderBookApi

All URIs are relative to https://www.bitmex.com/api/v1

Method HTTP request Description
orderBookGetL2 GET /orderBook/L2 Get current orderbook in vertical format.

orderBookGetL2

-(NSURLSessionTask*) orderBookGetL2WithSymbol: (NSString*) symbol
    depth: (NSNumber*) depth
        completionHandler: (void (^)(NSArray<SWGOrderBookL2>* output, NSError* error)) handler;

Get current orderbook in vertical format.

Example

NSString* symbol = @"symbol_example"; // Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
NSNumber* depth = @25; // Orderbook depth per side. Send 0 for full depth. (optional) (default to 25)

SWGOrderBookApi*apiInstance = [[SWGOrderBookApi alloc] init];

// Get current orderbook in vertical format.
[apiInstance orderBookGetL2WithSymbol:symbol
              depth:depth
          completionHandler: ^(NSArray<SWGOrderBookL2>* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGOrderBookApi->orderBookGetL2: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
symbol NSString* Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
depth NSNumber* Orderbook depth per side. Send 0 for full depth. [optional] [default to 25]

Return type

NSArray*

Authorization

No authorization required

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]