public void InnerTransfer_Test()
        {
            var symbol   = "BTC";
            var balances = _service.GetBalances(symbol).Result;
            var fromId   = balances.Where(b => b.Type == "main").Select(b => b.Id).FirstOrDefault();
            var amount   = balances.Where(b => b.Type == "main").Select(b => b.Total).FirstOrDefault();
            var toId     = balances.Where(b => b.Type == "trade").Select(b => b.Id).FirstOrDefault();

            var orderId = _service.InnerTransfer(fromId, toId, amount).Result;

            Assert.NotNull(orderId);
        }
Esempio n. 2
0
        /// <summary>
        /// Transfer funds between accounts
        /// </summary>
        /// <param name="fromId">Account Id Payer</param>
        /// <param name="toId">Account Id Receiver</param>
        /// <param name="amount">Amount to transfer</param>
        /// <returns>Id of funds transfer order</returns>
        public static async Task <string> InnerTransfer(this IKuCoinDotNet service, string fromId, string toId, decimal amount)
        {
            var clientOid = Guid.NewGuid().ToString().Replace("-", "");

            return(await service.InnerTransfer(clientOid, fromId, toId, amount));
        }