dominiktraxl / pykrakenapi

A python implementation of the Kraken API.
GNU Lesser General Public License v3.0
225 stars 53 forks source link

return a dict for get_trade_volume() #65

Open jonnymaserati opened 2 years ago

jonnymaserati commented 2 years ago

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.