BinanceDeposit: Deposit Management
BinanceDeposit: Deposit Management
Details
Provides methods for retrieving deposit addresses and deposit history on Binance. Inherits from BinanceBase.
Purpose and Scope
Deposit Address: Retrieve deposit addresses for any supported coin and network.
Deposit History: Query deposit transaction records with status tracking, timestamps, and on-chain transaction IDs.
Usage
All methods require authentication (valid API key and secret).
These are wallet (/sapi/) endpoints, not spot (/api/) endpoints.
Deposit Status Codes
0: Pending1: Success (confirmed and credited)6: Credited but cannot withdraw7: Wrong deposit8: Waiting user confirm
Super class
binance::BinanceBase -> BinanceDeposit
Methods
Inherited methods
Method get_deposit_address()
Get Deposit Address
Retrieves the deposit address for a specific coin. If network is not
specified, returns the address for the coin's default network.
Official Documentation
Binance Deposit Address Verified: 2026-03-10
Automated Trading Usage
Address Lookup: Retrieve deposit addresses to share with external systems or users.
Multi-Network Support: Specify
network(e.g.,"ETH","TRX","BSC") to get the address on the correct chain.Pre-Flight Check: Verify the deposit address exists before initiating an external transfer.
Arguments
coinCharacter; coin symbol (e.g.,
"BTC","ETH","USDT").networkCharacter or NULL; blockchain network (e.g.,
"ETH","TRX","BSC"). If NULL, uses the coin's default network.recvWindowInteger or NULL; max 60000.
Returns
data.table (or promise<data.table> if async = TRUE) with columns:
address(character): The deposit wallet address.coin(character): Coin symbol (e.g.,"BTC").tag(character): Address tag/memo (empty string if not applicable).url(character): Blockchain explorer URL for the address.
Examples
\dontrun{
deposit <- BinanceDeposit$new()
# Get BTC deposit address (default network)
btc <- deposit$get_deposit_address(coin = "BTC")
print(btc$address)
# Get USDT deposit address on TRC20
usdt <- deposit$get_deposit_address(coin = "USDT", network = "TRX")
print(usdt[, .(address, coin, tag)])
}
Method get_deposit_history()
Get Deposit History
Retrieves deposit transaction history with optional filtering by coin,
status, and time range. Converts insertTime timestamps to POSIXct.
Official Documentation
Binance Deposit History Verified: 2026-03-10
Automated Trading Usage
Deposit Monitoring: Poll for status
1(success) deposits to trigger trading logic when funds arrive.Reconciliation: Match
tx_idagainst on-chain transaction hashes for audit.Time-Windowed Queries: Use
startTime/endTimeto retrieve deposits within a specific period. Max range is 90 days.
JSON Response
[
{
"id": "769800519366885376",
"amount": "0.001",
"coin": "BNB",
"network": "BNB",
"status": 1,
"address": "bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23",
"addressTag": "101764890",
"txId": "98A3EA560C6B3336D348B6C83F0F95ECE4F1F5919E94BD006E5BF3BF264FACFC",
"insertTime": 1661493146000,
"completeTime": 1661493146000,
"transferType": 0,
"confirmTimes": "1/1",
"unlockConfirm": 0,
"walletType": 0
}
]Usage
BinanceDeposit$get_deposit_history(
coin = NULL,
status = NULL,
startTime = NULL,
endTime = NULL,
offset = NULL,
limit = NULL,
txId = NULL,
recvWindow = NULL
)Arguments
coinCharacter or NULL; filter by coin (e.g.,
"BTC","USDT").statusInteger or NULL; filter by status:
0(pending),1(success),6(credited),7(wrong),8(waiting confirm).startTimeInteger or NULL; start timestamp in milliseconds.
endTimeInteger or NULL; end timestamp in milliseconds.
offsetInteger or NULL; pagination offset (default 0).
limitInteger or NULL; max results (default 1000, max 1000).
txIdCharacter or NULL; filter by transaction ID.
recvWindowInteger or NULL; max 60000.
Returns
data.table (or promise<data.table> if async = TRUE) with columns:
id(character): Unique deposit identifier.amount(character): Deposit amount.coin(character): Deposited coin symbol.network(character): Blockchain network used.status(integer): Deposit status code (0=pending, 1=success, 6=credited).address(character): Deposit address.address_tag(character): Address tag/memo.tx_id(character): On-chain transaction hash.transfer_type(integer): 0=external, 1=internal.confirm_times(character): Confirmation progress (e.g.,"1/1").unlock_confirm(integer): Confirmations needed to unlock.wallet_type(integer): 0=spot, 1=funding.insert_time(POSIXct): Deposit time converted frominsertTime.complete_time(POSIXct): Completion time converted fromcompleteTime.
Examples
\dontrun{
deposit <- BinanceDeposit$new()
# Get all successful BTC deposits
history <- deposit$get_deposit_history(coin = "BTC", status = 1)
print(history[, .(amount, coin, status, insert_time)])
# Get deposits from the last 24 hours
now_ms <- as.integer(as.numeric(Sys.time()) * 1000)
recent <- deposit$get_deposit_history(
startTime = now_ms - 86400000L,
endTime = now_ms
)
}
Examples
if (FALSE) { # \dontrun{
# Synchronous
deposit <- BinanceDeposit$new()
addr <- deposit$get_deposit_address(coin = "BTC")
print(addr)
# Asynchronous
deposit_async <- BinanceDeposit$new(async = TRUE)
main <- coro::async(function() {
addr <- await(deposit_async$get_deposit_address(coin = "BTC"))
print(addr)
})
main()
while (!later::loop_empty()) later::run_now()
} # }
## ------------------------------------------------
## Method `BinanceDeposit$get_deposit_address`
## ------------------------------------------------
if (FALSE) { # \dontrun{
deposit <- BinanceDeposit$new()
# Get BTC deposit address (default network)
btc <- deposit$get_deposit_address(coin = "BTC")
print(btc$address)
# Get USDT deposit address on TRC20
usdt <- deposit$get_deposit_address(coin = "USDT", network = "TRX")
print(usdt[, .(address, coin, tag)])
} # }
## ------------------------------------------------
## Method `BinanceDeposit$get_deposit_history`
## ------------------------------------------------
if (FALSE) { # \dontrun{
deposit <- BinanceDeposit$new()
# Get all successful BTC deposits
history <- deposit$get_deposit_history(coin = "BTC", status = 1)
print(history[, .(amount, coin, status, insert_time)])
# Get deposits from the last 24 hours
now_ms <- as.integer(as.numeric(Sys.time()) * 1000)
recent <- deposit$get_deposit_history(
startTime = now_ms - 86400000L,
endTime = now_ms
)
} # }