joeldg / bowhead

PHP trading bot framework
Apache License 2.0
801 stars 288 forks source link

Gdax Coinbase how to add api? #83

Open kilo42L opened 6 years ago

kilo42L commented 6 years ago

I cannot find any info on where to add the gdax api keys. I see its mentioned to put it in the .env file but i do not know the syntax. Does anyone have an example of this? Thanks

dpatelli commented 6 years ago

Just playing around tonight and figured the following out from the code CBURL=api-public.sandbox.gdax.com (or live) I am going to assume: CBKEY= api key CBSECRET=

Haven't been able to get: php artisan bowhead:websocket_coinbase or php artisan bowhead:gdax_scalper

to work. get error "A non well formed numeric value encountered" in line 505 in In Coinbase.php line 505

Sigh...

ghost commented 6 years ago

You need to add the following to the .env file.

CBKEY=YourKey CBSECRET=YourSecret CBPASSPHRASE=yourPassphrase CBURL=https://api-public.sandbox.gdax.com

API keys for sandboxes are separate from production, read the Sandbox section of the API docs here https://docs.gdax.com/?php#sandbox.

Once you get the Sandbox GDax setup (Website link in the docs posted above) add funds to your account or you will get another error. You can deposit fake money from Coinbase. Your Sandbox account will come with a Coinbase balance you can use to deposit from. You will NOT need to log into your real Coinbase account for anything to do with the sandbox.

Took me a few hours of playing to get all this so I hope it helps and saves you some time.