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(token)
Cancel a withdrawal.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String token = "token_example"; // String |
try {
Transaction result = apiInstance.userCancelWithdrawal(token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCancelWithdrawal");
e.printStackTrace();
}
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
Double userCheckReferralCode(referralCode)
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.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String referralCode = "referralCode_example"; // String |
try {
Double result = apiInstance.userCheckReferralCode(referralCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCheckReferralCode");
e.printStackTrace();
}
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
List<CommunicationToken> userCommunicationToken(token, platformAgent)
Register your communication token for mobile clients
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String token = "token_example"; // String |
String platformAgent = "platformAgent_example"; // String |
try {
List<CommunicationToken> result = apiInstance.userCommunicationToken(token, platformAgent);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCommunicationToken");
e.printStackTrace();
}
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
AccessToken userConfirm(token)
Confirm your email address with a token.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String token = "token_example"; // String |
try {
AccessToken result = apiInstance.userConfirm(token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userConfirm");
e.printStackTrace();
}
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
Transaction userConfirmWithdrawal(token)
Confirm a withdrawal.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String token = "token_example"; // String |
try {
Transaction result = apiInstance.userConfirmWithdrawal(token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userConfirmWithdrawal");
e.printStackTrace();
}
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
User userGet()
Get your user model.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
User result = apiInstance.userGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGet");
e.printStackTrace();
}
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
Affiliate userGetAffiliateStatus()
Get your current affiliate/referral status.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
Affiliate result = apiInstance.userGetAffiliateStatus();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetAffiliateStatus");
e.printStackTrace();
}
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
UserCommissionsBySymbol userGetCommission()
Get your account's commission status.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
UserCommissionsBySymbol result = apiInstance.userGetCommission();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetCommission");
e.printStackTrace();
}
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
String userGetDepositAddress(currency)
Get a deposit address.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String |
try {
String result = apiInstance.userGetDepositAddress(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetDepositAddress");
e.printStackTrace();
}
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
Object userGetExecutionHistory(symbol, timestamp)
Get the execution history by day.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String symbol = "XBTUSD"; // String |
Date timestamp = new Date(); // Date |
try {
Object result = apiInstance.userGetExecutionHistory(symbol, timestamp);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetExecutionHistory");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | [default to XBTUSD] | |
timestamp | Date | [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
Margin userGetMargin(currency)
Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String |
try {
Margin result = apiInstance.userGetMargin(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetMargin");
e.printStackTrace();
}
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
QuoteFillRatio userGetQuoteFillRatio()
Get 7 days worth of Quote Fill Ratio statistics.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
QuoteFillRatio result = apiInstance.userGetQuoteFillRatio();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetQuoteFillRatio");
e.printStackTrace();
}
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
Wallet userGetWallet(currency)
Get your current wallet information.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String |
try {
Wallet result = apiInstance.userGetWallet(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetWallet");
e.printStackTrace();
}
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
List<Transaction> userGetWalletHistory(currency, count, start)
Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String |
Double count = 3.4D; // Double | Number of results to fetch.
Double start = 3.4D; // Double | Starting point for results.
try {
List<Transaction> result = apiInstance.userGetWalletHistory(currency, count, start);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetWalletHistory");
e.printStackTrace();
}
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
List<Transaction> userGetWalletSummary(currency)
Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String |
try {
List<Transaction> result = apiInstance.userGetWalletSummary(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetWalletSummary");
e.printStackTrace();
}
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
userLogout()
Log out of BitMEX.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
apiInstance.userLogout();
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userLogout");
e.printStackTrace();
}
This endpoint does not need any parameter.
null (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
Object userMinWithdrawalFee(currency)
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.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String |
try {
Object result = apiInstance.userMinWithdrawalFee(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userMinWithdrawalFee");
e.printStackTrace();
}
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
Transaction userRequestWithdrawal(currency, amount, address, otpToken, fee, text)
Request a withdrawal to an external wallet.
This will send a confirmation email to the email address on record.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String | Currency you're withdrawing. Options: `XBt`
BigDecimal amount = new BigDecimal(); // BigDecimal | Amount of withdrawal currency.
String address = "address_example"; // String | Destination Address.
String otpToken = "otpToken_example"; // String | 2FA token. Required if 2FA is enabled on your account.
Double fee = 3.4D; // 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.
String text = "text_example"; // String | Optional annotation, e.g. 'Transfer to home wallet'.
try {
Transaction result = apiInstance.userRequestWithdrawal(currency, amount, address, otpToken, fee, text);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userRequestWithdrawal");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Currency you're withdrawing. Options: `XBt` | [default to XBt] |
amount | BigDecimal | 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
User userSavePreferences(prefs, overwrite)
Save user preferences.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String prefs = "prefs_example"; // String |
Boolean overwrite = false; // Boolean | If true, will overwrite all existing preferences.
try {
User result = apiInstance.userSavePreferences(prefs, overwrite);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userSavePreferences");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
prefs | String | ||
overwrite | Boolean | 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