Skip to content

Latest commit

 

History

History
1478 lines (1166 loc) · 51.9 KB

File metadata and controls

1478 lines (1166 loc) · 51.9 KB

IO.Swagger.Api.UserApi

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.

UserCancelWithdrawal

Transaction UserCancelWithdrawal (string token)

Cancel a withdrawal.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserCancelWithdrawalExample
    {
        public void main()
        {
            var apiInstance = new UserApi();
            var token = token_example;  // string | 

            try
            {
                // Cancel a withdrawal.
                Transaction result = apiInstance.UserCancelWithdrawal(token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserCancelWithdrawal: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
token string

Return type

Transaction

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]

UserCheckReferralCode

double? UserCheckReferralCode (string referralCode = null)

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.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserCheckReferralCodeExample
    {
        public void main()
        {
            var apiInstance = new UserApi();
            var referralCode = referralCode_example;  // string |  (optional) 

            try
            {
                // Check if a referral code is valid.
                double? result = apiInstance.UserCheckReferralCode(referralCode);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserCheckReferralCode: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
referralCode string [optional]

Return type

double?

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]

UserConfirm

AccessToken UserConfirm (string token)

Confirm your email address with a token.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserConfirmExample
    {
        public void main()
        {
            var apiInstance = new UserApi();
            var token = token_example;  // string | 

            try
            {
                // Confirm your email address with a token.
                AccessToken result = apiInstance.UserConfirm(token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserConfirm: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
token string

Return type

AccessToken

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]

UserConfirmEnableTFA

bool? UserConfirmEnableTFA (string token, string type = null)

Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserConfirmEnableTFAExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var token = token_example;  // string | Token from your selected TFA type.
            var type = type_example;  // string | Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' (optional) 

            try
            {
                // Confirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint.
                bool? result = apiInstance.UserConfirmEnableTFA(token, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserConfirmEnableTFA: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
token string Token from your selected TFA type.
type string Two-factor auth type. Supported types: 'GA' (Google Authenticator), 'Yubikey' [optional]

Return type

bool?

Authorization

apiKey, apiNonce, apiSignature

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]

UserConfirmWithdrawal

Transaction UserConfirmWithdrawal (string token)

Confirm a withdrawal.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserConfirmWithdrawalExample
    {
        public void main()
        {
            var apiInstance = new UserApi();
            var token = token_example;  // string | 

            try
            {
                // Confirm a withdrawal.
                Transaction result = apiInstance.UserConfirmWithdrawal(token);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserConfirmWithdrawal: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
token string

Return type

Transaction

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]

UserDisableTFA

bool? UserDisableTFA (string token, string type = null)

Disable two-factor auth for this account.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserDisableTFAExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var token = token_example;  // string | Token from your selected TFA type.
            var type = type_example;  // string | Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional) 

            try
            {
                // Disable two-factor auth for this account.
                bool? result = apiInstance.UserDisableTFA(token, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserDisableTFA: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
token string Token from your selected TFA type.
type string Two-factor auth type. Supported types: 'GA' (Google Authenticator) [optional]

Return type

bool?

Authorization

apiKey, apiNonce, apiSignature

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]

UserGet

User UserGet ()

Get your user model.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();

            try
            {
                // Get your user model.
                User result = apiInstance.UserGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

User

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetAffiliateStatus

Affiliate UserGetAffiliateStatus ()

Get your current affiliate/referral status.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetAffiliateStatusExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();

            try
            {
                // Get your current affiliate/referral status.
                Affiliate result = apiInstance.UserGetAffiliateStatus();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetAffiliateStatus: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

Affiliate

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetCommission

List UserGetCommission ()

Get your account's commission status.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetCommissionExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();

            try
            {
                // Get your account's commission status.
                List<UserCommission> result = apiInstance.UserGetCommission();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetCommission: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

List

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetDepositAddress

string UserGetDepositAddress (string currency = null)

Get a deposit address.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetDepositAddressExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var currency = currency_example;  // string |  (optional)  (default to XBt)

            try
            {
                // Get a deposit address.
                string result = apiInstance.UserGetDepositAddress(currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetDepositAddress: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string [optional] [default to XBt]

Return type

string

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetMargin

Margin UserGetMargin (string currency = null)

Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetMarginExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var currency = currency_example;  // string |  (optional)  (default to XBt)

            try
            {
                // Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies.
                Margin result = apiInstance.UserGetMargin(currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetMargin: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string [optional] [default to XBt]

Return type

Margin

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetWallet

Wallet UserGetWallet (string currency = null)

Get your current wallet information.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetWalletExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var currency = currency_example;  // string |  (optional)  (default to XBt)

            try
            {
                // Get your current wallet information.
                Wallet result = apiInstance.UserGetWallet(currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetWallet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string [optional] [default to XBt]

Return type

Wallet

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetWalletHistory

List UserGetWalletHistory (string currency = null)

Get a history of all of your wallet transactions (deposits, withdrawals, PNL).

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetWalletHistoryExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var currency = currency_example;  // string |  (optional)  (default to XBt)

            try
            {
                // Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
                List<Transaction> result = apiInstance.UserGetWalletHistory(currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetWalletHistory: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string [optional] [default to XBt]

Return type

List

Authorization

apiKey, apiNonce, apiSignature

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]

UserGetWalletSummary

List UserGetWalletSummary (string currency = null)

Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserGetWalletSummaryExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var currency = currency_example;  // string |  (optional)  (default to XBt)

            try
            {
                // Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
                List<Transaction> result = apiInstance.UserGetWalletSummary(currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserGetWalletSummary: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string [optional] [default to XBt]

Return type

List

Authorization

apiKey, apiNonce, apiSignature

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]

UserLogout

void UserLogout ()

Log out of BitMEX.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserLogoutExample
    {
        public void main()
        {
            var apiInstance = new UserApi();

            try
            {
                // Log out of BitMEX.
                apiInstance.UserLogout();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserLogout: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

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]

UserLogoutAll

double? UserLogoutAll ()

Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserLogoutAllExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();

            try
            {
                // Log all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices.
                double? result = apiInstance.UserLogoutAll();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserLogoutAll: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

double?

Authorization

apiKey, apiNonce, apiSignature

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]

UserMinWithdrawalFee

Object UserMinWithdrawalFee (string currency = null)

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.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserMinWithdrawalFeeExample
    {
        public void main()
        {
            var apiInstance = new UserApi();
            var currency = currency_example;  // string |  (optional)  (default to XBt)

            try
            {
                // Get the minimum withdrawal fee for a currency.
                Object result = apiInstance.UserMinWithdrawalFee(currency);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserMinWithdrawalFee: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string [optional] [default to XBt]

Return type

Object

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]

UserRequestEnableTFA

bool? UserRequestEnableTFA (string type = null)

Get secret key for setting up two-factor auth.

Use /confirmEnableTFA directly for Yubikeys. This fails if TFA is already enabled.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserRequestEnableTFAExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var type = type_example;  // string | Two-factor auth type. Supported types: 'GA' (Google Authenticator) (optional) 

            try
            {
                // Get secret key for setting up two-factor auth.
                bool? result = apiInstance.UserRequestEnableTFA(type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserRequestEnableTFA: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
type string Two-factor auth type. Supported types: 'GA' (Google Authenticator) [optional]

Return type

bool?

Authorization

apiKey, apiNonce, apiSignature

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]

UserRequestWithdrawal

Transaction UserRequestWithdrawal (string currency, decimal? amount, string address, string otpToken = null, double? fee = null)

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.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserRequestWithdrawalExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var currency = currency_example;  // string | Currency you're withdrawing. Options: `XBt` (default to XBt)
            var amount = 8.14;  // decimal? | Amount of withdrawal currency.
            var address = address_example;  // string | Destination Address.
            var otpToken = otpToken_example;  // string | 2FA token. Required if 2FA is enabled on your account. (optional) 
            var fee = 1.2;  // double? | 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) 

            try
            {
                // Request a withdrawal to an external wallet.
                Transaction result = apiInstance.UserRequestWithdrawal(currency, amount, address, otpToken, fee);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserRequestWithdrawal: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
currency string Currency you're withdrawing. Options: `XBt` [default to XBt]
amount decimal? Amount of withdrawal currency.
address string Destination Address.
otpToken string 2FA token. Required if 2FA is enabled on your account. [optional]
fee double? 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]

Return type

Transaction

Authorization

apiKey, apiNonce, apiSignature

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]

UserSavePreferences

User UserSavePreferences (string prefs, bool? overwrite = null)

Save user preferences.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserSavePreferencesExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var prefs = prefs_example;  // string | 
            var overwrite = true;  // bool? | If true, will overwrite all existing preferences. (optional)  (default to false)

            try
            {
                // Save user preferences.
                User result = apiInstance.UserSavePreferences(prefs, overwrite);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserSavePreferences: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
prefs string
overwrite bool? If true, will overwrite all existing preferences. [optional] [default to false]

Return type

User

Authorization

apiKey, apiNonce, apiSignature

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]

UserUpdate

User UserUpdate (string firstname = null, string lastname = null, string oldPassword = null, string newPassword = null, string newPasswordConfirm = null, string username = null, string country = null, string pgpPubKey = null)

Update your password, name, and other attributes.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UserUpdateExample
    {
        public void main()
        {
            // Configure API key authorization: apiKey
            Configuration.Default.AddApiKey("api-key", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-key", "Bearer");
            // Configure API key authorization: apiNonce
            Configuration.Default.AddApiKey("api-nonce", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-nonce", "Bearer");
            // Configure API key authorization: apiSignature
            Configuration.Default.AddApiKey("api-signature", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("api-signature", "Bearer");

            var apiInstance = new UserApi();
            var firstname = firstname_example;  // string |  (optional) 
            var lastname = lastname_example;  // string |  (optional) 
            var oldPassword = oldPassword_example;  // string |  (optional) 
            var newPassword = newPassword_example;  // string |  (optional) 
            var newPasswordConfirm = newPasswordConfirm_example;  // string |  (optional) 
            var username = username_example;  // string | Username can only be set once. To reset, email support. (optional) 
            var country = country_example;  // string | Country of residence. (optional) 
            var pgpPubKey = pgpPubKey_example;  // string | PGP Public Key. If specified, automated emails will be sentwith this key. (optional) 

            try
            {
                // Update your password, name, and other attributes.
                User result = apiInstance.UserUpdate(firstname, lastname, oldPassword, newPassword, newPasswordConfirm, username, country, pgpPubKey);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UserApi.UserUpdate: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
firstname string [optional]
lastname string [optional]
oldPassword string [optional]
newPassword string [optional]
newPasswordConfirm string [optional]
username string Username can only be set once. To reset, email support. [optional]
country string Country of residence. [optional]
pgpPubKey string PGP Public Key. If specified, automated emails will be sentwith this key. [optional]

Return type

User

Authorization

apiKey, apiNonce, apiSignature

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]