Effanuel / BitMEX-scaled-orders

Bitmex trading tool using REST API and Websocket
MIT License
33 stars 15 forks source link

Question about API keys setup. #19

Open Poilaucul opened 4 years ago

Poilaucul commented 4 years ago

Hello,

You need to set API keys before building the application. This means that .env file is of no use after npm build ? If so the private API key being "built into" the package could cause some privacy issues, that is if you plan to add containers as a deployment method down the road. Maybe add an option to force using the .env file?

BTW did that behavior change beetwen 1.7.1 and 1.7.2? It used to work with .env file being binded after npm build and now I get

Missing API Key

Regards,

Effanuel commented 4 years ago

v1.7.1 had .env file with keys in the /api directory. While this solution is good, you can't import files outside client/src directory if you have create-react-app application.

Basically moving the .env file to client/ directory solved this issue #5 .

I think this behaviour changed because of that.

Poilaucul commented 4 years ago

Placed .env file in /api and /client, executed clean and build, still got the "Missing API key" error.

Effanuel commented 3 years ago

Right now, I am implementing a way to setup the api keys through the applications itself.