Binance.Wallet (binance v2.0.1)
Wallet Endpoints
Summary
Functions
Get API Key Permission (USER_DATA)
Account API Trading Status (USER_DATA)
Daily Account Snapshot (USER_DATA)
Account Status (USER_DATA)
Asset Detail (USER_DATA)
Asset Dividend Record (USER_DATA)
BUSD Convert History (USER_DATA)
DustLog (USER_DATA)
Get Cloud-Mining payment and refund history (USER_DATA)
Trade Fee (USER_DATA)
Query User Universal Transfer History (USER_DATA)
All Coins' Information (USER_DATA)
Query auto-converting stable coins (USER_DATA)
Deposit Address (supporting network) (User Data)
Deposit History (supporting network) (User Data)
Withdraw History (supporting network) (User Data)
System Status (System)
Disable Fast Withdraw Switch (USER_DATA)
Enable Fast Withdraw Switch (USER_DATA)
BUSD Convert (TRADE)
Dust Transfer (USER_DATA)
Get Assets That Can Be Converted Into BNB (USER_DATA)
Funding Wallet (USER_DATA)
User Asset (USER_DATA)
User Universal Transfer (USER_DATA)
Switch on/off BUSD and stable coins conversion (USER_DATA)
One click arrival deposit apply (for expired address deposit) (USER_DATA)
Withdraw (USER_DATA)
Functions
get_account_api_restrictions(opts \\ [])
@spec get_account_api_restrictions(recvWindow: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
Get API Key Permission (USER_DATA)
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/account/apiRestrictions
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
get_account_api_trading_status(opts \\ [])
@spec get_account_api_trading_status(recvWindow: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
Account API Trading Status (USER_DATA)
Fetch account API trading status with details.
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/account/apiTradingStatus
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
get_account_snapshot(type, opts \\ [])
@spec get_account_snapshot(any(), recvWindow: any(), limit: any(), endTime: any(), startTime: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Daily Account Snapshot (USER_DATA)
- The query time period must be less than 30 days
- Support query within the last one month only
- If startTimeand endTime not sent, return records of the last 7 days by default
Weight(IP): 2400
Details:
- METHOD: get
- URL: /sapi/v1/accountSnapshot
Mandatory params:
- type - "SPOT", "MARGIN", "FUTURES"
Optional params:
- timestamp - timestamp
- startTime - UTC timestamp in ms
- endTime - UTC timestamp in ms
- limit -
- recvWindow - The value cannot be greater than 60000
get_account_status(opts \\ [])
Account Status (USER_DATA)
Fetch account status detail.
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/account/status
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
get_asset_asset_detail(opts \\ [])
@spec get_asset_asset_detail(recvWindow: any(), asset: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
Asset Detail (USER_DATA)
Fetch details of assets supported on Binance.
- Please get network and other deposit or withdraw details from
GET /sapi/v1/capital/config/getall
.
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/asset/assetDetail
Mandatory params:
Optional params:
- timestamp - timestamp
- asset -
- recvWindow - The value cannot be greater than 60000
get_asset_asset_dividend(opts \\ [])
@spec get_asset_asset_dividend( recvWindow: any(), limit: any(), endTime: any(), startTime: any(), asset: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Asset Dividend Record (USER_DATA)
Query asset Dividend Record
Weight(IP): 10
Details:
- METHOD: get
- URL: /sapi/v1/asset/assetDividend
Mandatory params:
Optional params:
- timestamp - timestamp
- asset -
- startTime - UTC timestamp in ms
- endTime - UTC timestamp in ms
- limit -
- recvWindow - The value cannot be greater than 60000
get_asset_convert_transfer_query_by_page(startTime, endTime, opts \\ [])
@spec get_asset_convert_transfer_query_by_page(any(), any(), recvWindow: any(), size: any(), current: any(), accountType: any(), asset: any(), clientTranId: any(), tranId: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
BUSD Convert History (USER_DATA)
Get user assets, just for positive data.
Weight(IP): 5
Details:
- METHOD: get
- URL: /sapi/v1/asset/convert-transfer/queryByPage
Mandatory params:
- startTime - inclusive, unit: ms
- endTime - exclusive, unit: ms
Optional params:
- timestamp - timestamp
- tranId - The transaction id
- clientTranId - The user-defined transaction id
- asset - The current asset
- accountType - Only MAIN and CARD, default MAIN
- current - current page, default 1, the min value is 1
- size - page size, default 10, the max value is 100
- recvWindow - The value cannot be greater than 60000
get_asset_dribblet(opts \\ [])
@spec get_asset_dribblet( recvWindow: any(), endTime: any(), startTime: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
DustLog (USER_DATA)
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/asset/dribblet
Mandatory params:
Optional params:
- timestamp - timestamp
- startTime - UTC timestamp in ms
- endTime - UTC timestamp in ms
- recvWindow - The value cannot be greater than 60000
get_asset_ledger_transfer_cloud_mining_query_by_page(startTime, endTime, opts \\ [])
@spec get_asset_ledger_transfer_cloud_mining_query_by_page(any(), any(), recvWindow: any(), size: any(), current: any(), asset: any(), clientTranId: any(), tranId: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Get Cloud-Mining payment and refund history (USER_DATA)
Get user assets, just for positive data.
Weight(IP): 5
Details:
- METHOD: get
- URL: /sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage
Mandatory params:
- startTime - inclusive, unit: ms
- endTime - exclusive, unit: ms
Optional params:
- timestamp - timestamp
- tranId - The transaction id
- clientTranId - The unique flag
- asset - If it is blank, we will query all assets
- current - current page, default 1, the min value is 1
- size - page size, default 10, the max value is 100
- recvWindow - The value cannot be greater than 60000
get_asset_trade_fee(opts \\ [])
@spec get_asset_trade_fee(recvWindow: any(), symbol: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
Trade Fee (USER_DATA)
Fetch trade fee
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/asset/tradeFee
Mandatory params:
Optional params:
- timestamp - timestamp
- symbol - Trading symbol, e.g. BNBUSDT
- recvWindow - The value cannot be greater than 60000
get_asset_transfer(type, opts \\ [])
@spec get_asset_transfer(any(), recvWindow: any(), toSymbol: any(), fromSymbol: any(), size: any(), current: any(), endTime: any(), startTime: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Query User Universal Transfer History (USER_DATA)
fromSymbol
must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGINtoSymbol
must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN- Support query within the last 6 months only
- If
startTime
andendTime
not sent, return records of the last 7 days by default
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/asset/transfer
Mandatory params:
- type - Universal transfer type
Optional params:
- timestamp - timestamp
- startTime - UTC timestamp in ms
- endTime - UTC timestamp in ms
- current - Current querying page. Start from 1. Default:1
- size - Default:10 Max:100
- fromSymbol - Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
- toSymbol - Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
- recvWindow - The value cannot be greater than 60000
get_capital_config_getall(opts \\ [])
@spec get_capital_config_getall(recvWindow: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
All Coins' Information (USER_DATA)
Get information of coins (available for deposit and withdraw) for user.
Weight(IP): 10
Details:
- METHOD: get
- URL: /sapi/v1/capital/config/getall
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
get_capital_contract_convertible_coins(opts \\ [])
Query auto-converting stable coins (USER_DATA)
Get a user's auto-conversion settings in deposit/withdrawal
Weight(UID): 600
Details:
- METHOD: get
- URL: /sapi/v1/capital/contract/convertible-coins
Mandatory params:
Optional params:
get_capital_deposit_address(coin, opts \\ [])
@spec get_capital_deposit_address(any(), recvWindow: any(), network: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Deposit Address (supporting network) (User Data)
Fetch deposit address with network.
- If network is not send, return with default network of the coin.
- You can get network and isDefault in networkList in the response of Get /sapi/v1/capital/config/getall (HMAC SHA256).
Weight(IP): 10
Details:
- METHOD: get
- URL: /sapi/v1/capital/deposit/address
Mandatory params:
- coin - Coin name
Optional params:
- timestamp - timestamp
- network -
- recvWindow - The value cannot be greater than 60000
get_capital_deposit_hisrec(opts \\ [])
@spec get_capital_deposit_hisrec( recvWindow: any(), limit: any(), offset: any(), endTime: any(), startTime: any(), status: any(), coin: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Deposit History (supporting network) (User Data)
Fetch deposit history.
- Please notice the default
startTime
andendTime
to make sure that time interval is within 0-90 days. - If both
startTime
andendTime
are sent, time betweenstartTime
andendTime
must be less than 90 days.
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/capital/deposit/hisrec
Mandatory params:
Optional params:
- timestamp - timestamp
- coin - Coin name
- status - *
0
- pending
6
- credited but cannot withdraw1
- success
- startTime - UTC timestamp in ms
- endTime - UTC timestamp in ms
- offset -
- limit - Default 500; max 1000.
- recvWindow - The value cannot be greater than 60000
get_capital_withdraw_history(opts \\ [])
@spec get_capital_withdraw_history( recvWindow: any(), limit: any(), offset: any(), endTime: any(), startTime: any(), status: any(), withdrawOrderId: any(), coin: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Withdraw History (supporting network) (User Data)
Fetch withdraw history.
network
may not be in the response for old withdraw.- Please notice the default
startTime
andendTime
to make sure that time interval is within 0-90 days. - If both
startTime
andendTime
are sent, time betweenstartTime
andendTime
must be less than 90 days
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/capital/withdraw/history
Mandatory params:
Optional params:
- timestamp - timestamp
- coin - Coin name
- withdrawOrderId -
- status - *
0
- Email Sent
1
- Cancelled2
- Awaiting Approval3
- Rejected4
- Processing5
- Failure6
- Completed
- startTime - UTC timestamp in ms
- endTime - UTC timestamp in ms
- offset -
- limit - Default 500; max 1000.
- recvWindow - The value cannot be greater than 60000
get_system_status(opts \\ [])
System Status (System)
Fetch system status.
Weight(IP): 1
Details:
- METHOD: get
- URL: /sapi/v1/system/status
Mandatory params:
Optional params:
post_account_disable_fast_withdraw_switch(opts \\ [])
@spec post_account_disable_fast_withdraw_switch(recvWindow: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
Disable Fast Withdraw Switch (USER_DATA)
- This request will disable fastwithdraw switch under your account.
- You need to enable "trade" option for the api key which requests this endpoint.
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/account/disableFastWithdrawSwitch
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
post_account_enable_fast_withdraw_switch(opts \\ [])
@spec post_account_enable_fast_withdraw_switch(recvWindow: any(), timestamp: any()) :: {:ok, any()} | {:error, any()}
Enable Fast Withdraw Switch (USER_DATA)
- This request will enable fastwithdraw switch under your account. You need to enable "trade" option for the api key which requests this endpoint.
- When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/account/enableFastWithdrawSwitch
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
post_asset_convert_transfer(clientTranId, asset, amount, targetAsset, opts \\ [])
@spec post_asset_convert_transfer(any(), any(), any(), any(), recvWindow: any(), accountType: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
BUSD Convert (TRADE)
Get user assets, just for positive data.
Weight(IP): 5
Details:
- METHOD: post
- URL: /sapi/v1/asset/convert-transfer
Mandatory params:
- clientTranId - The unique user-defined transaction id, min length 20
- asset - The current asset
- amount - The amount must be positive number
- targetAsset - Target asset you want to convert
Optional params:
- timestamp - timestamp
- accountType - Only MAIN and CARD, default MAIN
- recvWindow - The value cannot be greater than 60000
post_asset_dust(asset, opts \\ [])
Dust Transfer (USER_DATA)
Convert dust assets to BNB.
Weight(UID): 10
Details:
- METHOD: post
- URL: /sapi/v1/asset/dust
Mandatory params:
- asset - The asset being converted. For example, asset=BTC&asset=USDT
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
post_asset_dust_btc(opts \\ [])
Get Assets That Can Be Converted Into BNB (USER_DATA)
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/asset/dust-btc
Mandatory params:
Optional params:
- timestamp - timestamp
- recvWindow - The value cannot be greater than 60000
post_asset_get_funding_asset(opts \\ [])
@spec post_asset_get_funding_asset( recvWindow: any(), needBtcValuation: any(), asset: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Funding Wallet (USER_DATA)
- Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/asset/get-funding-asset
Mandatory params:
Optional params:
- timestamp - timestamp
- asset -
- needBtcValuation -
- recvWindow - The value cannot be greater than 60000
post_asset_get_user_asset(opts \\ [])
@spec post_asset_get_user_asset( recvWindow: any(), needBtcValuation: any(), asset: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
User Asset (USER_DATA)
Get user assets, just for positive data.
Weight(IP): 5
Details:
- METHOD: post
- URL: /sapi/v3/asset/getUserAsset
Mandatory params:
Optional params:
- timestamp - timestamp
- asset - If asset is blank, then query all positive assets user have.
- needBtcValuation -
- recvWindow - The value cannot be greater than 60000
post_asset_transfer(type, asset, amount, opts \\ [])
@spec post_asset_transfer(any(), any(), any(), recvWindow: any(), toSymbol: any(), fromSymbol: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
User Universal Transfer (USER_DATA)
You need to enable Permits Universal Transfer
option for the api key which requests this endpoint.
fromSymbol
must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGINtoSymbol
must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
ENUM of transfer types:
- MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account
- MAIN_CMFUTURE Spot account transfer to COIN-M Futures account
- MAIN_MARGIN Spot account transfer to Margin(cross)account
- UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account
- UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account
- CMFUTURE_MAIN COIN-M Futures account transfer to Spot account
- CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account
- MARGIN_MAIN Margin(cross)account transfer to Spot account
- MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures
- MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures
- ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account
- MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account
- ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account
- MAIN_FUNDING Spot account transfer to Funding account
- FUNDING_MAIN Funding account transfer to Spot account
- FUNDING_UMFUTURE Funding account transfer to UMFUTURE account
- UMFUTURE_FUNDING UMFUTURE account transfer to Funding account
- MARGIN_FUNDING MARGIN account transfer to Funding account
- FUNDING_MARGIN Funding account transfer to Margin account
- FUNDING_CMFUTURE Funding account transfer to CMFUTURE account
- CMFUTURE_FUNDING CMFUTURE account transfer to Funding account
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/asset/transfer
Mandatory params:
- type - Universal transfer type
- asset -
- amount -
Optional params:
- timestamp - timestamp
- fromSymbol - Must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
- toSymbol - Must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
- recvWindow - The value cannot be greater than 60000
post_capital_contract_convertible_coins(coin, enable, opts \\ [])
Switch on/off BUSD and stable coins conversion (USER_DATA)
User can use it to turn on or turn off the BUSD auto-conversion from/to a specific stable coin.
Params need to be in the POST body
Weight(UID): 600
Details:
- METHOD: post
- URL: /sapi/v1/capital/contract/convertible-coins
Mandatory params:
- coin - Must be USDC, USDP or TUSD
- enable - true: turn on the auto-conversion. false: turn off the auto-conversion
Optional params:
post_capital_deposit_credit_apply(opts \\ [])
@spec post_capital_deposit_credit_apply( subUserId: any(), subAccountId: any(), txId: any(), depositId: any() ) :: {:ok, any()} | {:error, any()}
One click arrival deposit apply (for expired address deposit) (USER_DATA)
Apply deposit credit for expired address (One click arrival)
Params need to be in the POST body
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/capital/deposit/credit-apply
Mandatory params:
Optional params:
- depositId - Deposit record Id, priority use
- txId - Deposit txId, used when depositId is not specified
- subAccountId - Sub-accountId of Cloud user
- subUserId - Sub-userId of parent user
post_capital_withdraw_apply(coin, address, amount, opts \\ [])
@spec post_capital_withdraw_apply(any(), any(), any(), recvWindow: any(), walletType: any(), name: any(), transactionFeeFlag: any(), addressTag: any(), network: any(), withdrawOrderId: any(), timestamp: any() ) :: {:ok, any()} | {:error, any()}
Withdraw (USER_DATA)
Submit a withdraw request.
- If
network
not send, return with default network of the coin. - You can get
network
andisDefault
innetworkList
of a coin in the response ofGet /sapi/v1/capital/config/getall (HMAC SHA256)
.
Weight(IP): 1
Details:
- METHOD: post
- URL: /sapi/v1/capital/withdraw/apply
Mandatory params:
- coin - Coin name
- address -
- amount -
Optional params:
- timestamp - timestamp
- withdrawOrderId - Client id for withdraw
- network - Get the value from
GET /sapi/v1/capital/config/getall
- addressTag - Secondary address identifier for coins like XRP,XMR etc.
- transactionFeeFlag - When making internal transfer
true
-> returning the fee to the destination account;false
-> returning the fee back to the departure account.- name -
- walletType - The wallet type for withdraw,0-Spot wallet, 1- Funding wallet. Default is Spot wallet
- recvWindow - The value cannot be greater than 60000