All URIs are relative to https://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
userCancelWithdrawal | POST /user/cancelWithdrawal | Cancel a withdrawal. |
userCheckReferralCode | GET /user/checkReferralCode | Check if a referral code is valid. |
userConfirm | POST /user/confirmEmail | Confirm your email address with a token. |
userConfirmEnableTFA | POST /user/confirmEnableTFA | Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint. |
userConfirmWithdrawal | POST /user/confirmWithdrawal | Confirm a withdrawal. |
userDisableTFA | POST /user/disableTFA | Disable two-factor auth for this account. |
userGet | GET /user | Get your user model. |
userGetAffiliateStatus | GET /user/affiliateStatus | Get your current affiliate/referral status. |
userGetCommission | GET /user/commission | Get your account's commission status. |
userGetDepositAddress | GET /user/depositAddress | Get a deposit address. |
userGetMargin | GET /user/margin | Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies. |
userGetWallet | GET /user/wallet | Get your current wallet information. |
userGetWalletHistory | GET /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). |
userGetWalletSummary | GET /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). |
userLogout | POST /user/logout | Log out of BitMEX. |
userLogoutAll | POST /user/logoutAll | Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices. |
userMinWithdrawalFee | GET /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. |
userRequestEnableTFA | POST /user/requestEnableTFA | Get secret key for setting up two-factor auth. |
userRequestWithdrawal | POST /user/requestWithdrawal | Request a withdrawal to an external wallet. |
userSavePreferences | POST /user/preferences | Save user preferences. |
userUpdate | PUT /user | Update your password, name, and other attributes. |
-(NSURLSessionTask*) userCancelWithdrawalWithToken: (NSString*) token
completionHandler: (void (^)(SWGTransaction* output, NSError* error)) handler;
Cancel a withdrawal.
NSString* token = @"token_example"; //
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Cancel a withdrawal.
[apiInstance userCancelWithdrawalWithToken:token
completionHandler: ^(SWGTransaction* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userCancelWithdrawal: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
token | NSString* |
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*) userCheckReferralCodeWithReferralCode: (NSString*) referralCode
completionHandler: (void (^)(NSNumber* output, NSError* error)) handler;
Check if a referral code is valid.
If the code is valid, responds with the referral code's discount (e.g. 0.1
for 10%). Otherwise, will return a 404.
NSString* referralCode = @"referralCode_example"; // (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Check if a referral code is valid.
[apiInstance userCheckReferralCodeWithReferralCode:referralCode
completionHandler: ^(NSNumber* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userCheckReferralCode: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
referralCode | NSString* | [optional] |
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*) userConfirmWithToken: (NSString*) token
completionHandler: (void (^)(SWGAccessToken* output, NSError* error)) handler;
Confirm your email address with a token.
NSString* token = @"token_example"; //
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Confirm your email address with a token.
[apiInstance userConfirmWithToken:token
completionHandler: ^(SWGAccessToken* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userConfirm: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
token | NSString* |
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*) userConfirmEnableTFAWithToken: (NSString*) token
type: (NSString*) type
completionHandler: (void (^)(NSNumber* output, NSError* error)) handler;
Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* token = @"token_example"; // Token from your selected TFA type.
NSString* type = @"type_example"; // Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint.
[apiInstance userConfirmEnableTFAWithToken:token
type:type
completionHandler: ^(NSNumber* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userConfirmEnableTFA: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
token | NSString* | Token from your selected TFA type. | |
type | NSString* | Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' | [optional] |
NSNumber*
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userConfirmWithdrawalWithToken: (NSString*) token
completionHandler: (void (^)(SWGTransaction* output, NSError* error)) handler;
Confirm a withdrawal.
NSString* token = @"token_example"; //
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Confirm a withdrawal.
[apiInstance userConfirmWithdrawalWithToken:token
completionHandler: ^(SWGTransaction* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userConfirmWithdrawal: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
token | NSString* |
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*) userDisableTFAWithToken: (NSString*) token
type: (NSString*) type
completionHandler: (void (^)(NSNumber* output, NSError* error)) handler;
Disable two-factor auth for this account.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* token = @"token_example"; // Token from your selected TFA type.
NSString* type = @"type_example"; // Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Disable two-factor auth for this account.
[apiInstance userDisableTFAWithToken:token
type:type
completionHandler: ^(NSNumber* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userDisableTFA: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
token | NSString* | Token from your selected TFA type. | |
type | NSString* | Two-factor auth type. Supported types: 'GA' (Google Authenticator) | [optional] |
NSNumber*
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetWithCompletionHandler:
(void (^)(SWGUser* output, NSError* error)) handler;
Get your user model.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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"];
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get your user model.
[apiInstance userGetWithCompletionHandler:
^(SWGUser* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGet: %@", error);
}
}];
This endpoint does not need any parameter.
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetAffiliateStatusWithCompletionHandler:
(void (^)(SWGAffiliate* output, NSError* error)) handler;
Get your current affiliate/referral status.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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"];
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get your current affiliate/referral status.
[apiInstance userGetAffiliateStatusWithCompletionHandler:
^(SWGAffiliate* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetAffiliateStatus: %@", error);
}
}];
This endpoint does not need any parameter.
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetCommissionWithCompletionHandler:
(void (^)(NSArray<SWGUserCommission>* output, NSError* error)) handler;
Get your account's commission status.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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"];
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get your account's commission status.
[apiInstance userGetCommissionWithCompletionHandler:
^(NSArray<SWGUserCommission>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetCommission: %@", error);
}
}];
This endpoint does not need any parameter.
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetDepositAddressWithCurrency: (NSString*) currency
completionHandler: (void (^)(NSString* output, NSError* error)) handler;
Get a deposit address.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* currency = @"XBt"; // (optional) (default to XBt)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get a deposit address.
[apiInstance userGetDepositAddressWithCurrency:currency
completionHandler: ^(NSString* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetDepositAddress: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | [optional] [default to XBt] |
NSString*
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetMarginWithCurrency: (NSString*) currency
completionHandler: (void (^)(SWGMargin* output, NSError* error)) handler;
Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* currency = @"XBt"; // (optional) (default to XBt)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies.
[apiInstance userGetMarginWithCurrency:currency
completionHandler: ^(SWGMargin* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetMargin: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | [optional] [default to XBt] |
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetWalletWithCurrency: (NSString*) currency
completionHandler: (void (^)(SWGWallet* output, NSError* error)) handler;
Get your current wallet information.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* currency = @"XBt"; // (optional) (default to XBt)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get your current wallet information.
[apiInstance userGetWalletWithCurrency:currency
completionHandler: ^(SWGWallet* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetWallet: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | [optional] [default to XBt] |
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetWalletHistoryWithCurrency: (NSString*) currency
completionHandler: (void (^)(NSArray<SWGTransaction>* output, NSError* error)) handler;
Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* currency = @"XBt"; // (optional) (default to XBt)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
[apiInstance userGetWalletHistoryWithCurrency:currency
completionHandler: ^(NSArray<SWGTransaction>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetWalletHistory: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | [optional] [default to XBt] |
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userGetWalletSummaryWithCurrency: (NSString*) currency
completionHandler: (void (^)(NSArray<SWGTransaction>* output, NSError* error)) handler;
Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* currency = @"XBt"; // (optional) (default to XBt)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
[apiInstance userGetWalletSummaryWithCurrency:currency
completionHandler: ^(NSArray<SWGTransaction>* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userGetWalletSummary: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | [optional] [default to XBt] |
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userLogoutWithCompletionHandler:
(void (^)(NSError* error)) handler;
Log out of BitMEX.
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Log out of BitMEX.
[apiInstance userLogoutWithCompletionHandler:
^(NSError* error) {
if (error) {
NSLog(@"Error calling SWGUserApi->userLogout: %@", error);
}
}];
This endpoint does not need any parameter.
void (empty response body)
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*) userLogoutAllWithCompletionHandler:
(void (^)(NSNumber* output, NSError* error)) handler;
Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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"];
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices.
[apiInstance userLogoutAllWithCompletionHandler:
^(NSNumber* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userLogoutAll: %@", error);
}
}];
This endpoint does not need any parameter.
NSNumber*
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userMinWithdrawalFeeWithCurrency: (NSString*) currency
completionHandler: (void (^)(NSObject* output, NSError* error)) handler;
Get the minimum withdrawal fee for a currency.
This is changed based on network conditions to ensure timely withdrawals. During network congestion, this may be high. The fee is returned in the same currency.
NSString* currency = @"XBt"; // (optional) (default to XBt)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get the minimum withdrawal fee for a currency.
[apiInstance userMinWithdrawalFeeWithCurrency:currency
completionHandler: ^(NSObject* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userMinWithdrawalFee: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | [optional] [default to XBt] |
NSObject*
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*) userRequestEnableTFAWithType: (NSString*) type
completionHandler: (void (^)(NSNumber* output, NSError* error)) handler;
Get secret key for setting up two-factor auth.
Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* type = @"type_example"; // Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Get secret key for setting up two-factor auth.
[apiInstance userRequestEnableTFAWithType:type
completionHandler: ^(NSNumber* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userRequestEnableTFA: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
type | NSString* | Two-factor auth type. Supported types: 'GA' (Google Authenticator) | [optional] |
NSNumber*
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userRequestWithdrawalWithCurrency: (NSString*) currency
amount: (NSNumber*) amount
address: (NSString*) address
otpToken: (NSString*) otpToken
fee: (NSNumber*) fee
completionHandler: (void (^)(SWGTransaction* output, NSError* error)) handler;
Request a withdrawal to an external wallet.
This will send a confirmation email to the email address on record, unless requested via an API Key with the withdraw
permission.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* currency = @"XBt"; // Currency you're withdrawing. Options: `XBt` (default to XBt)
NSNumber* amount = @8.14; // Amount of withdrawal currency.
NSString* address = @"address_example"; // Destination Address.
NSString* otpToken = @"otpToken_example"; // 2FA token. Required if 2FA is enabled on your account. (optional)
NSNumber* fee = @1.2; // Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Request a withdrawal to an external wallet.
[apiInstance userRequestWithdrawalWithCurrency:currency
amount:amount
address:address
otpToken:otpToken
fee:fee
completionHandler: ^(SWGTransaction* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userRequestWithdrawal: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
currency | NSString* | Currency you're withdrawing. Options: `XBt` | [default to XBt] |
amount | NSNumber* | Amount of withdrawal currency. | |
address | NSString* | Destination Address. | |
otpToken | NSString* | 2FA token. Required if 2FA is enabled on your account. | [optional] |
fee | NSNumber* | Network fee for Bitcoin withdrawals. If not specified, a default value will be calculated based on Bitcoin network conditions. You will have a chance to confirm this via email. | [optional] |
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userSavePreferencesWithPrefs: (NSString*) prefs
overwrite: (NSNumber*) overwrite
completionHandler: (void (^)(SWGUser* output, NSError* error)) handler;
Save user preferences.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* prefs = @"prefs_example"; //
NSNumber* overwrite = @false; // If true, will overwrite all existing preferences. (optional) (default to false)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Save user preferences.
[apiInstance userSavePreferencesWithPrefs:prefs
overwrite:overwrite
completionHandler: ^(SWGUser* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userSavePreferences: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
prefs | NSString* | ||
overwrite | NSNumber* | If true, will overwrite all existing preferences. | [optional] [default to false] |
apiKey, apiNonce, 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]
-(NSURLSessionTask*) userUpdateWithFirstname: (NSString*) firstname
lastname: (NSString*) lastname
oldPassword: (NSString*) oldPassword
varNewPassword: (NSString*) varNewPassword
varNewPasswordConfirm: (NSString*) varNewPasswordConfirm
username: (NSString*) username
country: (NSString*) country
pgpPubKey: (NSString*) pgpPubKey
completionHandler: (void (^)(SWGUser* output, NSError* error)) handler;
Update your password, name, and other attributes.
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: apiNonce)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"api-nonce"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"api-nonce"];
// 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* firstname = @"firstname_example"; // (optional)
NSString* lastname = @"lastname_example"; // (optional)
NSString* oldPassword = @"oldPassword_example"; // (optional)
NSString* varNewPassword = @"varNewPassword_example"; // (optional)
NSString* varNewPasswordConfirm = @"varNewPasswordConfirm_example"; // (optional)
NSString* username = @"username_example"; // Username can only be set once. To reset, email support. (optional)
NSString* country = @"country_example"; // Country of residence. (optional)
NSString* pgpPubKey = @"pgpPubKey_example"; // PGP Public Key. If specified, automated emails will be sentwith this key. (optional)
SWGUserApi*apiInstance = [[SWGUserApi alloc] init];
// Update your password, name, and other attributes.
[apiInstance userUpdateWithFirstname:firstname
lastname:lastname
oldPassword:oldPassword
varNewPassword:varNewPassword
varNewPasswordConfirm:varNewPasswordConfirm
username:username
country:country
pgpPubKey:pgpPubKey
completionHandler: ^(SWGUser* output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error calling SWGUserApi->userUpdate: %@", error);
}
}];
Name | Type | Description | Notes |
---|---|---|---|
firstname | NSString* | [optional] | |
lastname | NSString* | [optional] | |
oldPassword | NSString* | [optional] | |
varNewPassword | NSString* | [optional] | |
varNewPasswordConfirm | NSString* | [optional] | |
username | NSString* | Username can only be set once. To reset, email support. | [optional] |
country | NSString* | Country of residence. | [optional] |
pgpPubKey | NSString* | PGP Public Key. If specified, automated emails will be sentwith this key. | [optional] |
apiKey, apiNonce, 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]