pykrakenapi
pykrakenapi copied to clipboard
return a dict for get_trade_volume()
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.