krijnsent / crypto_vba

An Excel/VBA project to communicate with various cryptocurrency exchanges APIs
MIT License
155 stars 54 forks source link

suggest for bittrex #59

Closed jkearins closed 3 years ago

jkearins commented 3 years ago

1) Amazing work 2) I suggest following changing for Bittrex:

url = TradeApiSite & Method
postdata = ""
If ReqType = "DELETE" Then
    For Each itm In ParamDict
        url = url & "/" & ParamDict(itm)
    Next itm
ElseIf ReqType = "GET" And Not ParamDict Is Nothing Then
    url = url & "/?" & DictToString(ParamDict, "URLENC")
ElseIf ReqType = "POST" Then
    If Not ParamDict Is Nothing Then
        url = url & "/?" & DictToString(ParamDict, "URLENC")
    End If
    postdata = DictToString(ParamDict, "JSON")
End If
krijnsent commented 3 years ago

Thanks for that feedback, what commands fail with my current code? I'd like to add them to my tests.

jkearins commented 3 years ago

I use python to access Bittrex, and I experience Unauthorized error if there is no slash before "?". If your tests are ok then nothing to change.