Binance.SubAccount (binance v2.0.1)

Sub-account Endpoints

Summary

Functions

Get Sub-account Deposit Address (For Master Account)

Get Sub-account Deposit History (For Master Account)

Query managed sub-account snapshot (For Investor Master Account)

Query managed sub-account asset details (For Investor Master Account)

Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA)

Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA)

Query Managed Sub-account List (For Investor)(USER_DATA)

Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA)

Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA)

Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA)

Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA)

Query Sub-Account API key Third Party IP whitelist (For Master Account)

Query Sub-account Assets (For Master Account)(USER_DATA)

Get Detail on Sub-account's Futures Account V2 (For Master Account)

Get Summary of Sub-account's Futures Account V2 (For Master Account)

Query Sub-account Futures Asset Transfer History (For Master Account)

Get Futures Position-Risk of Sub-account V2 (For Master Account)

Query Sub-account List (For Master Account)

Get Detail on Sub-account's Margin Account (For Master Account)

Get Summary of Sub-account's Margin Account (For Master Account)

Query Sub-account Spot Assets Summary (For Master Account)

Get Sub-account's Status on Margin/Futures (For Master Account)

Get IP Restriction for a Sub-account API Key (For Master Account)

Query Sub-account Spot Asset Transfer History (For Master Account)

Query Sub-account Transaction Statistics (For Master Account) (USER_DATA)

Sub-account Transfer History (For Sub-account)

Query Universal Transfer History (For Master Account)

Deposit assets into the managed sub-account (For Investor Master Account)

Withdrawl assets from the managed sub-account (For Investor Master Account)

Enable Leverage Token for Sub-account (For Master Account)

Enable Options for Sub-account (For Master Account)(USER_DATA)

Enable Futures for Sub-account (For Master Account)

Futures Transfer for Sub-account (For Master Account)

Enable Margin for Sub-account (For Master Account)

Margin Transfer for Sub-account (For Master Account)

Update IP Restriction for Sub-Account API key (For Master Account)

Transfer to Sub-account of Same Master (For Sub-account)

Create a Virtual Sub-account (For Master Account)

Functions

Link to this function

delete_sub_account_sub_account_api_ip_restriction_ip_list(email, subAccountApiKey, ipAddress, opts \\ [])

