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(ctx, token) Cancel a withdrawal.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
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]
float64 UserCheckReferralCode(ctx, optional) 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.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserCheckReferralCodeOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserCheckReferralCodeOpts struct
Name | Type | Description | Notes |
---|---|---|---|
referralCode | optional.String |
float64
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]
[]CommunicationToken UserCommunicationToken(ctx, token, platformAgent) Register your communication token for mobile clients
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
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(ctx, token) Confirm your email address with a token.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
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(ctx, token) Confirm a withdrawal.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
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(ctx, ) Get your user model.
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(ctx, ) Get your current affiliate/referral status.
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(ctx, ) Get your account's commission status.
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(ctx, optional) Get a deposit address.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserGetDepositAddressOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserGetDepositAddressOpts struct
Name | Type | Description | Notes |
---|---|---|---|
currency | optional.String | [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]
interface{} UserGetExecutionHistory(ctx, symbol, timestamp) Get the execution history by day.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
symbol | string | [default to XBTUSD] | |
timestamp | time.Time | [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
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Margin UserGetMargin(ctx, optional) Get your account's margin status. Send a currency of "all" to receive an array of all supported currencies.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserGetMarginOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserGetMarginOpts struct
Name | Type | Description | Notes |
---|---|---|---|
currency | optional.String | [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(ctx, ) Get 7 days worth of Quote Fill Ratio statistics.
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(ctx, optional) Get your current wallet information.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserGetWalletOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserGetWalletOpts struct
Name | Type | Description | Notes |
---|---|---|---|
currency | optional.String | [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]
[]Transaction UserGetWalletHistory(ctx, optional) Get a history of all of your wallet transactions (deposits, withdrawals, PNL).
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserGetWalletHistoryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserGetWalletHistoryOpts struct
Name | Type | Description | Notes |
---|---|---|---|
currency | optional.String | [default to XBt] | |
count | optional.Float64 | Number of results to fetch. | [default to 100] |
start | optional.Float64 | Starting point for results. | [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]
[]Transaction UserGetWalletSummary(ctx, optional) Get a summary of all of your wallet transactions (deposits, withdrawals, PNL).
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserGetWalletSummaryOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserGetWalletSummaryOpts struct
Name | Type | Description | Notes |
---|---|---|---|
currency | optional.String | [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]
UserLogout(ctx, ) Log out of BitMEX.
This endpoint does not need any parameter.
(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]
interface{} UserMinWithdrawalFee(ctx, optional) 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.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | *UserMinWithdrawalFeeOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserMinWithdrawalFeeOpts struct
Name | Type | Description | Notes |
---|---|---|---|
currency | optional.String | [default to XBt] |
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(ctx, currency, amount, address, optional) Request a withdrawal to an external wallet.
This will send a confirmation email to the email address on record.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
currency | string | Currency you're withdrawing. Options: `XBt` | [default to XBt] |
amount | float32 | Amount of withdrawal currency. | |
address | string | Destination Address. | |
optional | *UserRequestWithdrawalOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserRequestWithdrawalOpts struct
Name | Type | Description | Notes |
---|
otpToken | optional.String| 2FA token. Required if 2FA is enabled on your account. | fee | optional.Float64| 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. | text | optional.String| Optional annotation, e.g. 'Transfer to home wallet'. |
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(ctx, prefs, optional) Save user preferences.
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
prefs | string | ||
optional | *UserSavePreferencesOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a UserSavePreferencesOpts struct
Name | Type | Description | Notes |
---|
overwrite | optional.Bool| If true, will overwrite all existing preferences. | [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]