Make decrypt method read api_key and api_secret from secrets.json #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The decrypt method on the Bittrex class was not actually reading
credentials from secrets.json. This commit adds that.
Justification:
I don't currently understand how the decrypt method is supposed
to be used. The way I understand this and would personally use
python-bittrex in production is as follows:
the static encrypt function or preferrably a dedicated secrets.json
creator). This could be done anywhere, for example offline.
machine such as a VPS server and start running a trading script
that utilizes python-bittrex as a dependency.
python-bittrex would call the decrypt method, I would provide the password
for decripting credentials from secrets.json and decrypt method then
carries on and the trading script can continue doing its thing.
the api_key and api_secret are not leaked.
In summary: this commit aims to make the above a reality.
Suggested further improvements: standalone secrets.json generator