BlindTiger
New Member
- Joined
- Nov 27, 2020
- Messages
- 5
- Reaction score
- 0
Hi
Background:
I’ve written a small program in vba/excel/curl which runs a few API to the Valr server.
Problem:
The GET commands works great, but when I try to execute a POST command I receive an “invalid signature” message.
I have run the test data through my signing function and that checks out 100%.
(The GET commands also require signing, and this works 100%.)
I believe the problem is either:
-in the timestamp value in the signing function
-or the body included in the signing function.
Here is the code snippet I use:
curl --location --request POST "https://api.valr.com/v1/orders/limit" --Header "Content-Type: application/json" --Header "X-VALR-API-KEY:<<My_API_Key>>" --Header "X-VALR-SIGNATURE:<<My_API_Signature>>" --Header "X-VALR-TIMESTAMP:1606768830710" --data-raw '{"side":"BUY","quantity":0.1,"price":107200,"pair":"BTCZAR","postOnly":false,"customerOrderId":"BUY1234"}'
Request:
Any advice/tips to resolve the “invalid signature” issue.
Here is the link to the Valr API documentation:
docs.valr.com
Thank you
Background:
I’ve written a small program in vba/excel/curl which runs a few API to the Valr server.
Problem:
The GET commands works great, but when I try to execute a POST command I receive an “invalid signature” message.
I have run the test data through my signing function and that checks out 100%.
(The GET commands also require signing, and this works 100%.)
I believe the problem is either:
-in the timestamp value in the signing function
-or the body included in the signing function.
Here is the code snippet I use:
curl --location --request POST "https://api.valr.com/v1/orders/limit" --Header "Content-Type: application/json" --Header "X-VALR-API-KEY:<<My_API_Key>>" --Header "X-VALR-SIGNATURE:<<My_API_Signature>>" --Header "X-VALR-TIMESTAMP:1606768830710" --data-raw '{"side":"BUY","quantity":0.1,"price":107200,"pair":"BTCZAR","postOnly":false,"customerOrderId":"BUY1234"}'
Request:
Any advice/tips to resolve the “invalid signature” issue.
Here is the link to the Valr API documentation:
VALR API
VALR provides a powerful API consisting of REST endpoints for transactional operations and a complementary WebSocket service providing streaming market, order, and balance updates. Access to and use of the API is governed by our [Terms of...
Thank you