@spec delete_sub_account_sub_account_api_ip_restriction_ip_list(any(), any(), any(),
  thirdPartyName: any(),
  recvWindow: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Delete IP List for a Sub-account API Key (For Master Account)

Weight(UID): 3000

Details:

  • METHOD: delete
  • URL: /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList

Mandatory params:

  • email - Sub-account email
  • subAccountApiKey -
  • ipAddress - Can be added in batches, separated by commas

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
  • thirdPartyName - Third Party Name
Link to this function

get_capital_deposit_sub_address(email, coin, opts \\ [])

@spec get_capital_deposit_sub_address(any(), any(),
  recvWindow: any(),
  network: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Get Sub-account Deposit Address (For Master Account)

Fetch sub-account deposit address

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/capital/deposit/subAddress

Mandatory params:

  • email - Sub-account email
  • coin - Coin name

Optional params:

  • timestamp - timestamp
  • network -
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_capital_deposit_sub_hisrec(email, opts \\ [])

@spec get_capital_deposit_sub_hisrec(any(),
  recvWindow: any(),
  offset: any(),
  limit: any(),
  endTime: any(),
  startTime: any(),
  status: any(),
  coin: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Get Sub-account Deposit History (For Master Account)

Fetch sub-account deposit history

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/capital/deposit/subHisrec

Mandatory params:

  • email - Sub-account email

Optional params:

  • timestamp - timestamp
  • coin - Coin name
  • status - 0(0:pending,6: credited but cannot withdraw, 1:success)
  • startTime - UTC timestamp in ms
  • endTime - UTC timestamp in ms
  • limit -
  • offset -
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_managed_subaccount_account_snapshot(email, type, opts \\ [])

@spec get_managed_subaccount_account_snapshot(any(), any(),
  recvWindow: any(),
  limit: any(),
  endTime: any(),
  startTime: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query managed sub-account snapshot (For Investor Master Account)

  • The query time period must be less then 30 days
  • Support query within the last one month only
  • If startTime and endTime not sent, return records of the last 7 days by default

Weight(IP): 2400

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/accountSnapshot

Mandatory params:

  • email -
  • type - "SPOT", "MARGIN"(cross), "FUTURES"(UM)

Optional params:

  • timestamp - timestamp
  • startTime -
  • endTime -
  • limit - min 7, max 30, default 7
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_managed_subaccount_asset(email, opts \\ [])

@spec get_managed_subaccount_asset(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Query managed sub-account asset details (For Investor Master Account)

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/asset

Mandatory params:

  • email - Sub-account email

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_managed_subaccount_deposit_address(email, coin, opts \\ [])

@spec get_managed_subaccount_deposit_address(any(), any(),
  recvWindow: any(),
  network: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA)

Get investor's managed sub-account deposit address.

Weight(UID): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/deposit/address

Mandatory params:

  • email - Sub user email
  • coin -

Optional params:

  • timestamp - timestamp
  • network - networks can be found in GET /sapi/v1/capital/deposit/address
  • recvWindow -
Link to this function

get_managed_subaccount_fetch_future_asset(email, opts \\ [])

@spec get_managed_subaccount_fetch_future_asset(
  any(),
  []
) :: {:ok, any()} | {:error, any()}

Query Managed Sub-account Futures Asset Details (For Investor Master Account) (USER_DATA)

Investor can use this api to query managed sub account futures asset details

Weight(UID): 60

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/fetch-future-asset

Mandatory params:

  • email - Managed Sub Account Email

Optional params:

Link to this function

get_managed_subaccount_info(opts \\ [])

@spec get_managed_subaccount_info(
  recvWindow: any(),
  limit: any(),
  page: any(),
  email: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Managed Sub-account List (For Investor)(USER_DATA)

Get investor's managed sub-account list.

Weight(UID): 60

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/info

Mandatory params:

Optional params:

  • timestamp - timestamp
  • email - Managed Sub Account Email
  • page - Default value: 1
  • limit - Default value: 20, Max value: 20
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_managed_subaccount_margin_asset(email, opts \\ [])

@spec get_managed_subaccount_margin_asset(
  any(),
  []
) :: {:ok, any()} | {:error, any()}

Query Managed Sub-account Margin Asset Details (For Investor Master Account) (USER_DATA)

Investor can use this api to query managed sub account margin asset details

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/marginAsset

Mandatory params:

  • email - Managed Sub Account Email

Optional params:

Link to this function

get_managed_subaccount_query_trans_log(startTime, endTime, page, limit, opts \\ [])

@spec get_managed_subaccount_query_trans_log(any(), any(), any(), any(),
  recvWindow: any(),
  transferFunctionAccountType: any(),
  transfers: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA)

Query Managed Sub Account Transfer Log (For Trading Team Sub Account)

Weight(UID): 60

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/query-trans-log

Mandatory params:

  • startTime - Start Time
  • endTime - End Time (The start time and end time interval cannot exceed half a year)
  • page - Page
  • limit - Limit (Max: 500)

Optional params:

  • timestamp - timestamp
  • transfers - Transfer Direction (FROM/TO)
  • transferFunctionAccountType - Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)
  • recvWindow -
Link to this function

get_managed_subaccount_query_trans_log_for_investor(email, startTime, endTime, page, limit, opts \\ [])

@spec get_managed_subaccount_query_trans_log_for_investor(
  any(),
  any(),
  any(),
  any(),
  any(),
  transferFunctionAccountType: any(),
  transfers: any()
) :: {:ok, any()} | {:error, any()}

Query Managed Sub Account Transfer Log (For Investor Master Account) (USER_DATA)

Investor can use this api to query managed sub account transfer log. This endpoint is available for investor of Managed Sub-Account.A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/queryTransLogForInvestor

Mandatory params:

  • email - Managed Sub Account Email
  • startTime - Start Time
  • endTime - End Time (The start time and end time interval cannot exceed half a year)
  • page - Page
  • limit - Limit (Max: 500)

Optional params:

  • transfers - Transfer Direction (FROM/TO)
  • transferFunctionAccountType - Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)
Link to this function

get_managed_subaccount_query_trans_log_for_trade_parent(email, startTime, endTime, page, limit, opts \\ [])

@spec get_managed_subaccount_query_trans_log_for_trade_parent(
  any(),
  any(),
  any(),
  any(),
  any(),
  transferFunctionAccountType: any(),
  transfers: any()
) :: {:ok, any()} | {:error, any()}

Query Managed Sub Account Transfer Log (For Trading Team Master Account) (USER_DATA)

Trading team can use this api to query managed sub account transfer log. This endpoint is available for trading team of Managed Sub-Account. A Managed Sub-Account is an account type for investors who value flexibility in asset allocation and account application, while delegating trades to a professional trading team.

Weight(UID): 60

Details:

  • METHOD: get
  • URL: /sapi/v1/managed-subaccount/queryTransLogForTradeParent

Mandatory params:

  • email - Managed Sub Account Email
  • startTime - Start Time
  • endTime - End Time (The start time and end time interval cannot exceed half a year)
  • page - Page
  • limit - Limit (Max: 500)

Optional params:

  • transfers - Transfer Direction (FROM/TO)
  • transferFunctionAccountType - Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)
Link to this function

get_sub_account_api_restrictions_ip_restriction_third_party_list(opts \\ [])

@spec get_sub_account_api_restrictions_ip_restriction_third_party_list(
  recvWindow: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Sub-Account API key Third Party IP whitelist (For Master Account)

Weight(UID): 3000

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/apiRestrictions/ipRestriction/thirdPartyList

Mandatory params:

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_assets(email, opts \\ [])

@spec get_sub_account_assets(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Query Sub-account Assets (For Master Account)(USER_DATA)

Fetch sub-account assets

Weight(UID): 60

Details:

  • METHOD: get
  • URL: /sapi/v4/sub-account/assets

Mandatory params:

  • email - Managed Sub Account Email

Optional params:

  • timestamp - timestamp
  • recvWindow -
Link to this function

get_sub_account_futures_account(email, futuresType, opts \\ [])

@spec get_sub_account_futures_account(any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Get Detail on Sub-account's Futures Account V2 (For Master Account)

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v2/sub-account/futures/account

Mandatory params:

  • email - Sub-account email
  • futuresType - * 1 - USDT Margined Futures
  • 2 - COIN Margined Futures

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_futures_account_summary(futuresType, opts \\ [])

@spec get_sub_account_futures_account_summary(any(),
  recvWindow: any(),
  limit: any(),
  page: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Get Summary of Sub-account's Futures Account V2 (For Master Account)

Weight(IP): 10

Details:

  • METHOD: get
  • URL: /sapi/v2/sub-account/futures/accountSummary

Mandatory params:

  • futuresType - * 1 - USDT Margined Futures
  • 2 - COIN Margined Futures

Optional params:

  • timestamp - timestamp
  • page - Default 1
  • limit - Default 10, Max 20
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_futures_internal_transfer(email, futuresType, opts \\ [])

@spec get_sub_account_futures_internal_transfer(any(), any(),
  recvWindow: any(),
  limit: any(),
  page: any(),
  endTime: any(),
  startTime: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Sub-account Futures Asset Transfer History (For Master Account)

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/futures/internalTransfer

Mandatory params:

  • email - Sub-account email
  • futuresType - 1:USDT-margined Futures, 2: Coin-margined Futures

Optional params:

  • timestamp - timestamp
  • startTime - UTC timestamp in ms
  • endTime - UTC timestamp in ms
  • page - Default 1
  • limit - Default value: 50, Max value: 500
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_futures_position_risk(email, futuresType, opts \\ [])

@spec get_sub_account_futures_position_risk(any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Get Futures Position-Risk of Sub-account V2 (For Master Account)

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v2/sub-account/futures/positionRisk

Mandatory params:

  • email - Sub-account email
  • futuresType - * 1 - USDT Margined Futures
  • 2 - COIN Margined Futures

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_list(opts \\ [])

@spec get_sub_account_list(
  recvWindow: any(),
  limit: any(),
  page: any(),
  isFreeze: any(),
  email: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Sub-account List (For Master Account)

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/list

Mandatory params:

Optional params:

  • timestamp - timestamp
  • email - Sub-account email
  • isFreeze -
  • page - Default 1
  • limit - Default 1; max 200
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_margin_account(email, opts \\ [])

@spec get_sub_account_margin_account(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Get Detail on Sub-account's Margin Account (For Master Account)

Weight(IP): 10

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/margin/account

Mandatory params:

  • email - Sub-account email

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_margin_account_summary(opts \\ [])

@spec get_sub_account_margin_account_summary(recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Get Summary of Sub-account's Margin Account (For Master Account)

Weight(IP): 10

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/margin/accountSummary

Mandatory params:

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_spot_summary(opts \\ [])

@spec get_sub_account_spot_summary(
  recvWindow: any(),
  size: any(),
  page: any(),
  email: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Sub-account Spot Assets Summary (For Master Account)

Get BTC valued asset summary of subaccounts.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/spotSummary

Mandatory params:

Optional params:

  • timestamp - timestamp
  • email - Sub-account email
  • page - Default 1
  • size - Default:10 Max:20
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_status(opts \\ [])

@spec get_sub_account_status(recvWindow: any(), email: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Get Sub-account's Status on Margin/Futures (For Master Account)

  • If no email sent, all sub-accounts' information will be returned.

Weight(IP): 10

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/status

Mandatory params:

Optional params:

  • timestamp - timestamp
  • email - Sub-account email
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_sub_account_api_ip_restriction(email, subAccountApiKey, opts \\ [])

@spec get_sub_account_sub_account_api_ip_restriction(any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Get IP Restriction for a Sub-account API Key (For Master Account)

Weight(UID): 3000

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/subAccountApi/ipRestriction

Mandatory params:

  • email - Sub-account email
  • subAccountApiKey -

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_sub_transfer_history(opts \\ [])

@spec get_sub_account_sub_transfer_history(
  recvWindow: any(),
  limit: any(),
  page: any(),
  endTime: any(),
  startTime: any(),
  toEmail: any(),
  fromEmail: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Sub-account Spot Asset Transfer History (For Master Account)

  • fromEmail and toEmail cannot be sent at the same time.
  • Return fromEmail equal master account email by default.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/sub/transfer/history

Mandatory params:

Optional params:

  • timestamp - timestamp
  • fromEmail - Sub-account email
  • toEmail - Sub-account email
  • startTime - UTC timestamp in ms
  • endTime - UTC timestamp in ms
  • page - Default 1
  • limit - Default 1
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_transaction_statistics(email, opts \\ [])

@spec get_sub_account_transaction_statistics(any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Query Sub-account Transaction Statistics (For Master Account) (USER_DATA)

Query Sub-account Transaction statistics (For Master Account).

Weight(UID): 60

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/transaction-statistics

Mandatory params:

  • email - Sub user email

Optional params:

  • timestamp - timestamp
  • recvWindow -
Link to this function

get_sub_account_transfer_sub_user_history(opts \\ [])

@spec get_sub_account_transfer_sub_user_history(
  recvWindow: any(),
  limit: any(),
  endTime: any(),
  startTime: any(),
  type: any(),
  asset: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Sub-account Transfer History (For Sub-account)

  • If type is not sent, the records of type 2: transfer out will be returned by default.
  • If startTime and endTime are not sent, the recent 30-day data will be returned.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/transfer/subUserHistory

Mandatory params:

Optional params:

  • timestamp - timestamp
  • asset -
  • type - * 1 - transfer in
  • 2 - transfer out
  • startTime - UTC timestamp in ms
  • endTime - UTC timestamp in ms
  • limit - Default 500; max 1000.
  • recvWindow - The value cannot be greater than 60000
Link to this function

get_sub_account_universal_transfer(opts \\ [])

@spec get_sub_account_universal_transfer(
  recvWindow: any(),
  limit: any(),
  page: any(),
  endTime: any(),
  startTime: any(),
  clientTranId: any(),
  toEmail: any(),
  fromEmail: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Query Universal Transfer History (For Master Account)

  • fromEmail and toEmail cannot be sent at the same time.
  • Return fromEmail equal master account email by default.
  • The query time period must be less then 30 days.
  • If startTime and endTime not sent, return records of the last 30 days by default.

Weight(IP): 1

Details:

  • METHOD: get
  • URL: /sapi/v1/sub-account/universalTransfer

Mandatory params:

Optional params:

  • timestamp - timestamp
  • fromEmail - Sub-account email
  • toEmail - Sub-account email
  • clientTranId -
  • startTime - UTC timestamp in ms
  • endTime - UTC timestamp in ms
  • page - Default 1
  • limit - Default 500, Max 500
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_managed_subaccount_deposit(toEmail, asset, amount, opts \\ [])

@spec post_managed_subaccount_deposit(any(), any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Deposit assets into the managed sub-account (For Investor Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/managed-subaccount/deposit

Mandatory params:

  • toEmail - Recipient email
  • asset -
  • amount -

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_managed_subaccount_withdraw(fromEmail, asset, amount, opts \\ [])

@spec post_managed_subaccount_withdraw(any(), any(), any(),
  recvWindow: any(),
  transferDate: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Withdrawl assets from the managed sub-account (For Investor Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/managed-subaccount/withdraw

Mandatory params:

  • fromEmail - Sender email
  • asset -
  • amount -

Optional params:

  • timestamp - timestamp
  • transferDate - Withdrawals is automatically occur on the transfer date(UTC0). If a date is not selected, the withdrawal occurs right now
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_blvt_enable(email, enableBlvt, opts \\ [])

@spec post_sub_account_blvt_enable(any(), any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Enable Leverage Token for Sub-account (For Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/blvt/enable

Mandatory params:

  • email - Sub-account email
  • enableBlvt - Only true for now

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_eoptions_enable(email, opts \\ [])

@spec post_sub_account_eoptions_enable(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Enable Options for Sub-account (For Master Account)(USER_DATA)

Enable Options for Sub-account (For Master Account).

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/eoptions/enable

Mandatory params:

  • email - Sub user email

Optional params:

  • timestamp - timestamp
  • recvWindow -
Link to this function

post_sub_account_futures_enable(email, opts \\ [])

@spec post_sub_account_futures_enable(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Enable Futures for Sub-account (For Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/futures/enable

Mandatory params:

  • email - Sub-account email

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_futures_internal_transfer(fromEmail, toEmail, futuresType, asset, amount, opts \\ [])

@spec post_sub_account_futures_internal_transfer(any(), any(), any(), any(), any(),
  recvWindow: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Sub-account Futures Asset Transfer (For Master Account)

  • Master account can transfer max 2000 times a minute

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/futures/internalTransfer

Mandatory params:

  • fromEmail - Sender email
  • toEmail - Recipient email
  • futuresType - 1:USDT-margined Futures,2: Coin-margined Futures
  • asset -
  • amount -

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_futures_transfer(email, asset, amount, type, opts \\ [])

@spec post_sub_account_futures_transfer(any(), any(), any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Futures Transfer for Sub-account (For Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/futures/transfer

Mandatory params:

  • email - Sub-account email
  • asset -
  • amount -
  • type - * 1 - transfer from subaccount's spot account to its USDT-margined futures account
  • 2 - transfer from subaccount's USDT-margined futures account to its spot account
  • 3 - transfer from subaccount's spot account to its COIN-margined futures account
  • 4 - transfer from subaccount's COIN-margined futures account to its spot account

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_margin_enable(email, opts \\ [])

@spec post_sub_account_margin_enable(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Enable Margin for Sub-account (For Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/margin/enable

Mandatory params:

  • email - Sub-account email

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_margin_transfer(email, asset, amount, type, opts \\ [])

@spec post_sub_account_margin_transfer(any(), any(), any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Margin Transfer for Sub-account (For Master Account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/margin/transfer

Mandatory params:

  • email - Sub-account email
  • asset -
  • amount -
  • type - * 1 - transfer from subaccount's spot account to margin account
  • 2 - transfer from subaccount's margin account to its spot account

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_sub_account_api_ip_restriction(email, subAccountApiKey, status, opts \\ [])

@spec post_sub_account_sub_account_api_ip_restriction(any(), any(), any(),
  recvWindow: any(),
  ipAddress: any(),
  thirdPartyName: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Update IP Restriction for Sub-Account API key (For Master Account)

Before the usage of this endpoint, please ensure POST /sapi/v1/sub-account/subAccountApi/ipRestriction was used to enable the IP restriction.

Weight(UID): 3000

Details:

  • METHOD: post
  • URL: /sapi/v2/sub-account/subAccountApi/ipRestriction

Mandatory params:

  • email - Sub-account email
  • subAccountApiKey -
  • status - IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. 3 = Restrict access to users' trusted third party IPs only

Optional params:

  • timestamp - timestamp
  • thirdPartyName - Insert Name of a Third Party
  • ipAddress - Insert static IP in batch, separated by commas.
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_transfer_sub_to_master(asset, amount, opts \\ [])

@spec post_sub_account_transfer_sub_to_master(any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Transfer to Master (For Sub-account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/transfer/subToMaster

Mandatory params:

  • asset -
  • amount -

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_transfer_sub_to_sub(toEmail, asset, amount, opts \\ [])

@spec post_sub_account_transfer_sub_to_sub(any(), any(), any(),
  recvWindow: any(),
  timestamp: any()
) ::
  {:ok, any()} | {:error, any()}

Transfer to Sub-account of Same Master (For Sub-account)

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/transfer/subToSub

Mandatory params:

  • toEmail - Recipient email
  • asset -
  • amount -

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_universal_transfer(fromAccountType, toAccountType, asset, amount, opts \\ [])

@spec post_sub_account_universal_transfer(any(), any(), any(), any(),
  recvWindow: any(),
  symbol: any(),
  clientTranId: any(),
  toEmail: any(),
  fromEmail: any(),
  timestamp: any()
) :: {:ok, any()} | {:error, any()}

Universal Transfer (For Master Account)

  • You need to enable "internal transfer" option for the api key which requests this endpoint.
  • Transfer from master account by default if fromEmail is not sent.
  • Transfer to master account by default if toEmail is not sent.
  • Transfer between futures accounts is not supported.

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/universalTransfer

Mandatory params:

  • fromAccountType -
  • toAccountType -
  • asset -
  • amount -

Optional params:

  • timestamp - timestamp
  • fromEmail - Sub-account email
  • toEmail - Sub-account email
  • clientTranId -
  • symbol - Only supported under ISOLATED_MARGIN type
  • recvWindow - The value cannot be greater than 60000
Link to this function

post_sub_account_virtual_sub_account(subAccountString, opts \\ [])

@spec post_sub_account_virtual_sub_account(any(), recvWindow: any(), timestamp: any()) ::
  {:ok, any()} | {:error, any()}

Create a Virtual Sub-account (For Master Account)

  • This request will generate a virtual sub account under your master account.
  • You need to enable "trade" option for the api key which requests this endpoint.

Weight(IP): 1

Details:

  • METHOD: post
  • URL: /sapi/v1/sub-account/virtualSubAccount

Mandatory params:

  • subAccountString - Please input a string. We will create a virtual email using that string for you to register

Optional params:

  • timestamp - timestamp
  • recvWindow - The value cannot be greater than 60000