Sub Account Endpoints
Create a Virtual Sub-account (For Master Account)
- sub_account_create(self, subAccountString: str, **kwargs)
Create a Virtual Sub-account(For Master Account) Generate a virtual sub account under the master account
POST /sapi/v1/sub-account/virtualSubAccount
https://developers.binance.com/docs/sub_account/account-management/Create-a-Virtual-Sub-account
- Parameters:
subAccountString (str) – Please input a string. We will create a virtual email using that string for you to register
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account List (For Master Account)
- sub_account_list(self, **kwargs)
Query Sub-account List(For Master Account) Fetch sub account list.
GET /sapi/v1/sub-account/list
https://developers.binance.com/docs/sub_account/account-management/Query-Sub-account-List
- Keyword Arguments:
email (str, optional) – Sub-account email
isFreeze (str, optional) – true or false
page (int, optional) – default 1
limit (int, optional) – default 10, max 200
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account Assets (For Master Account)
- sub_account_assets(self, email: str, **kwargs)
Query Sub-account Assets(For Master Account) Fetch sub-account assets
GET /sapi/v3/sub-account/assets
https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Assets-V3
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Get Sub-account Deposit Address (For Master Account)
- sub_account_deposit_address(self, email: str, coin: str, **kwargs)
Get Sub-account Deposit Address (For Master Account) Fetch sub-account deposit address
GET /sapi/v1/capital/deposit/subAddress
https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-Address
- Parameters:
email (str)
coin (str)
- Keyword Arguments:
network (str, optional)
recvWindow (int, optional) – The value cannot be greater than 60000
Get Sub-account Deposit History (For Master Account)
- sub_account_deposit_history(self, email: str, **kwargs)
Get Sub-account Deposit History (For Master Account) Fetch sub-account deposit history
GET /sapi/v1/capital/deposit/subHisrec
https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-Address
- Parameters:
email (str)
- Keyword Arguments:
coin (str, optional)
status (int, optional) – Default 0 (0:pending,6: credited but cannot withdraw, 1:success)
startTime (int, optional)
endTime (int, optional)
limit (int, optional)
offset (int, optional) – Default:0
txId (str, optional)
recvWindow (int, optional) – The value cannot be greater than 60000
Get Sub-account’s Status on Margin/Futures(For Master Account)
- sub_account_status(self, **kwargs)
Get Sub-account’s Status on Margin/Futures(For Master Account)
GET /sapi/v1/sub-account/status
- Keyword Arguments:
email (str, optional) – Sub-account email
recvWindow (int, optional) – The value cannot be greater than 60000
Enable Margin for Sub-account (For Master Account)
- sub_account_enable_margin(self, email: str, **kwargs)
Enable Margin for Sub-account (For Master Account)
POST /sapi/v1/sub-account/margin/enable
https://developers.binance.com/docs/sub_account/account-management/Enable-Margin-for-Sub-account
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Get Detail on Sub-account’s Margin Account (For Master Account)
- sub_account_margin_account(self, email: str, **kwargs)
Get Detail on Sub-account’s Margin Account (For Master Account)
GET /sapi/v1/sub-account/margin/account
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Get Summary of Sub-account’s Margin Account (For Master Account)
- sub_account_margin_account_summary(self, **kwargs)
Get Summary of Sub-account’s Margin Account (For Master Account)
GET /sapi/v1/sub-account/margin/accountSummary
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Enable Futures for Sub-account (For Master Account)
- sub_account_enable_futures(self, email: str, **kwargs)
Enable Futures for Sub-account (For Master Account)
POST /sapi/v1/sub-account/futures/enable
https://developers.binance.com/docs/sub_account/account-management/Enable-Futures-for-Sub-account
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Futures Transfer for Sub-account (For Master Account)
- sub_account_futures_transfer(self, email: str, asset: str, amount: float, type: int, **kwargs)
Futures Transfer for Sub-account(For Master Account)
POST /sapi/v1/sub-account/futures/transfer
https://developers.binance.com/docs/sub_account/asset-management/Futures-Transfer-for-Sub-account
- Parameters:
email (str)
asset (str)
amount (float)
type (int)
Margin Transfer for Sub-account (For Master Account)
- sub_account_margin_transfer(self, email: str, asset: str, amount: float, type: int, **kwargs)
Margin Transfer for Sub-account(For Master Account)
POST /sapi/v1/sub-account/margin/transfer
https://developers.binance.com/docs/sub_account/asset-management/Margin-Transfer-for-Sub-account
- Parameters:
email (str)
asset (str)
amount (float)
type (int)
Transfer to Sub-account of Same Master (For Sub-account)
- sub_account_transfer_to_sub(self, toEmail: str, asset: str, amount: float, **kwargs)
Transfer to Sub-account of Same Master(For Sub-account)
POST /sapi/v1/sub-account/transfer/subToSub
- Parameters:
toEmail (str)
asset (str)
amount (float)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Transfer to Master (For Sub-account)
- sub_account_transfer_to_master(self, asset: str, amount: float, **kwargs)
Transfer to Master(For Sub-account)
POST /sapi/v1/sub-account/transfer/subToMaster
https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Master
- Parameters:
asset (str)
amount (float)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Sub-account Transfer History (For Sub-account)
- sub_account_transfer_sub_account_history(self, **kwargs)
Sub-account Transfer History (For Sub-account)
GET /sapi/v1/sub-account/transfer/subUserHistory
https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Transfer-History
- Keyword Arguments:
asset (str, optional) – If not sent, result of all assets will be returned
type (int, optional) – 1: transfer in, 2: transfer out
startTime (int, optional)
endTime (int, optional)
limit (int, optional) – Default 500
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account Futures Asset Transfer History (For Master Account)
- sub_account_futures_asset_transfer_history(self, email: str, futuresType: int, **kwargs)
Query Sub-account Futures Asset Transfer History(For Master Account)
GET /sapi/v1/sub-account/futures/internalTransfer
- Parameters:
email (str) – Sub-account email
futuresType (int) – 1 : USDT-maringed Futues, 2: Coin-margined Futures
- Keyword Arguments:
startTime (int, optional) – Default return the history with in 100 days
endTime (int, optional) – Default return the history with in 100 days
page (int, optional) – Default value: 1
limit (int, optional) – Default value: 50, Max value: 500
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account Futures Asset Transfer History (For Master Account)
- sub_account_futures_asset_transfer(self, fromEmail: str, toEmail: str, futuresType: int, asset: str, amount: float, **kwargs)
Query Sub-account Futures Asset Transfer History(For Master Account)
POST /sapi/v1/sub-account/futures/internalTransfer
https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Futures-Asset-Transfer
- Parameters:
fromEmail (str) – Sender email
toEmail (str) – Recipient email
futuresType (int) – 1 : USDT-maringed Futues, 2: Coin-margined Futures
asset (str)
amount (float)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account Spot Assets Summary (For Master Account)
- sub_account_spot_summary(self, **kwargs)
Query Sub-account Spot Assets Summary (For Master Account)
GET /sapi/v1/sub-account/spotSummary
- Keyword Arguments:
email (str, optional) – Sub account email
page (int, optional) – Default: 1
size (int, optional) – Default 10, max 20
recvWindow (int, optional) – The value cannot be greater than 60000
Universal Transfer (For Master Account)
- sub_account_universal_transfer(self, fromAccountType: str, toAccountType: str, asset: str, amount: float, **kwargs)
Universal Transfer (For Master Account)
POST /sapi/v1/sub-account/universalTransfer
https://developers.binance.com/docs/sub_account/asset-management/Universal-Transfer
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. Supported transfer scenarios: - Master account SPOT transfer to sub-account SPOT, USDT_FUTURE, COIN_FUTURE, MARGIN(Cross), ISOLATED_MARGIN - Sub-account SPOT, USDT_FUTURE, COIN_FUTURE, MARGIN(Cross), ISOLATED_MARGIN transfer to master account SPOT - Transfer between two SPOT sub-accounts
- Parameters:
fromAccountType (str) – “SPOT”, “USDT_FUTURE”, “COIN_FUTURE”, “MARGIN”(Cross), “ISOLATED_MARGIN”
toAccountType (str) – “SPOT”, “USDT_FUTURE”, “COIN_FUTURE”, “MARGIN”(Cross), “ISOLATED_MARGIN”
asset (str)
amount (float)
- Keyword Arguments:
fromEmail (str, optional)
toEmail (str, optional)
clientTranId (str, optional) – Must be unique
symbol (str, optional) – Only supported under ISOLATED_MARGIN type
recvWindow (int, optional) – The value cannot be greater than 60000
Query Universal Transfer History (For Master Account)
- sub_account_universal_transfer_history(self, **kwargs)
Query Universal Transfer History (For Master Account)
GET /sapi/v1/sub-account/universalTransfer
https://developers.binance.com/docs/sub_account/asset-management/Query-Universal-Transfer-History
fromEmail and toEmail cannot be sent at the same time. Return fromEmail equal master account email by default. Only get the latest history of past 30 days.
- Keyword Arguments:
fromEmail (str, optional)
toEmail (str, optional)
clientTranId (str, optional)
startTime (int, optional)
endTime (int, optional)
page (int, optional)
limit (int, optional) – Default 10, max 20
recvWindow (int, optional) – The value cannot be greater than 60000
Get Detail on Sub-account’s Futures Account V2 (For Master Account)
- sub_account_futures_account(self, email: str, futuresType: int, **kwargs)
Get Detail on Sub-account’s Futures Account V2 (For Master Account)
GET /sapi/v2/sub-account/futures/account
- Parameters:
email (str) – Sub-account email
futuresType (int) – 1 : USDT-maringed Futues, 2: Coin-margined Futures
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Get Summary of Sub-account’s Futures Account V2 (For Master Account)
- sub_account_futures_account_summary(self, futuresType: int, **kwargs)
Get Summary of Sub-account’s Futures Account V2 (For Master Account)
GET /sapi/v2/sub-account/futures/accountSummary
- Parameters:
futuresType (int) – 1 : USDT-maringed Futues, 2: Coin-margined Futures
- Keyword Arguments:
page (int, optional) – Default:1
limit (int, optional) – Default 10, max 20
recvWindow (int, optional) – The value cannot be greater than 60000
Get Futures Position-Risk of Sub-account V2 (For Master Account)
- sub_account_futures_position_risk(self, email: str, futuresType: str, **kwargs)
Get Futures Position-Risk of Sub-account V2 (For Master Account)
GET /sapi/v2/sub-account/futures/positionRisk
- Parameters:
email (str) – Sub-account email
futuresType (int) – 1 : USDT-maringed Futues, 2: Coin-margined Futures
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account Spot Asset Transfer History (SAPI For Master Account)
- sub_account_spot_transfer_history(self, **kwargs)
Query Sub-account Spot Asset Transfer History (SAPI For Master Account)
GET /sapi/v1/sub-account/sub/transfer/history
- Keyword Arguments:
fromEmail (str, optional)
toEmail (str, optional)
startTime (int, optional) – Default return the history with in 100 days
endTime (int, optional) – Default return the history with in 100 days
page (int, optional) – Default value: 1
limit (int, optional) – Default value: 500
recvWindow (int, optional) – The value cannot be greater than 60000
Enable Leverage Token for Sub-account (For Master Account)
- sub_account_enable_leverage_token(self, email: str, enableBlvt: bool, **kwargs)
Enable Leverage Token for Sub-account(For Master Account) Enable leverage token for sub-account
POST /sapi/v1/sub-account/blvt/enable
- Parameters:
email (str) – Sub-account email
enableBlvt (bool) – Only True for now
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Deposit assets into the managed sub-account (For Investor Master Account)
- managed_sub_account_deposit(self, toEmail: str, asset: str, amount: float, **kwargs)
Deposit assets into the managed sub-account(For Investor Master Account)
POST /sapi/v1/managed-subaccount/deposit
- Parameters:
toEmail (str) – Sub-account email
asset (str)
amount (float)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query managed sub-account asset details (For Investor Master Account)
- managed_sub_account_assets(self, email: str, **kwargs)
Query managed sub-account asset details(For Investor Master Account)
GET /sapi/v1/managed-subaccount/asset
- Parameters:
email (str) – Sub-account email
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Withdrawl assets from the managed sub-account (For Investor Master Account)
- managed_sub_account_withdraw(self, fromEmail: str, asset: str, amount: float, **kwargs)
Withdrawl assets from the managed sub-account(For Investor Master Account)
POST /sapi/v1/managed-subaccount/withdraw
- Parameters:
fromEmail (str) – Sub-account email
asset (str)
amount (float)
- Keyword Arguments:
transferDate (int, optional) – Withdrawals is automatically occur on the transfer date(UTC0).
now (If a date is not selected, the withdrawal occurs right)
recvWindow (int, optional) – The value cannot be greater than 60000
Update IP Restriction for Sub-Account API key (For Master Account)
- sub_account_update_ip_restriction(self, email: str, subAccountApiKey: str, status: str, **kwargs)
Update IP Restriction for Sub-Account API key (For Master Account)
POST /sapi/v2/sub-account/subAccountApi/ipRestriction
- Parameters:
email (str) – Sub-account email
subAccountApiKey (str)
status (str) – IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only.
- Keyword Arguments:
ipAddress (str, optional) – Can be added in batches, separated by commas
recvWindow (int, optional)
Get IP Restriction for a Sub-account API Key (For Master Account)
- sub_account_api_get_ip_restriction(self, email: str, subAccountApiKey: str, **kwargs)
Get IP Restriction for a Sub-account API Key (For Master Account)
GET /sapi/v1/sub-account/subAccountApi/ipRestriction
- Parameters:
email (str) – Sub-account email
subAccountApiKey (str)
- Keyword Arguments:
recvWindow (int, optional)
Delete IP List for a Sub-account API Key (For Master Account)
- sub_account_api_delete_ip(self, email: str, subAccountApiKey: str, ipAddress: str, **kwargs)
Delete IP List for a Sub-account API Key (For Master Account)
DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
- Parameters:
email (str) – Sub-account email
subAccountApiKey (str)
ipAddress (str) – Can be added in batches, separated by commas
- Keyword Arguments:
thirdPartyName (str, optional)
recvWindow (int, optional)
Query Managed Sub-account Snapshot (For Investor Master Account)
- managed_sub_account_get_snapshot(self, email: str, type: str, **kwargs)
Query Managed Sub-account Snapshot(For Investor Master Account)
GET /sapi/v1/managed-subaccount/accountSnapshot (HMAC SHA256)
- Parameters:
email (str) – email
type (str) – “SPOT”, “MARGIN”(cross), “FUTURES”(UM)
- Keyword Arguments:
startTime (int, optional)
endTime (int, optional)
limit (int, optional) – min 7, max 30, default 7
recvWindow (int, optional)
Query Managed Sub Account Transfer Log (Investor) (USER_DATA)
- managed_sub_account_investor_trans_log(self, email: str, startTime: int, endTime: int, page: int, limit: int, **kwargs)
Query Managed Sub Account Transfer Log (Investor) (USER_DATA)
GET /sapi/v1/managed-subaccount/transfer/history (HMAC SHA256)
https://developers.binance.com/en
- Parameters:
email (str) – email
startTime (int) – start time
endTime (int) – end time
page (int) – page
limit (int) – limit
- Keyword Arguments:
transfers (str, optional) – Transfer Direction (FROM/TO)
transferFunctionAccountType (str, optional) – Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)
Query Managed Sub Account Transfer Log (Trading Team) (USER_DATA)
- managed_sub_account_trading_trans_log(self, email: str, startTime: int, endTime: int, page: int, limit: int, **kwargs)
Query Managed Sub Account Transfer Log (Trading Team) (USER_DATA)
GET /sapi/v1/managed-subaccount/queryTransLogForTradeParent
- Parameters:
email (str) – email
startTime (int) – start time
endTime (int) – end time
page (int) – page
limit (int) – limit
- Keyword Arguments:
transfers (str, optional) – Transfer Direction (FROM/TO)
transferFunctionAccountType (str, optional) – Transfer function account type (SPOT/MARGIN/ISOLATED_MARGIN/USDT_FUTURE/COIN_FUTURE)
Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA)
- managed_sub_account_deposit_address(self, email: str, coin: str, **kwargs)
Get Managed Sub-account Deposit Address (For Investor Master Account) (USER_DATA)
GET /sapi/v1/managed-subaccount/deposit/address (HMAC SHA256)
- Parameters:
email (str) – email
coin (str) – coin
- Keyword Arguments:
network (str, optional)
recvWindow (int, optional)
Query Sub-account Assets (For Master Account)
- query_sub_account_assets(self, email: str, **kwargs)
Query Sub-account Assets (For Master Account) (USER_DATA)
Fetch sub-account assets
Weight(UID): 60
GET /sapi/v4/sub-account/assets
https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Assets-V4
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Enable Options for Sub-account (For Master Account)
- enable_options_for_sub_account(self, email: str, **kwargs)
Enable Options for Sub-account (For Master Account) (USER_DATA)
Weight(IP): 1
POST /sapi/v1/sub-account/eoptions/enable
https://developers.binance.com/docs/sub_account/account-management/Enable-Options-for-Sub-account
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Sub-account Transaction Statistics (For Master Account)
- query_sub_account_transaction_statistics(self, email: str, **kwargs)
Query Sub-account Transaction Statistics (For Master Account) (USER_DATA)
Weight(UID): 60
GET /sapi/v1/sub-account/transaction-statistics
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Managed Sub-account Margin Asset Details (For Investor Master Account)
- query_managed_sub_account_margin_asset_details(self, email: str, **kwargs)
Query Managed Sub-account Margin Asset Details (For Investor Master Account)
Investor can use this api to query managed sub account margin asset details
Weight(IP): 1
GET /sapi/v1/managed-subaccount/marginAsset
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Managed Sub-account List (For Investor)
- query_managed_sub_account_list(self, **kwargs)
Query Managed Sub-account List (For Investor) (USER_DATA)
Get investor’s managed sub-account list.
Weight(UID): 60
GET /sapi/v1/managed-subaccount/info
https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-List
- Keyword Arguments:
email (str, optional)
page (int, optional) – Default 1
limit (int, optional) – Default 500; max 1000.
recvWindow (int, optional) – The value cannot be greater than 60000
Query Managed Sub-account Futures Asset Details (For Investor Master Account)
- query_managed_sub_account_futures_asset_details(self, email: str, **kwargs)
Query Managed Sub-account Futures Asset Details (For Investor Master Account)
Investor can use this api to query managed sub account futures asset details
Weight(UID): 60
GET /sapi/v1/managed-subaccount/fetch-future-asset
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Futures Position-Risk of Sub-account (For Master Account)
- futures_position_risk_of_sub_account(self, email: str, **kwargs)
Get Futures Position-Risk of Sub-account (For Master Account)
Weight(IP): 10
GET /sapi/v1/sub-account/futures/positionRisk
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Summary of Sub-account’s Futures Account V2 (For Master Account)
- summary_of_sub_account_s_futures_account(self, futuresType: int, **kwargs)
Get Summary of Sub-account’s Futures Account V2 (For Master Account)
Weight(IP): 10
GET /sapi/v2/sub-account/futures/accountSummary
- Parameters:
futuresType (int) – 1:USDT Margined Futures, 2:COIN Margined Futures
- Keyword Arguments:
page (int, optional) – default:1
limit (int, optional) – default 10, max 20
recvWindow (int, optional) – The value cannot be greater than 60000
Detail on Sub-account’s Futures Account (For Master Account)
- detail_on_sub_account_s_futures_account(self, email: str, **kwargs)
Detail on Sub-account’s Futures Account (For Master Account)
Weight(IP): 10
GET /sapi/v1/sub-account/futures/account
- Parameters:
email (str)
- Keyword Arguments:
recvWindow (int, optional) – The value cannot be greater than 60000
Query Managed Sub Account Transfer Log (For Trading Team Sub Account)(USER_DATA)
- query_managed_sub_account_transfer_log(self, startTime: int, endTime: int, page: int, limit: int, **kwargs)
Query Managed Sub Account Transfer Log (For Trading Team Sub Account)
Query Managed Sub Account Transfer Log (For Trading Team Sub Account)
Weight(UID): 60
GET /sapi/v1/managed-subaccount/query-trans-log
- Parameters:
startTime (int) – UTC timestamp in ms
endTime (int) – UTC timestamp in ms
page (int) – Default 1
limit (int) – Default 500; max 1000.
- Keyword Arguments:
transfers (str, optional)
transferFunctionAccountType (str, optional)
recvWindow (int, optional) – The value cannot be greater than 60000