ftx-api-wrapper-python3 icon indicating copy to clipboard operation
ftx-api-wrapper-python3 copied to clipboard

validate arguments before they're sent to the API

Open zevaverbach opened this issue 4 years ago • 2 comments

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

zevaverbach avatar May 11 '21 11:05 zevaverbach

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 avatar May 11 '21 11:05 zevaverbach

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

zevaverbach avatar May 11 '21 12:05 zevaverbach