Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Get Binance Withdraw History? #78

Open
birth23 opened this issue Jun 8, 2021 · 3 comments
Open

How to Get Binance Withdraw History? #78

birth23 opened this issue Jun 8, 2021 · 3 comments
Labels
testing needed Please help by testing the code/solution

Comments

@birth23
Copy link

birth23 commented Jun 8, 2021

I am trying to get the withdraw history. So I modified the TradeAPISite on the Binance module to GET /sapi/v1/capital/withdraw/history I also tried /wapi/v3/withdrawHistory.html but I get illegal characters error. Do you know how to do this?

@krijnsent
Copy link
Owner

Hi there,
I found some time to create an update. Could you check the Binance code? I added an example for your question. If that works, please do close this issue.
Koen

@krijnsent krijnsent added the testing needed Please help by testing the code/solution label Jun 29, 2021
@birth23
Copy link
Author

birth23 commented Jun 30, 2021

I tried the following on the Binance sheet and the result is an error:
response_txt -1100 Illegal characters found in a parameter.

Sub GetMyBinanceData2()

Dim JsonResponse As String
Dim Json As Object
Dim JsonRes As Dictionary
Dim Apikey As String
Dim secretKey As String

Set Sht = Worksheets("Binance")
Set Tbl4 = Sht.ListObjects("Tbl_Binance_Balances")
Apikey = Sht.Range("apikey_binance").Value
secretKey = Sht.Range("secretkey_binance").Value
Dim Cred As New Dictionary
Cred.Add "apiKey", Apikey
Cred.Add "secretKey", secretKey

Dim Params As New Dictionary
Params.Add "timestamp", GetBinanceTime()
JsonResponse = PrivateBinance("sapi/v1/capital/withdraw/history", "GET", Cred, Params)

Set Json = JsonConverter.ParseJson(JsonResponse)
ResArr = JsonToArray(Json)
Tbl = ArrayTable(ResArr, False)

If Tbl4.DataBodyRange.Rows.Count > 1 Then
    Tbl4.DataBodyRange.Offset(1, 0).Resize(Tbl4.DataBodyRange.Rows.Count - 1, Tbl4.DataBodyRange.Columns.Count).Rows.Delete
End If
Tbl4.DataBodyRange.Resize(UBound(Tbl, 2), UBound(Tbl, 1)) = TransposeArr(Tbl)

End Sub

@krijnsent
Copy link
Owner

Your code does work on my computer with my credentials. The error message suggests that either your credentials are wrong or the timestamp has some weird outcome. So on the line JsonResponse = .... go step by step through the code and see what gets added to the GET request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing needed Please help by testing the code/solution
Projects
None yet
Development

No branches or pull requests

2 participants