@coinset/currency.com
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.1 • Public • Published

@coinset/currency.com

Universal Currency.com API client

🚸 This is not official

Public API

A request for an entry point that does not require authentication.

fetchAssets

The assets endpoint is to provide a detailed summary for each cryptocurrency available on the exchange. Docs

example:

import { fetchAssets } from "https://deno.land/x/currency_com@$VERSION/mod.ts";
await fetchAssets();

returns:

type AssetsResponse = {
  [x: string]: {
    name: string;
    description: string | null;
    can_withdraw: boolean;
    can_deposit: boolean;
    min_withdraw: number | null;
    max_withdraw: number | null;
    maker_fee: number | null;
    taker_fee: number | null;
  };
};

fetchCryptoTicker

The ticker endpoint is to provide a 24-hour pricing and volume summary for each cryptocurrency market pair available on the exchange. Docs

example:

import { fetchCryptoTicker } from "https://deno.land/x/currency_com@$VERSION/mod.ts";
await fetchCryptoTicker();

returns:

type CryptoTickerResponse = {
  [x: `${string}/${string}`]: {
    base_currency: string;
    base_volume: null | number;
    description: null | string;
    highest_bid_price: null | number;
    isFrozen: boolean;
    last_price: null | number;
    lowest_ask_price: null | number;
    past_24hrs_high_price: null | number;
    past_24hrs_low_price: null | number;
    past_24hrs_price_change: null | number;
    quote_currency: string;
    quote_volume: null | number;
  };
};

fetchTokenTicker

The ticker endpoint is to provide a 24-hour pricing and volume summary for each market pair available on the exchange. Docs

example:

import { fetchTokenTicker } from "https://deno.land/x/currency_com@$VERSION/mod.ts";
await fetchTokenTicker();

returns:

type TokenTickerResponse = {
  [x: `${string}/${string}`]: {
    base_currency: string;
    base_volume: null | number;
    description: null | string;
    highest_bid_price: null | number;
    isFrozen: boolean;
    last_price: null | number;
    lowest_ask_price: null | number;
    past_24hrs_high_price: null | number;
    past_24hrs_low_price: null | number;
    past_24hrs_price_change: null | number;
    quote_currency: string;
    quote_volume: null | number;
  };
};

fetchTokenCryptoTicker

The ticker endpoint is to provide a 24-hour pricing and volume summary for each token market pair available on the exchange. Docs

example:

import { fetchTokenCryptoTicker } from "https://deno.land/x/currency_com@$VERSION/mod.ts";
await fetchTokenCryptoTicker();

returns:

type TokenTickerResponse = {
  [x: `${string}/${string}`]: {
    base_currency: string;
    base_volume: null | number;
    description: null | string;
    highest_bid_price: null | number;
    isFrozen: boolean;
    last_price: null | number;
    lowest_ask_price: null | number;
    past_24hrs_high_price: null | number;
    past_24hrs_low_price: null | number;
    past_24hrs_price_change: null | number;
    quote_currency: string;
    quote_volume: null | number;
  };
};

Readme

Keywords

Package Sidebar

Install

npm i @coinset/currency.com

Weekly Downloads

8

Version

1.0.0-beta.1

License

MIT

Unpacked Size

29.6 kB

Total Files

41

Last publish

Collaborators

  • miyauci