All URIs are relative to https://www.bitmex.com/api/v1
Method | HTTP request | Description |
---|---|---|
UserCancelWithdrawal | POST /user/cancelWithdrawal | Cancel a withdrawal. |
UserCheckReferralCode | GET /user/checkReferralCode | Check if a referral code is valid. |
UserCommunicationToken | POST /user/communicationToken | Register your communication token for mobile clients |
UserConfirm | POST /user/confirmEmail | Confirm your email address with a token. |
UserConfirmWithdrawal | POST /user/confirmWithdrawal | Confirm a withdrawal. |
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. |
UserGetExecutionHistory | GET /user/executionHistory | Get the execution history by day. |
UserGetMargin | GET /user/margin | Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies. |
UserGetQuoteFillRatio | GET /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. |
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. |
UserMinWithdrawalFee | GET /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. |
UserRequestWithdrawal | POST /user/requestWithdrawal | Request a withdrawal to an external wallet. |
UserSavePreferences | POST /user/preferences | Save user preferences. |
Transaction UserCancelWithdrawal (string token)
Cancel a withdrawal.
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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
token | string |
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]
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 or 451 if invalid.
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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
referralCode | string | [optional] |
double?
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]
List UserCommunicationToken (string token, string platformAgent)
Register your communication token for mobile clients
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class UserCommunicationTokenExample
{
public void main()
{
// Configure API key authorization: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 |
var platformAgent = platformAgent_example; // string |
try
{
// Register your communication token for mobile clients
List<CommunicationToken> result = apiInstance.UserCommunicationToken(token, platformAgent);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UserCommunicationToken: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
token | string | ||
platformAgent | string |
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]
AccessToken UserConfirm (string token)
Confirm your email address with a token.
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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
token | string |
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]
Transaction UserConfirmWithdrawal (string token)
Confirm a withdrawal.
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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
token | string |
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]
User UserGet ()
Get your user model.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
This endpoint does not need any parameter.
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]
Affiliate UserGetAffiliateStatus ()
Get your current affiliate/referral status.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
This endpoint does not need any parameter.
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]
UserCommissionsBySymbol UserGetCommission ()
Get your account's commission status.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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.
UserCommissionsBySymbol result = apiInstance.UserGetCommission();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UserGetCommission: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
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]
string UserGetDepositAddress (string currency = null)
Get a deposit address.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | [optional] [default to XBt] |
string
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]
Object UserGetExecutionHistory (string symbol, DateTime? timestamp)
Get the execution history by day.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class UserGetExecutionHistoryExample
{
public void main()
{
// Configure API key authorization: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 symbol = symbol_example; // string | (default to XBTUSD)
var timestamp = 2013-10-20T19:20:30+01:00; // DateTime? | (default to 2017-02-13T12:00:00.000Z)
try
{
// Get the execution history by day.
Object result = apiInstance.UserGetExecutionHistory(symbol, timestamp);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UserGetExecutionHistory: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | string | [default to XBTUSD] | |
timestamp | DateTime? | [default to 2017-02-13T12:00:00.000Z] |
Object
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]
Margin UserGetMargin (string currency = null)
Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | [optional] [default to XBt] |
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]
QuoteFillRatio UserGetQuoteFillRatio ()
Get 7 days worth of Quote Fill Ratio statistics.
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class UserGetQuoteFillRatioExample
{
public void main()
{
// Configure API key authorization: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 7 days worth of Quote Fill Ratio statistics.
QuoteFillRatio result = apiInstance.UserGetQuoteFillRatio();
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UserGetQuoteFillRatio: " + e.Message );
}
}
}
}
This endpoint does not need any parameter.
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]
Wallet UserGetWallet (string currency = null)
Get your current wallet information.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | [optional] [default to XBt] |
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]
List UserGetWalletHistory (string currency = null, double? count = null, double? start = null)
Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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)
var count = 1.2; // double? | Number of results to fetch. (optional) (default to 100)
var start = 1.2; // double? | Starting point for results. (optional) (default to 0)
try
{
// Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
List<Transaction> result = apiInstance.UserGetWalletHistory(currency, count, start);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UserGetWalletHistory: " + e.Message );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | [optional] [default to XBt] | |
count | double? | Number of results to fetch. | [optional] [default to 100] |
start | double? | Starting point for results. | [optional] [default to 0] |
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]
List UserGetWalletSummary (string currency = null)
Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | [optional] [default to XBt] |
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]
void UserLogout ()
Log out of BitMEX.
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 );
}
}
}
}
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]
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.
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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
currency | string | [optional] [default to XBt] |
Object
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]
Transaction UserRequestWithdrawal (string currency, decimal? amount, string address, string otpToken = null, double? fee = null, string text = null)
Request a withdrawal to an external wallet.
This will send a confirmation email to the email address on record.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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)
var text = text_example; // string | Optional annotation, e.g. 'Transfer to home wallet'. (optional)
try
{
// Request a withdrawal to an external wallet.
Transaction result = apiInstance.UserRequestWithdrawal(currency, amount, address, otpToken, fee, text);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling UserApi.UserRequestWithdrawal: " + e.Message );
}
}
}
}
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] |
text | string | Optional annotation, e.g. 'Transfer to home wallet'. | [optional] |
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]
User UserSavePreferences (string prefs, bool? overwrite = null)
Save user preferences.
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: apiExpires
Configuration.Default.AddApiKey("api-expires", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.AddApiKeyPrefix("api-expires", "Bearer");
// 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: 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 );
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
prefs | string | ||
overwrite | bool? | If true, will overwrite all existing preferences. | [optional] [default to false] |
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]