1
good night, I’m having trouble getting a GET Method with Authentication to work I have read the Documentation and installed the SDK in the Intellij IDEA of an Exchange API and am having difficulty getting the code below to work
I know I should give some specific parameters like Key Api and Secret Key but what I don’t understand is this Method executeRequest(request) because the SDK I downloaded does not have this method... Can someone give me a clue how to solve this?
An API Documenting Feature that deals with this call: https://doc.novadax.com/pt-BR/#communication-with-a-api
*Authentication Method Steps to authenticate a GET request
- Query string is queryStr = "name=joao&cpf=123456&Birthday=2017-08-01"
- Encode the query string and sort parameters by following the ASCII order. Sort(urlencode(queryStr)) // Birthday=2017-08-01&Cpf=123456&name=Joao
- Transform the string with format {request method} n{request path} n{string to be encoded} n{timestamp} signStr = GET n/v1/Orders/get nbirthday=2017-08-01&Cpf=123456&name=Joao n1564988445199
- Use the generated string in step 3 and its "Secretkey" to authenticate your request Sign = hmac_sha256(signStr,Secretkey)
- Add Accesskey, Signature and Timestamp to the request header (header). request.header.add("X-Nova-Access-Key",Accesskey) request.header.add("X-Nova-Signature",Sign) request.header.add("X-Nova-Timestamp",Timestamp)*
Please replace the image with text code, this in the rules of the site not to use code as image.
– Pedro Sanção