You are doing a GET-request. You have to do a POST-request for private functions. From the documentation: All calls to the trading API are sent via HTTP POST to https://poloniex.com/tradingApi and must contain the following headers: Key - Your API key. Sign - The query's POST data signed by your key's "secret" according to the HMAC-SHA512 method. Additionally, all queries must include a "nonce" POST parameter. The nonce parameter is an integer which must always be greater than the previous nonce used. That means Key and Sign are sent inside the HTTP-Headers. The rest (command, nonce) are part of the body. Example request: 1. Let's say your API-Key is 123 and your API-Secret is 456. 2. The parameters for a request to returnBalances are command=returnBalances&nonce=1473087174. Please note: The nonce-parameter must be increased with every request. It is recommended to use the current timestamp. 3. You sign command=returnBalances&nonce=1473087174 using HMAC-SHA512 and your secret (456). The result will be put into the Sign-Header. 4. You put your API-Key (123) into the Key-Header. 5. You put the request parameters command=returnBalances&nonce=1473087174 into the request-body. 6. You send your request to https://poloniex.com/tradingApi using the POST-method and using SSL-encryption. Doing this over your browser will not work unless you use third-party-software/plugins which allow you to modify the request-headers, etc. |
|
|
|
|
|
|
chunk = curl_slist_append(chunk, sign.c_str());
Aren't all data types essentially raw bytes? |
What's the difference between raw bytes and ASCII strings? |
|
|
|
|
|
|
|
|