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

Latest commit

 

History

History
147 lines (100 loc) · 4.11 KB

SWGCommonApi.md

File metadata and controls

147 lines (100 loc) · 4.11 KB

SWGCommonApi

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

Method HTTP request Description
commonAnnouncements GET /v2/public/announcement Get Bybit OpenAPI announcements in the last 30 days in reverse order.
commonGetLcp GET /v2/private/account/lcp Query LCP info.
commonGetTime GET /v2/public/time Get bybit server time.

commonAnnouncements

-(NSURLSessionTask*) commonAnnouncementsWithCompletionHandler: 
        (void (^)(NSObject* output, NSError* error)) handler;

Get Bybit OpenAPI announcements in the last 30 days in reverse order.

Example

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

// Get Bybit OpenAPI announcements in the last 30 days in reverse order.
[apiInstance commonAnnouncementsWithCompletionHandler: 
          ^(NSObject* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGCommonApi->commonAnnouncements: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

Return type

NSObject*

Authorization

No authorization required

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]

commonGetLcp

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

Query LCP info.

Example

NSString* symbol = @"symbol_example"; // Contract type

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

// Query LCP info.
[apiInstance commonGetLcpWithSymbol:symbol
          completionHandler: ^(NSObject* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGCommonApi->commonGetLcp: %@", error);
                        }
                    }];

Parameters

Name Type Description Notes
symbol NSString* Contract type

Return type

NSObject*

Authorization

No authorization required

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]

commonGetTime

-(NSURLSessionTask*) commonGetTimeWithCompletionHandler: 
        (void (^)(NSObject* output, NSError* error)) handler;

Get bybit server time.

Example

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

// Get bybit server time.
[apiInstance commonGetTimeWithCompletionHandler: 
          ^(NSObject* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling SWGCommonApi->commonGetTime: %@", error);
                        }
                    }];

Parameters

This endpoint does not need any parameter.

Return type

NSObject*

Authorization

No authorization required

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]