Okay, so, if you want to know how to change money from one account to another (contract, coin, wallet), is there an example code?

Author: Number of investments 01, Created: 2018-09-27 05:55:53, Updated:

Okay, so, if you want to know how to change money from one account to another (contract, coin, wallet), is there an example code?

The settings of the sub-accounts vary from exchange to exchange.


More

martinashesCan the transfer of coins from the account to the contract account be done through the API?

Number of investments 01Thank you so much!

The Little DreamAs long as the exchange provides an API interface for the exchange, you can call these interfaces directly with exchange.IO. The following pages link to the digital currency trading library template for related code: What's up? $.withdraw = function ((e, currency, address, amount, fee, password) { var withdraw_id = null; the value of the variable is zero; currency = currency.toLowerCase switch (e.GetName)) { The case "OKCoin_EN": ret = e.IO (("api", "POST", "/api/v1/withdraw.do", "symbol="+currency.toLowerCase() +"_usd&chargefee=" + fee + "&trade_pwd=" + password + "&withdraw_address=" + address + "&withdraw_amount=" + amount); If (ret && typeof(ret.withdraw_id)!== 'undefined') { withdraw_id = ret.withdraw_id; } else { This is a list of all the different ways GetLastError is credited in the database. If (err && err.indexOf (('10031')!== -1) { Log (("OKCoin_EN requires 6 network confirmations to be able to withdraw"); I'm not sure. I'm not sure. I'm going to break. Case "Huobi": if (currency == "bch") { currency = "bcc" I'm not sure. ret = e.IO (("api", "POST", "/v1/dw/withdraw-virtual/create", "currency="+currency+" & fee=" + fee + "& address=" + address + "& amount=" + amount); If (ret && typeof(ret.withdraw_id)!== 'undefined') { withdraw_id = ret.data; I'm not sure. I'm going to break. case "Bithumb": ret = e.IO (("api", "POST", "/trade/btc_withdrawal", "currency="+currency.toUpperCase() +"&address=" + address + "&units=" + amount); if (ret && parseInt ((ret.status) == 0) { withdraw_id = 9999; I'm not sure. I'm going to break. The case "GateIO": ret = e.IO (("api", "POST", "/api2/1/private/withdraw", "currency="+currency+" & address=" + address + "& amount=" + amount); if (ret && parseInt ((ret.code) == 0) { withdraw_id = 9999; I'm not sure. I'm going to break. case "ZB": ret = e.IO (("api", "POST", "/api/withdraw", "method=withdraw&itransfer=0¤cy="+currency+"&receiveAddr=" + address + "&amount=" + amount+"&fees="+fee+"&safePwd="+password); if (ret && parseInt ((ret.code) == 0) { withdraw_id = ret.id; I'm not sure. I'm going to break. case "Bitfinex": var cMap = { "btc": "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin", "bitcoin" "ltc": "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin", "Litecoin" and "Litecoin" are also included. "eth": "ethereum", "etc": "ethereum c", "zec": "zcash", "xmr": "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero", "Monero" and "Monero" are also used. Omni: "mastercoin" is the name of the game. "usd": "wire", "Dash": "Dash", which means "Dash". "xrp": "ripple", and "xrp": "ripple", and "xrp": "eos": "eos"}; if (typeof(cMap[currency]) == 'undefined') { throw "bitfinex not support " + currency; I'm not sure. var withdraw_type = cMap[currency]; ret = e.IO (("api", "POST", "/v1/withdraw", "withdraw_type=" + withdraw_type + "&walletselected=exchange&address=" + address + "&amount='" + amount + "'"); if (ret && ret.length == 1 && typeof(ret[0].withdrawal_id)!== 'undefined') { withdraw_id = ret[0].withdrawal_id; I'm not sure. I'm going to break. The case "Poloniex": var ext = ""; If (currency == 'xrp') { //ext = '&paymentId=' + PXRPLabel; I'm not sure. if (currency.toLowerCase() == 'bts' && address.indexOf('_') == -1) { address = "poloniexwallet_" + address; I'm not sure. ret = e.IO (("api", "POST", "withdraw", "amount=" + amount + "¤cy="+currency.toUpperCase() +"&address=" + address+ext); If (ret && ret.response.indexOf('With')!== -1) { withdraw_id = 9999; I'm not sure. break The case "Bittrex": ret = e.IO (("api", "GET", "/api/v1.1/account/withdraw", "quantity=" + amount + "¤cy="+currency.toUpperCase() +"&address=" + address); If (ret && ret.success) { withdraw_id = ret.result.uuid; I'm not sure. break The case "Binance": ret = e.IO (("api", "POST", "/wapi/v1/withdraw.html", "amount=" + amount + "&asset=" + currency + "&address=" + address"); if (ret && ret.success) { withdraw_id = 9999; I'm not sure. break case "OKEX": ret = e.IO (("api", "POST", "/api/v1/withdraw.do", "target=address&withdraw_amount=" + amount + "&symbol="+currency+"_usd&withdraw_address=" + address+"&chargefee="+fee+"&trade_pwd="+password); If (ret && ret.result) { is the withdraw_id = ret.withdraw_id; I'm not sure. break by default: throw "unsupported operation"; I'm not sure. return {info: ret, withdraw_id: withdraw_id} I'm not sure. What's up?