Get Wallet list with CoinBase REST API
I want to create a http request for communicating with coinbase with private API keys. I cannot use a pre-existent library because my programming language is not supported. I need to create the HTTP request.
For example, I want to retrieve the list of wallets.
The headers of the HTTP request should be:
- CB-ACCESS-KEY: my private key. It's ok;
- CB-ACCESS-TIMESTAMP: Actual epoch time in seconds. It's ok;
- CB-VERSION: Date of the version used. It's ok;
I've a problem with the header CB-ACCESS-SIGN. According to the documentation:
The CB-ACCESS-SIGN header is generated by creating a sha256 HMAC using the secret key on the prehash string timestamp + method + requestPath + body (where + represents string concatenation). The timestamp value is the same as the CB-ACCESS-TIMESTAMP header.
I can create the HMAC hash given a string, but I don't understand what the string should be. I know what timestamp is, but I don't know what I should use for other fields of the string.
What should I put in this header in order to have a valid request? And how I should fix the url?
http://ift.tt/2CcMuS3
Comments
Post a Comment