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

validate arguments before they're sent to the API #8

Open
zevaverbach opened this issue May 11, 2021 · 2 comments
Open

validate arguments before they're sent to the API #8

zevaverbach opened this issue May 11, 2021 · 2 comments
Labels
TODO TODO

Comments

@zevaverbach
Copy link
Contributor

Within reason. For example, the orderbook limit of > 20 and <= 100

@LeeChunHao2000 LeeChunHao2000 added the TODO TODO label May 11, 2021
@zevaverbach
Copy link
Contributor Author

To keep things succinct it might be good to use Pydantic for this. There might be some merit in creating a script to check the Pydantic models against the API periodically in case things change.

E.g. currently the valid options for resolution in markets/{pair}/candles are 15, 60, 300, 900, 3600, 14400, 86400, but you could imagine this changing at some point. On every release/merge to master we could kick off a script via Github Actions to double check the Pydantic models against the API.

@zevaverbach
Copy link
Contributor Author

I've started on this, but there are probably some left. (get_orderbook, get_k_line are done)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TODO TODO
Projects
None yet
Development

No branches or pull requests

2 participants