Posts

Showing posts with the label GDAX Java Bad Request

GDAX Java Bad Request

GDAX Java Bad Request Trying to request private data on GDAX but keep getting bad request. Cannot figure out what I am doing wrong. Please help. private static JsonObject getAuthenticatedData() { try { String accessSign = getAccess(); System.setProperty("http.agent", "Java Client"); URL url = new URL("http://ift.tt/2jaFBMq"); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); con.setRequestProperty("CB-ACCESS-KEY", "accesskey"); con.setRequestProperty("CB-ACCESS-SIGN", accessSign); con.setRequestProperty("CB-ACCESS-TIMESTAMP", ""+System.currentTimeMillis() / 1000L); con.setRequestProperty("CB-ACCESS-PASSPHRASE", "passphrase"); con.setRequestProperty("Content-Type", "application/json")...