ExchangeSharp/API/Exchanges/Binance/ExchangeBinanceAPI.cs
/// <summary>
/// Gets the address to deposit to and applicable details.
/// </summary>
/// <param name="currency">Currency to get address for</param>
/// <param name="forceRegenerate">(ignored) Binance does not provide the ability to generate new addresses</param>
/// <returns>
/// Deposit address details (including tag if applicable, such as XRP)
/// </returns>
Gets the address to deposit to and applicable details.
Gets the address to deposit to and applicable details .
protected override async Task<ExchangeDepositDetails> OnGetDepositAddressAsync(string currency, bool forceRegenerate = false)
        {
            Dictionary<string, object> payload = await GetNoncePayloadAsync();
            payload["asset"] = currency;
            JToken response = await MakeJsonRequestAsync<JToken>("/depositAddress.html", WithdrawalUrlPrivate, payload);
            ExchangeDepositDetails depositDetails = new ExchangeDepositDetails
            {
                Currency = response["asset"].ToStringInvariant(),
                Address = response["address"].ToStringInvariant(),
                AddressTag = response["addressTag"].ToStringInvariant()
            };
            return depositDetails;
        }
protected override async Task < ExchangeDepositDetails > OnGetDepositAddressAsync ( string currency , bool forceRegenerate = false ) { Dictionary < string , object > payload = await GetNoncePayloadAsync ( ) ; payload [ " " ] = currency ; JToken response = await MakeJsonRequestAsync < JToken > ( " " , WithdrawalUrlPrivate , payload ) ; ExchangeDepositDetails depositDetails = new ExchangeDepositDetails { Currency = response [ " " ] . ToStringInvariant ( ) , Address = response [ " " ] . ToStringInvariant ( ) , AddressTag = response [ " " ] . ToStringInvariant ( ) } ; return depositDetails ; }
Gets the address to deposit to and applicable details.
Gets the address to deposit to and applicable details .
/*
            * TODO: Binance does not offer a "regenerate" option in the API, but a second IOTA deposit to the same address will not be credited
            * How does Binance handle GetDepositAddress for IOTA after it's been used once?
            * Need to test calling this API after depositing IOTA.
            */
Deposit address details (including tag if applicable, such as XRP)
Deposit address details ( including tag if applicable such as XRP )
currency
string
Currency to get address for
Currency to get address for
forceRegenerate
bool
(ignored) Binance does not provide the ability to generate new addresses
( ignored ) Binance does not provide the ability to generate new addresses