All URIs are relative to https://www.bitmex.com/api/v1
Method | HTTP request | Description |
---|---|---|
chatGet | GET /chat | Get chat messages. |
chatGetChannels | GET /chat/channels | Get available channels. |
chatGetConnected | GET /chat/connected | Get connected users. |
chatGetPinnedMessage | GET /chat/pinned | Get pinned message for a channel. |
chatNew | POST /chat | Send a chat message. |
-(NSURLSessionTask*) chatGetWithCount: (NSNumber*) count
start: (NSNumber*) start
reverse: (NSNumber*) reverse
channelID: (NSNumber*) channelID
completionHandler: (void (^)(NSArray<SWGChat>* output, NSError* error)) handler;
Get chat messages.
NSNumber* count = @100; // Number of results to fetch. (optional) (default to 100)
NSNumber* start = @0; // Starting ID for results. (optional) (default to 0)
NSNumber* reverse = @true; // If true, will sort results newest first. (optional) (default to true)
NSNumber* channelID = @1; // Channel id. GET /chat/channels for ids. Global English by default (optional) (default to 1)
SWGChatApi*apiInstance = [[SWGChatApi alloc] init];
// Get chat messages.
[apiInstance chatGetWithCount:count
start:start
reverse:reverse
channelID:channelID
completionHandler: ^(NSArray<SWGChat>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGChatApi->chatGet: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
count | NSNumber* | Number of results to fetch. | [optional] [default to 100] |
start | NSNumber* | Starting ID for results. | [optional] [default to 0] |
reverse | NSNumber* | If true, will sort results newest first. | [optional] [default to true] |
channelID | NSNumber* | Channel id. GET /chat/channels for ids. Global English by default | [optional] [default to 1] |
No authorization required
- 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]
-(NSURLSessionTask*) chatGetChannelsWithCompletionHandler:
(void (^)(NSArray<SWGChatChannel>* output, NSError* error)) handler;
Get available channels.
SWGChatApi*apiInstance = [[SWGChatApi alloc] init];
// Get available channels.
[apiInstance chatGetChannelsWithCompletionHandler:
^(NSArray<SWGChatChannel>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGChatApi->chatGetChannels: %@", error);
}
}];
This endpoint does not need any parameter.
No authorization required
- 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]
-(NSURLSessionTask*) chatGetConnectedWithCompletionHandler:
(void (^)(SWGConnectedUsers* output, NSError* error)) handler;
Get connected users.
Returns an array with browser users in the first position and API users (bots) in the second position.
SWGChatApi*apiInstance = [[SWGChatApi alloc] init];
// Get connected users.
[apiInstance chatGetConnectedWithCompletionHandler:
^(SWGConnectedUsers* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGChatApi->chatGetConnected: %@", error);
}
}];
This endpoint does not need any parameter.
No authorization required
- 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]
-(NSURLSessionTask*) chatGetPinnedMessageWithChannelID: (NSNumber*) channelID
completionHandler: (void (^)(SWGPinnedMessage* output, NSError* error)) handler;
Get pinned message for a channel.
NSNumber* channelID = @1.2; //
SWGChatApi*apiInstance = [[SWGChatApi alloc] init];
// Get pinned message for a channel.
[apiInstance chatGetPinnedMessageWithChannelID:channelID
completionHandler: ^(SWGPinnedMessage* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGChatApi->chatGetPinnedMessage: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
channelID | NSNumber* |
No authorization required
- 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]
-(NSURLSessionTask*) chatNewWithMessage: (NSString*) message
channelID: (NSNumber*) channelID
completionHandler: (void (^)(SWGChat* output, NSError* error)) handler;
Send a chat message.
SWGDefaultConfiguration *apiConfig = [SWGDefaultConfiguration sharedConfig];
// Configure API key authorization: (authentication scheme: apiExpires)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-expires"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-expires"];
// 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:@"api-signature"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-signature"];
NSString* message = @"message_example"; //
NSNumber* channelID = @1; // Channel to post to. Default 1 (English). (optional) (default to 1)
SWGChatApi*apiInstance = [[SWGChatApi alloc] init];
// Send a chat message.
[apiInstance chatNewWithMessage:message
channelID:channelID
completionHandler: ^(SWGChat* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGChatApi->chatNew: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
message | NSString* | ||
channelID | NSNumber* | Channel to post to. Default 1 (English). | [optional] [default to 1] |
apiExpires, apiKey, apiSignature
- 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]