webcerebrium / java-binance-api

Java Binance API Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Where do i put the api key and secret?

ryanbishop12 opened this issue · comments

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

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.

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.

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

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

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

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