Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to get all orders at yobit?

Tags:

vba

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?

like image 860
user4951 Avatar asked Dec 31 '25 10:12

user4951


1 Answers

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.

like image 176
user3522775 Avatar answered Jan 05 '26 21:01

user3522775



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!