Hi @xccelerated99, first of all, we’d like to thank you for taking an interest in trying out the Coinbase APIs.
Now, before getting started with addressing your concerns, we’d like to clear some things out. Sign in with Coinbase and Coinbase Exchange/Pro are different services. They have different API counterparts. This means their API endpoints are different as well.
If you’d like to know more about their differences, you may choose to visit our documentation at https://docs.cloud.coinbase.com/
Now that that is out of the way, we noticed that you have a mixture of codes that are trying to do two separate things at once.
(1) From the majority of the code, we can see that you are trying to push a POST request on the
/orders endpoint. This endpoint belongs to the Coinbase Exchange/Pro API. And so, if this is what you are trying to do, you would need to update the
URL to the appropriate one. Since you are trying to call the Coinbase Exchange/Pro endpoint, you would need to change it to
(2) However, from the URL, it would imply that you are trying to push a GET request to the SIWC endpoint
/accounts. If this is the case, the rest of the code has to change especially if you are trying to push a
GET request to the said endpoint.
Finally, regarding timestamps, we noticed that you don’t have the
Math.floor() function on the timestamp part of your code. You may check the sample code in our documentation here.
Additionally, you may query the
time endpoint of SIWC (here) and compare the timestamp you are getting from your code.
Should you need further clarifications or queries about Coinbase Cloud APIs, feel free to reply to this thread.