/// <summary> /// Withdraw from spot trading account to an external address. /// <para>long data // Transfer id</para> /// <para>string errorCode</para> /// <para>string errorMessage</para> /// </summary> /// <param name="request"></param> /// <returns>WithdrawCurrencyResponse</returns> public void WithdrawCurrencyAsync(WithdrawRequest request, System.Action <long, string, string> action = null) { string url = _urlBuilder.Build(POST_METHOD, "/v1/dw/withdraw/api/create"); HttpRequest.PostAsync <WithdrawCurrencyResponse>(url, request.ToJson()).ContinueWith((task) => { if (action != null) { var res = task.Result; action(res.data, res.errorCode, res.errorMessage); } }); }
/// <summary> /// Withdraw from spot trading account to an external address. /// </summary> /// <param name="request"></param> /// <returns>WithdrawCurrencyResponse</returns> public async Task <WithdrawCurrencyResponse> WithdrawCurrencyAsync(WithdrawRequest request) { string url = _urlBuilder.Build(POST_METHOD, "/v1/dw/withdraw/api/create"); return(await HttpRequest.PostAsync <WithdrawCurrencyResponse>(url, request.ToJson())); }