webcerebrium / java-binance-api

Java Binance API Client
MIT License
74 stars 40 forks source link

Where do i put the api key and secret? #23

Closed ryanbishop12 closed 6 years ago

ryanbishop12 commented 6 years ago

Where do i put the api key and secret used to encrypt the signature needed to place an order?

ryanbishop12 commented 6 years ago

I think i figured out i need to put them in the system environment variables but now i get this error "Missing BINANCE_API_KEY" even though i put them in the environment variables.

wcrbrm commented 6 years ago

you actually have 3 options, 1) you can put environment variables with export or set command (depending on your OS) 2) you can put VM arguments, and call it like -DBINANCE_API_KEY=... -DBINANCE_SECRET_KEY=... 3) you can hard code application.properties file under your resource folder.

ryanbishop12 commented 6 years ago

the key and secret are in the environment variables when i run set but it still wont work the same error

ryanbishop12 commented 6 years ago

I also put it in the application.properties with still no luck

ryanbishop12 commented 6 years ago

it says BINANCE_API_SECRET in the read me but it should be BINANCE_SECRET_KEY

ryanbishop12 commented 6 years ago

i fixed it, i had the application.properties under the wrong folder