danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 738 forks source link

Add class constants #366

Closed lordkebab closed 5 years ago

lordkebab commented 5 years ago

Idea to add parameter constants to avoid typos when calling functions.

Example:

class cbpro:
    ORDER_LIMIT = 'limit'
    ...

Then when calling the buy or sell method:

auth_client.buy(order_type=cbpro.LIMIT)
noah222 commented 5 years ago

A = auth_client.buy(order_type="limit") is less clunky in my opinion. What kind of typos are there with such sort names?

lordkebab commented 5 years ago

Looking through the API, they are all pretty short. Probably no need for it.