coinbase-exchange-api-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Coinbase Exchange API SDK (unofficial)

Since Coinbase doesn't have an official SDK for Node.js, we created one.


What does it do?

It simplifies the use of the Coinbase Exchange API (Pro), defining the interface of all available attributes for HTTP body objects, query parameters, URLs, and (the most important part) authentication.

It exposes all this in a simple way, abstracting all the manual work of interacting with the Coinbase Exchange API.

Use it like:

const cb = new CoinbaseExchangeApi({
  key: "",
  secret: "",
  passphrase: "",
  environment: "",
});

The environment defaults to "dev". When it's using "dev", it refers to the Sandbox environment. Set it to "prod" to use the production API.

After this, you can use all the endpoints and methods of the API reference.

For example, looking at the documentation, you have chosen to use the "Get Conversion fee Rates" of the "Conversions" endpoint/method.

So, using this package, you can use it this way:

cb.conversions.getConversionFeeRates();

It's entirely based on the documentation, so every section and every section's methods are used exactly in the same way here, but using the camel-case convention.

Also, the lint of the code will always show you what data needs to be passed (IDs, body, or query params), also providing the interfaces for that (so you will always know which data is required and what are all the available options).

Supporting the development

This work was done by @TaylorHo, and it's in constant improvement.

If you have encountered some error or something that doesn't feel right, open an issue or, even better, a PR solving the issue.

You can give thanks to our work here on Github Sponsors.

Thanks for using this package <3!

Package Sidebar

Install

npm i coinbase-exchange-api-sdk

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

119 kB

Total Files

77

Last publish

Collaborators

  • taylorho