Yobit api says that I have to specify the pair before getting data.
https://yobit.net/en/api/
The problem is that there are so many pairs in yobit. That means I got to call the api several time to get all the pair.
There has to be better way. Is it?
This is the current code
Protected Overrides Function getJson(method As String, otherParameters As Tuple(Of String, String)()) As String
Dim nonce = exchanges.getNonce().ToString
Dim content = hashObject("", nonce, "method=" + method + "&nonce=")
For Each param In otherParameters
content += "&" + param.Item1 + "=" + param.Item2
Next
'content = "method=ActiveOrders&nonce=34697114&pair=html5_btc"
Dim sighash = computeSig(content)
Dim result = CookieAwareWebClient.downloadString1("https://yobit.net/tapi/", content, {Tuple.Create("Key", _apiKey), Tuple.Create("Sign", sighash), Tuple.Create("Content-Type", "application/x-www-form-urlencoded")})
Return result
End Function
Sort of work. It's just that I have a hard time understanding why I should call some API 1000 times to get all orders for my account?
You can reduce your requests by calling the getInfo endpoint first. Compare the balances in funds and funds_incl_orders to find currencies with active orders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With