Find the best option to buy
- Robin Stocks v1.2.1
- python-dotenv
- create a
.env
file in the workspace and define the environment variables
ROBIN_USERNAME=
ROBIN_PASSWORD=
- run the server
For Linux and Mac:
$ export FLASK_APP=flaskr
$ export FLASK_ENV=development
$ flask run
For Windows cmd, use set instead of export:
> set FLASK_APP=flaskr
> set FLASK_ENV=development
> flask run
For Windows PowerShell, use $env: instead of export:
> $env:PYTHONPATH=pwd
> $env:FLASK_APP = "flaskr"
> $env:FLASK_ENV = "development"
> flask run
- Test API
Change the expirationDate to a future Friday
curl --location --request POST 'http://127.0.0.1:5000/robin/calc' \
--form 'expirationDate=2020-08-14' \
--form 'optionType=call' \
--form 'company=fb'