JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q29583F
  • License BSD-3-Clause

Crypto API SDK for JavaScript.

Package Exports

  • cryptodatapi
  • cryptodatapi/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cryptodatapi) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Crypto API SDK for JavaScript

Develop and deploy applications, mobile and web, with popular JavaScript Frameworks using Crypto API SDK for JavaScript.

Install

npm i cryptodatapi
# or
yarn add cryptodatapi

Usage Example

All methods support await/async.

import { sdk, derivatives, spot, dex, lending, news, livePrice, historical } from "cryptodatapi";

// First, authentication
await sdk.auth("<username>", "<password>"); 

// Save token for next time
const token = sdk.getToken();

// Or, you can set token directly
sdk.setToken("<Token here>");

// Second, call the api which you need
// For example, Retrieve Real-Time Prices (Live Prices) Data
await livePrice.getAll();
await livePrice.getById("<id>");
await livePrice.getBySymbol(2021, "<symbol>");

// Retrieve 2021 Cryptocurrency Historical Data
await historical.getAll(2021);
await historical.getById(2021, "<id>");
await historical.getBySymbol(2021, "<symbol>");

// Retrieve 2022 Cryptocurrency Historical Data
await historical.getAll(2022);
await historical.getById(2022, "<id>");
await historical.getBySymbol(2022, "<symbol>");

// Retrieve Cryptocurrency Derivatives Exchanges Data
await derivatives.getAll();
await derivatives.getById("<id>");

// Retrieve Cryptocurrency Decentralized Exchanges Data
await dex.getAll();
await dex.getById("<id>");

// Retrieve Cryptocurrency Lending Exchanges Data
await lending.getAll();
await lending.getById("<id>");

// Retrieve Cryptocurrency Spot Exchanges Data
await spot.getAll();
await spot.getById("<id>");

// Retrieve Cryptocurrency Latest News Data
await news.getAll();
await news.getById("<id>");

The Crypto API documentation is available here. If you need further assistance, don't hesitate to contact us.

License

This project is licensed under the BSD 3-Clause License.

(c) 2022 Moat Systems Limited.