JKorf / HTX.Net

A C# .netstandard client library for the Huobi REST and Websocket Spot and Swap API focusing on clear usage and models
https://jkorf.github.io/HTX.Net/
MIT License
73 stars 53 forks source link

validation-constraints-required: Field is missing: account-id. #116

Closed UncleJey closed 1 month ago

UncleJey commented 1 month ago

Hi!

        //init:
        HTXRestClient restClient = new HTXRestClient();
        restClient.SpotApi.SetApiCredentials(new ApiCredentials(key, secret));
        // this working fine

        var user = await restClient.SpotApi.Account.GetUserIdAsync();
        Debug.Log(user.Data);
       // this returns valid user id

        var acc = await restClient.SpotApi.Account.GetAccountsAsync();
        var account = acc.Data.First();
        Debug.Log($"account id:{account.Id} status: {account.Status} type:{account.Type}");
       // returns account id:XXXXXXXX status: Working type:Spot

          var blc = await restClient.SpotApi.Account.GetAccountHistoryAsync(account.Id);
       // blc.Data.Error.Message this returns error
      **validation-constraints-required: Field is missing: account-id.**

why?

UncleJey commented 1 month ago

@JKorf can you take a look?

UncleJey commented 1 month ago

fized in #117