All URIs are relative to https://www.bitmex.com/api/v1
Method | HTTP request | Description |
---|---|---|
userCancelPendingWithdrawal | DELETE /user/withdrawal | Cancel pending withdrawal |
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. |
userCreateSubAccount | POST /user/addSubaccount | Creates a new sub-account. |
userCreateUnstakingRequests | POST /user/unstakingRequests | Create unstaking request |
userDeleteUnstakingRequests | DELETE /user/unstakingRequests | Cancel unstaking request |
userGet | GET /user | Get your user model. |
userGetAffiliateStatus | GET /user/affiliateStatus | Get your current affiliate/referral status. |
userGetCSA | GET /user/csa | Get your account's CSA status. |
userGetCommission | GET /user/commission | Get your account's commission status. |
userGetDepositAddress | GET /user/depositAddress | Get a deposit address. |
userGetDepositAddressInformation | GET /user/depositAddressInformation | 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. |
userGetQuoteValueRatio | GET /user/quoteValueRatio | Get Quote Value Ratio statistics over the last 3 days |
userGetStaking | GET /user/staking | Get the current user staking amount. |
userGetStakingInstruments | GET /user/staking/instruments | List staking instruments |
userGetStakingTiers | GET /user/staking/tiers | List staking tiers for a given currency |
userGetTradingVolume | GET /user/tradingVolume | Get your 30 days USD average trading volume |
userGetUnstakingRequests | GET /user/unstakingRequests | Get the current user unstaking requests |
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). |
userGetWalletTransferAccounts | GET /user/getWalletTransferAccounts | Get the list of accounts you can transfer funds between. |
userLogout | POST /user/logout | Log out of BitMEX. |
userRequestWithdrawal | POST /user/requestWithdrawal | Request a withdrawal to an external wallet. |
userSavePreferences | POST /user/preferences | Save user preferences. |
userUpdateSubAccount | POST /user/updateSubaccount | Updates the sub-account name. |
userWalletTransfer | POST /user/walletTransfer | Execute a transfer to a paired account. |
Object userCancelPendingWithdrawal(transactID)
Cancel pending withdrawal
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String transactID = "transactID_example"; // String |
try {
Object result = apiInstance.userCancelPendingWithdrawal(transactID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCancelPendingWithdrawal");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
transactID | String |
Object
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
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
Object 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 {
Object 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] |
Object
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
Object userCreateSubAccount(accountName)
Creates a new sub-account.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String accountName = "accountName_example"; // String |
try {
Object result = apiInstance.userCreateSubAccount(accountName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCreateSubAccount");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
accountName | String |
Object
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
Object userCreateUnstakingRequests(symbol, amount)
Create unstaking request
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String symbol = "symbol_example"; // String |
Double amount = 3.4D; // Double |
try {
Object result = apiInstance.userCreateUnstakingRequests(symbol, amount);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userCreateUnstakingRequests");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | ||
amount | Double |
Object
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
Object userDeleteUnstakingRequests(redemptionID)
Cancel unstaking request
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String redemptionID = "redemptionID_example"; // String |
try {
Object result = apiInstance.userDeleteUnstakingRequests(redemptionID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userDeleteUnstakingRequests");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
redemptionID | String |
Object
apiExpires, apiKey, apiSignature
- 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(currency)
Get your current affiliate/referral status.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>. For all currencies specify \"all\"
try {
Affiliate result = apiInstance.userGetAffiliateStatus(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetAffiliateStatus");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a>. For all currencies specify "all" | [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
CollateralSupportAgreement userGetCSA()
Get your account's CSA status.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
CollateralSupportAgreement result = apiInstance.userGetCSA();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetCSA");
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, network)
Get a deposit address.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "currency_example"; // String | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>
String network = "network_example"; // String | The `network` parameter is used to indicate which blockchain you would like to deposit from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`.
try {
String result = apiInstance.userGetDepositAddress(currency, network);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetDepositAddress");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a> | |
network | String | The `network` parameter is used to indicate which blockchain you would like to deposit from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`. |
String
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
DepositAddress userGetDepositAddressInformation(currency, network)
Get a deposit address.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "currency_example"; // String | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>
String network = "network_example"; // String | The `network` parameter is used to indicate which blockchain you would like to deposit from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`.
try {
DepositAddress result = apiInstance.userGetDepositAddressInformation(currency, network);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetDepositAddressInformation");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a> | |
network | String | The `network` parameter is used to indicate which blockchain you would like to deposit from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`. |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<Execution> 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 {
List<Execution> 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] |
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 | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>. For all currencies specify \"all\"
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 | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a>. For all currencies specify "all" | [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(targetAccountId)
Get 7 days worth of Quote Fill Ratio statistics.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
Double targetAccountId = 3.4D; // Double | AccountId to get quote fill ratio for, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user
try {
QuoteFillRatio result = apiInstance.userGetQuoteFillRatio(targetAccountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetQuoteFillRatio");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
targetAccountId | Double | AccountId to get quote fill ratio for, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user | [optional] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
QuoteValueRatio userGetQuoteValueRatio(targetAccountId)
Get Quote Value Ratio statistics over the last 3 days
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
Double targetAccountId = 3.4D; // Double | AccountId to get quote value ratio for, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user
try {
QuoteValueRatio result = apiInstance.userGetQuoteValueRatio(targetAccountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetQuoteValueRatio");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
targetAccountId | Double | AccountId to get quote value ratio for, must be a paired account with main user. Can be wildcard * to get all accounts linked to the authenticated user | [optional] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<StakingRecord> userGetStaking(currency)
Get the current user staking amount.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "currency_example"; // String |
try {
List<StakingRecord> result = apiInstance.userGetStaking(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetStaking");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | [optional] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<XAny> userGetStakingInstruments(symbol, currency)
List staking instruments
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String symbol = "symbol_example"; // String |
String currency = "currency_example"; // String |
try {
List<XAny> result = apiInstance.userGetStakingInstruments(symbol, currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetStakingInstruments");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
symbol | String | [optional] | |
currency | String | [optional] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<XAny> userGetStakingTiers(currency)
List staking tiers for a given currency
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "currency_example"; // String |
try {
List<XAny> result = apiInstance.userGetStakingTiers(currency);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetStakingTiers");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String |
No authorization required
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<TradingVolume> userGetTradingVolume()
Get your 30 days USD average trading volume
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
List<TradingVolume> result = apiInstance.userGetTradingVolume();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetTradingVolume");
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
List<StakingRecord> userGetUnstakingRequests(status)
Get the current user unstaking requests
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String status = "status_example"; // String |
try {
List<StakingRecord> result = apiInstance.userGetUnstakingRequests(status);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetUnstakingRequests");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
status | String |
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 | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>. For all currencies specify \"all\"
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 | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a>. For all currencies specify "all" | [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, targetAccountId, reverse)
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 | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>. For all currencies specify \"all\"
Double count = 3.4D; // Double | Number of results to fetch. Fetch results from start to start + count. Max: 10,000 rows.
Double start = 3.4D; // Double | Starting point for results, integer. Default 0.
Double targetAccountId = 3.4D; // Double | AccountId to view the history of, must be a paired account with the authorised user requesting the history.
Boolean reverse = true; // Boolean | Start from the latest transaction record. Default true.
try {
List<Transaction> result = apiInstance.userGetWalletHistory(currency, count, start, targetAccountId, reverse);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetWalletHistory");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a>. For all currencies specify "all" | [optional] [default to XBt] |
count | Double | Number of results to fetch. Fetch results from start to start + count. Max: 10,000 rows. | [optional] [default to 10000] |
start | Double | Starting point for results, integer. Default 0. | [optional] [default to 0] |
targetAccountId | Double | AccountId to view the history of, must be a paired account with the authorised user requesting the history. | [optional] |
reverse | Boolean | Start from the latest transaction record. Default true. | [optional] [default to true] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<WalletSummaryRecord> userGetWalletSummary(currency, startTime, endTime)
Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
Provides an aggregated view of transactions, by transaction type, over a specific time period.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
String currency = "XBt"; // String | Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>. For all currencies specify \"all\"
Date startTime = new Date(); // Date | Start time for the summary
Date endTime = new Date(); // Date | End time for the summary
try {
List<WalletSummaryRecord> result = apiInstance.userGetWalletSummary(currency, startTime, endTime);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetWalletSummary");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a>. For all currencies specify "all" | [optional] [default to XBt] |
startTime | Date | Start time for the summary | [optional] |
endTime | Date | End time for the summary | [optional] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
List<XAny> userGetWalletTransferAccounts()
Get the list of accounts you can transfer funds between.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
try {
List<XAny> result = apiInstance.userGetWalletTransferAccounts();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetWalletTransferAccounts");
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
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
Transaction userRequestWithdrawal(currency, network, amount, otpToken, address, memo, addressId, targetUserId, 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. Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>
String network = "network_example"; // String | The `network` parameter is used to indicate which blockchain you would like to withdraw from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`.
Long amount = 789L; // Long | Amount of withdrawal currency.
String otpToken = "otpToken_example"; // String | 2FA token. Required for all external withdrawals unless the address has skip2FA in addressbook.
String address = "address_example"; // String | Destination Address. One of `address`, `addressId`, `targetUserId` has to be specified.
String memo = "memo_example"; // String | Destination Memo. If `address`, is specified, Destination Memo can also be specified
Double addressId = 3.4D; // Double | ID of the Destination Address. One of `address`, `addressId`, `targetUserId` has to be specified.
Double targetUserId = 3.4D; // Double | ID of the Target User. One of `address`, `addressId`, `targetUserId` has to be specified.
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, network, amount, otpToken, address, memo, addressId, targetUserId, 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. Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a> | [default to XBt] |
network | String | The `network` parameter is used to indicate which blockchain you would like to withdraw from. The acceptable value in the `network` parameter for each currency can be found from `networks.asset` from `GET /wallet/assets`. | |
amount | Long | Amount of withdrawal currency. | |
otpToken | String | 2FA token. Required for all external withdrawals unless the address has skip2FA in addressbook. | [optional] |
address | String | Destination Address. One of `address`, `addressId`, `targetUserId` has to be specified. | [optional] |
memo | String | Destination Memo. If `address`, is specified, Destination Memo can also be specified | [optional] |
addressId | Double | ID of the Destination Address. One of `address`, `addressId`, `targetUserId` has to be specified. | [optional] |
targetUserId | Double | ID of the Target User. One of `address`, `addressId`, `targetUserId` has to be specified. | [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
Object userUpdateSubAccount(targetAccountId, accountName)
Updates the sub-account name.
// Import classes:
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
Double targetAccountId = 3.4D; // Double |
String accountName = "accountName_example"; // String |
try {
Object result = apiInstance.userUpdateSubAccount(targetAccountId, accountName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userUpdateSubAccount");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
targetAccountId | Double | ||
accountName | String |
Object
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript
Transaction userWalletTransfer(currency, amount, targetAccountId, fromAccountId)
Execute a transfer to a paired account.
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 = "currency_example"; // String | Currency you're transfering. Any currency. For all currencies, see <a href=\"#!/Wallet/Wallet_getAssetsConfig\">asset config endpoint</a>
Long amount = 789L; // Long | Amount of transfer.
Double targetAccountId = 3.4D; // Double | AccountId to send the transfer to, must be a paired account with the user sending the transfer.
Double fromAccountId = 3.4D; // Double | AccountID to send the transfer from. Must be paired account with the authenticated user.
try {
Transaction result = apiInstance.userWalletTransfer(currency, amount, targetAccountId, fromAccountId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userWalletTransfer");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
currency | String | Currency you're transfering. Any currency. For all currencies, see <a href="#!/Wallet/Wallet_getAssetsConfig">asset config endpoint</a> | |
amount | Long | Amount of transfer. | |
targetAccountId | Double | AccountId to send the transfer to, must be a paired account with the user sending the transfer. | |
fromAccountId | Double | AccountID to send the transfer from. Must be paired account with the authenticated user. | [optional] |
apiExpires, apiKey, apiSignature
- Content-Type: application/json, application/x-www-form-urlencoded
- Accept: application/json, application/xml, text/xml, application/javascript, text/javascript