krijnsent / crypto_vba

An Excel/VBA project to communicate with various cryptocurrency exchanges APIs
MIT License
155 stars 54 forks source link

What about Coinbase or GDAX? #7

Closed theMoe closed 5 years ago

theMoe commented 6 years ago

Could you please add Coinbase and GDAX?

https://developers.coinbase.com/

https://docs.gdax.com/

krijnsent commented 6 years ago

Just created an account with Coinbase, although they seem to have a hard time recognizing my passport/drivers license. Will work on it when that gets sorted out.

krijnsent commented 6 years ago

Added the public API. Have been trying a couple of times to upload my drivers license and passport, but to no avail. Their approval system kind of sucks and they state that it's not worth contacting them about it as they are too busy with all the new customers.

krijnsent commented 6 years ago

Added the private API too, please check and close this issue if it works.

theMoe commented 6 years ago

@krijnsent Thanks for your work! I will check it out. Have you looked at the API of Coinbase? Or can I reach coinbase accounts via GDAX API?

krijnsent commented 6 years ago

@theMoe Nope, haven't looked at Coinbase yet, it looked like GDAX was their trading platform. They seem somehow connected, but not really. Will dive into it some day.

fatkidz4 commented 6 years ago

Hi krijnsent, Excellent work on this project, you deserve coffee and a beer. I am having trouble posting an order to GDAX. I using: body = {"price": "1000.00","size": "0.01","side": "buy","product_id": "BTC-USD"}

Excerpt from Function PrivateGDAX: SignMsg = NonceUnique & UCase(HTTPMethod) & "/" & Method & body

Any ideas what I am doing wrong?

UPDATE: Figured out what i needed. Excerpt from the template Function PrivateGDAX: ' Instantiate a WinHttpRequest object and open it Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") objHTTP.Open UCase(HTTPMethod), TradeApiSite & "/" & Method, False objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" objHTTP.setRequestHeader "CB-ACCESS-KEY", apikey objHTTP.setRequestHeader "CB-ACCESS-SIGN", APIsign objHTTP.setRequestHeader "CB-ACCESS-TIMESTAMP", NonceUnique objHTTP.setRequestHeader "CB-ACCESS-PASSPHRASE", passphrase objHTTP.Send (postdata)

Revised to: ' Instantiate a WinHttpRequest object and open it Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1") objHTTP.Open UCase(HTTPMethod), TradeApiSite & "/" & Method, False objHTTP.setRequestHeader "Content-Type", "application/json" objHTTP.setRequestHeader "CB-ACCESS-KEY", apikey objHTTP.setRequestHeader "CB-ACCESS-SIGN", APIsign objHTTP.setRequestHeader "CB-ACCESS-TIMESTAMP", NonceUnique objHTTP.setRequestHeader "CB-ACCESS-PASSPHRASE", passphrase objHTTP.Send body

krijnsent commented 5 years ago

Hi @fatkidz4 and @theMoe Can you test the new API? I built both a Coinbase and CoinbasePro/GDAX version and my tests are successfull. Please check and close this issue if it works for you too.

krijnsent commented 5 years ago

Has been over a month, closing issue