API Binance Wallet

· Componentes

From sgcWebSockets 2022.7.0 the API Binance Wallet is supported, this means you can request Withdraw, view the deposit history, withdraw history and more.

https://binance-docs.github.io/apidocs/spot/en/#wallet-endpoints

Métodos de Wallet

Método Descripción
GetWalletSystemStatus Obtiene el estado del sistema.
GetWalletAllCoinsInformation Obtiene información de monedas (disponibles para depósito y retirada) del usuario.
GetWalletDailyAccountSnapshot Type: "SPOT", "MARGIN", "FUTURES"
  • The query time period must be less then 30 days
  • Support query within the last one month only
  • If startTimeand endTime not sent, return records of the last 7 days by default
SetWalletDisableFastWithdrawSwitch This request will disable fastwithdraw switch under your account.
You need to enable "trade" option for the api key which requests this endpoint.
SetWalletEnableFastWithdrawSwitch 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.
WalletWithdraw

Envía una solicitud de retirada.

GetWalletDepositHistory Obtiene el historial de depósitos.
GetWalletWithdrawHistory Obtiene el historial de retiradas.
GetWalletDepositAddress Obtiene la dirección de depósito con la red.
GetWalletAccountStatus Obtiene el detalle del estado de la cuenta.
GetWalletAccountAPITradingStatus Obtiene el detalle del estado de trading de la api de la cuenta.
GetWalletDustLog Only return last 100 records
Only return records after 2020/12/01
GetWalletAssetsConvertedBNB
WalletDustTransfer

Convierte activos polvo a BNB.

Necesitas activar el permiso Spot & Margin Trading en la API Key que solicita este endpoint.

GetWalletAssetDividendRecord Consulta el registro de dividendos de activos.
GetWalletAssetDetail Obtiene detalles de los activos soportados en Binance.
GetWalletTradeFee Obtiene la comisión de trading
WalletUserUniversalTransfer

You need to enable Permits Universal Transfer option for the API Key which requests this endpoint.MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account

ENUM of Type:

  • 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
GetWalletQueryUserUniversalTransferHistory
  • fromSymbol must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
  • toSymbol must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
  • Support query within the last 6 months only
  • If startTimeand endTime not sent, return records of the last 7 days by default
GetWalletFundingWallet Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token
GetWalletUserAsset Obtiene los activos del usuario, solo para datos positivos.
GetWalletApiKeyPermission

Ejemplo 

Binance permite usar la Wallet API para enviar una solicitud de retirada; solo los siguientes parámetros son obligatorios:

oBinance := TsgcWSAPI_Binance.Create(nil);
oBinance.Binance.ApiKey := '<your api key>';
oBinance.Binance.ApiSecret := '<your api secret>';
ShowMessage(oBinance.REST_API.WalletWithdraw('BTC', '7213fea8e94b4a5593d507237e5a555b', 0.25)); 

A continuación tienes una demo de Binance compilada para Windows que muestra las principales características del cliente API. Selecciona la pestaña Wallet para probar los métodos Binance Wallet.