Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return a dict for get_trade_volume() #65

Open
jonnymaserati opened this issue Jan 13, 2022 · 0 comments
Open

return a dict for get_trade_volume() #65

jonnymaserati opened this issue Jan 13, 2022 · 0 comments

Comments

@jonnymaserati
Copy link
Collaborator

First, great wrapper for the kraken API, thank you!

This is a suggestion, not an issue... I think it'd be nicer to return a dict from the get_trade_volume method since the result would then not require referencing the API or the docstring to figure out what the values are. I get that you're converting the fees to a DataFrame (although for a single row this seems a bit overkill?) but I don't get the logic of returning the results as a list that needs indexing?

So instead maybe:

return {
    'currency': currency,
    'volume': volume,
    `fees`: fees,
    'fees_maker': fees_maker
}

I think I'd actually be okay with just returning res['result'], although converting the fees data to float is nice.

@jonnymaserati jonnymaserati changed the title Return a dict for get_trade_volume() return a dict for get_trade_volume() Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant