Thank you for the replies!
I have reached out to the HitBTC staff and they are looking it over. Forum responses are much more prompt and numerous, however
I do understand that the trading API needs the signature, I'm just not sure I'm providing it properly... Here is a snippet that I sent them, regarding a call to the balance method in the trading API.
First, "url" is being generated as:
http://demo-api.hitbtc.com/api/1/trading/balance?nonce=1406121935&apikey=MYAPIKEYThis is passed into the mac/signature generation and added to the HttpGet header:
key = new SecretKeySpec( SECRET.getBytes( "UTF-8" ), "HmacSHA512" );
// Create a new mac
mac = Mac.getInstance( "HmacSHA512" );
// Init mac with key.
mac.init( key );
headers.add( new BasicHeader( "X-Signature", Hex.encodeHexString( mac.doFinal( new String( url ).toLowerCase( ).getBytes( "UTF-8" ) ) ) ) );
// Now do the actual request
HttpClient client = HttpClientBuilder.create( ).build( );
HttpPost post = null;
HttpGet get = null;
HttpResponse response = null;
if ( "POST".equalsIgnoreCase( requestType ) ) {
post = new HttpPost( new URI( url.toLowerCase( ) ) );
post.setEntity( new UrlEncodedFormEntity( urlParameters ) );
post.setHeaders( headers.toArray( new Header[ headers.size( ) ] ) );
response = client.execute( post );
} else if ( "GET".equalsIgnoreCase( requestType ) ) {
get = new HttpGet( new URI( url.toLowerCase( ) ) );
get.setHeaders( headers.toArray( new Header[ headers.size( ) ] ) );
response = client.execute( get );