All URIs are relative to https://www.bitmex.com/api/v1
Method | HTTP request | Description |
---|---|---|
user_cancel_withdrawal | POST /user/cancelWithdrawal | Cancel a withdrawal. |
user_check_referral_code | GET /user/checkReferralCode | Check if a referral code is valid. |
user_communication_token | POST /user/communicationToken | Register your communication token for mobile clients |
user_confirm | POST /user/confirmEmail | Confirm your email address with a token. |
user_confirm_withdrawal | POST /user/confirmWithdrawal | Confirm a withdrawal. |
user_get | GET /user | Get your user model. |
user_get_affiliate_status | GET /user/affiliateStatus | Get your current affiliate/referral status. |
user_get_commission | GET /user/commission | Get your account's commission status. |
user_get_deposit_address | GET /user/depositAddress | Get a deposit address. |
user_get_execution_history | GET /user/executionHistory | Get the execution history by day. |
user_get_margin | GET /user/margin | Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies. |
user_get_quote_fill_ratio | GET /user/quoteFillRatio | Get 7 days worth of Quote Fill Ratio statistics. |
user_get_wallet | GET /user/wallet | Get your current wallet information. |
user_get_wallet_history | GET /user/walletHistory | Get a history of all of your wallet transactions (deposits, withdrawals, PNL). |
user_get_wallet_summary | GET /user/walletSummary | Get a summary of all of your wallet transactions (deposits, withdrawals, PNL). |
user_logout | POST /user/logout | Log out of BitMEX. |
user_min_withdrawal_fee | GET /user/minWithdrawalFee | Get the minimum withdrawal fee for a currency. |
user_request_withdrawal | POST /user/requestWithdrawal | Request a withdrawal to an external wallet. |
user_save_preferences | POST /user/preferences | Save user preferences. |
Transaction user_cancel_withdrawal(token)
Cancel a withdrawal.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
token = 'token_example' # str |
try:
# Cancel a withdrawal.
api_response = api_instance.user_cancel_withdrawal(token)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_cancel_withdrawal: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
token | str |
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]
float user_check_referral_code(referral_code=referral_code)
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.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
referral_code = 'referral_code_example' # str | (optional)
try:
# Check if a referral code is valid.
api_response = api_instance.user_check_referral_code(referral_code=referral_code)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_check_referral_code: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
referral_code | str | [optional] |
float
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[CommunicationToken] user_communication_token(token, platform_agent)
Register your communication token for mobile clients
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
token = 'token_example' # str |
platform_agent = 'platform_agent_example' # str |
try:
# Register your communication token for mobile clients
api_response = api_instance.user_communication_token(token, platform_agent)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_communication_token: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
token | str | ||
platform_agent | str |
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 user_confirm(token)
Confirm your email address with a token.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
token = 'token_example' # str |
try:
# Confirm your email address with a token.
api_response = api_instance.user_confirm(token)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_confirm: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
token | str |
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 user_confirm_withdrawal(token)
Confirm a withdrawal.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
token = 'token_example' # str |
try:
# Confirm a withdrawal.
api_response = api_instance.user_confirm_withdrawal(token)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_confirm_withdrawal: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
token | str |
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 user_get()
Get your user model.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
try:
# Get your user model.
api_response = api_instance.user_get()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get: %s\n" % e)
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 user_get_affiliate_status()
Get your current affiliate/referral status.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
try:
# Get your current affiliate/referral status.
api_response = api_instance.user_get_affiliate_status()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_affiliate_status: %s\n" % e)
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 user_get_commission()
Get your account's commission status.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
try:
# Get your account's commission status.
api_response = api_instance.user_get_commission()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_commission: %s\n" % e)
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]
str user_get_deposit_address(currency=currency)
Get a deposit address.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
currency = 'XBt' # str | (optional) (default to XBt)
try:
# Get a deposit address.
api_response = api_instance.user_get_deposit_address(currency=currency)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_deposit_address: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | [optional] [default to XBt] |
str
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 user_get_execution_history(symbol, timestamp)
Get the execution history by day.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
symbol = 'XBTUSD' # str | (default to XBTUSD)
timestamp = '2017-02-13T12:00:00.000Z' # datetime | (default to 2017-02-13T12:00:00.000Z)
try:
# Get the execution history by day.
api_response = api_instance.user_get_execution_history(symbol, timestamp)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_execution_history: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
symbol | str | [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 user_get_margin(currency=currency)
Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
currency = 'XBt' # str | (optional) (default to XBt)
try:
# Get your account's margin status. Send a currency of \"all\" to receive an array of all supported currencies.
api_response = api_instance.user_get_margin(currency=currency)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_margin: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | [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 user_get_quote_fill_ratio()
Get 7 days worth of Quote Fill Ratio statistics.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
try:
# Get 7 days worth of Quote Fill Ratio statistics.
api_response = api_instance.user_get_quote_fill_ratio()
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_quote_fill_ratio: %s\n" % e)
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 user_get_wallet(currency=currency)
Get your current wallet information.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
currency = 'XBt' # str | (optional) (default to XBt)
try:
# Get your current wallet information.
api_response = api_instance.user_get_wallet(currency=currency)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_wallet: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | [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[Transaction] user_get_wallet_history(currency=currency, count=count, start=start)
Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
currency = 'XBt' # str | (optional) (default to XBt)
count = 100 # float | Number of results to fetch. (optional) (default to 100)
start = 0 # float | Starting point for results. (optional) (default to 0)
try:
# Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
api_response = api_instance.user_get_wallet_history(currency=currency, count=count, start=start)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_wallet_history: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | [optional] [default to XBt] | |
count | float | Number of results to fetch. | [optional] [default to 100] |
start | float | 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[Transaction] user_get_wallet_summary(currency=currency)
Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
currency = 'XBt' # str | (optional) (default to XBt)
try:
# Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
api_response = api_instance.user_get_wallet_summary(currency=currency)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_get_wallet_summary: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | [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]
user_logout()
Log out of BitMEX.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
try:
# Log out of BitMEX.
api_instance.user_logout()
except ApiException as e:
print("Exception when calling UserApi->user_logout: %s\n" % e)
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 user_min_withdrawal_fee(currency=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.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.UserApi()
currency = 'XBt' # str | (optional) (default to XBt)
try:
# Get the minimum withdrawal fee for a currency.
api_response = api_instance.user_min_withdrawal_fee(currency=currency)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_min_withdrawal_fee: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | [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 user_request_withdrawal(currency, amount, address, otp_token=otp_token, fee=fee, text=text)
Request a withdrawal to an external wallet.
This will send a confirmation email to the email address on record.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
currency = 'XBt' # str | Currency you're withdrawing. Options: `XBt` (default to XBt)
amount = 8.14 # float | Amount of withdrawal currency.
address = 'address_example' # str | Destination Address.
otp_token = 'otp_token_example' # str | 2FA token. Required if 2FA is enabled on your account. (optional)
fee = 1.2 # float | 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 = 'text_example' # str | Optional annotation, e.g. 'Transfer to home wallet'. (optional)
try:
# Request a withdrawal to an external wallet.
api_response = api_instance.user_request_withdrawal(currency, amount, address, otp_token=otp_token, fee=fee, text=text)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_request_withdrawal: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
currency | str | Currency you're withdrawing. Options: `XBt` | [default to XBt] |
amount | float | Amount of withdrawal currency. | |
address | str | Destination Address. | |
otp_token | str | 2FA token. Required if 2FA is enabled on your account. | [optional] |
fee | float | 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 | str | 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 user_save_preferences(prefs, overwrite=overwrite)
Save user preferences.
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: apiExpires
configuration = swagger_client.Configuration()
configuration.api_key['api-expires'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-expires'] = 'Bearer'
# Configure API key authorization: apiKey
configuration = swagger_client.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: apiSignature
configuration = swagger_client.Configuration()
configuration.api_key['api-signature'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-signature'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.UserApi(swagger_client.ApiClient(configuration))
prefs = 'prefs_example' # str |
overwrite = false # bool | If true, will overwrite all existing preferences. (optional) (default to false)
try:
# Save user preferences.
api_response = api_instance.user_save_preferences(prefs, overwrite=overwrite)
pprint(api_response)
except ApiException as e:
print("Exception when calling UserApi->user_save_preferences: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
prefs | str | ||
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]