You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the API of kraken evolves (new crypto-currencies , response structure etc ... )
It would be helpful for users to be able to define their own response structs.
Currently these are "hidden".
For example in Balance call
Someone cannot get the balance for 'LINK' for example, because the BalanceResponse struct does not parse this field from the json response.
This method could be more generic, in order to accommodate current (i.e. for LINK) and future needs, without the need for the client to define ALL currencies upfront.
Would this be an interesting enhancement ? I could look into refactoring corresponding methods in that direction.
And we could always leave the current struct for default use-cases.
What do you think ?
The text was updated successfully, but these errors were encountered:
thanks for the reply @Glavic . That would also be an option, for sure.
I personally think that the above is more generic, and there is no need for adjustments on every new currency.
As the API of kraken evolves (new crypto-currencies , response structure etc ... )
It would be helpful for users to be able to define their own response structs.
Currently these are "hidden".
For example in Balance call
Someone cannot get the balance for 'LINK' for example, because the BalanceResponse struct does not parse this field from the json response.
This method could be more generic, in order to accommodate current (i.e. for LINK) and future needs, without the need for the client to define ALL currencies upfront.
An possible adjustment could be the following :
I 've made some tests, and it seems to work nicely for the this example of client user code.
and its used as ...
Would this be an interesting enhancement ? I could look into refactoring corresponding methods in that direction.
And we could always leave the current struct for default use-cases.
What do you think ?
The text was updated successfully, but these errors were encountered: