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

Latest commit

 

History

History
80 lines (56 loc) · 2.81 KB

SWGLinearMarketApi.md

File metadata and controls

80 lines (56 loc) · 2.81 KB

SWGLinearMarketApi

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

Method HTTP request Description
linearMarketTrading GET /public/linear/recent-trading-records Get recent trades

linearMarketTrading

-(NSURLSessionTask*) linearMarketTradingWithSymbol: (NSString*) symbol
    limit: (NSString*) limit
        completionHandler: (void (^)(NSObject* output, NSError* error)) handler;

Get recent trades

This will get recent trades

Example

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.
NSString* limit = @"limit_example"; // Contract type. (optional)

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

// Get recent trades
[apiInstance linearMarketTradingWithSymbol:symbol
              limit:limit
          completionHandler: ^(NSObject* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGLinearMarketApi->linearMarketTrading: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
symbol NSString* Contract type.
limit NSString* Contract type. [optional]

Return type

NSObject*

Authorization

apiKey, apiSignature, timestamp

HTTP request headers

  • 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]