JoshJancula / coinbase-advanced-node

Coinbase API written in TypeScript and covered by tests.
https://bennycode.com/coinbase-pro-node
MIT License
11 stars 4 forks source link

Addresses endpoint uses v3 instead of v2 #11

Closed yamen closed 10 months ago

yamen commented 10 months ago

For example client.rest.address.listAddresses sends to https://api.coinbase.com/api/v3/accounts/:id/addresses instead of using the SIWC base url (https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-addresses).

Using the custom request works:

client.rest.coinbaseRequest({
  baseURL: clientAdvanced.url.REST_SIWC,
  method: "get",
  url: `/accounts/${USDC_ACCOUNT}/addresses`,
});

I believe a similar thing happened for transactions, all the SIWC APIs under /accounts might be affected.

JoshJancula commented 10 months ago

I appreciate you bringing this to my attention. Resolved in version 2.1.0