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

1.0.0-beta.1 • Public • Published

@coinset/ascendex

Universal AscendEX API client

🚸 This is not official

Public API

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

fetchAssets

You can obtain a list of all assets listed on the exchange through this API. Docs

example:

import { fetchAssets } from "https://deno.land/x/ascendex@$VERSION/mod.ts";

await fetchAssets();

returns:

type AssetsResponse = {
  code: 0;
  data: {
    assetCode: string;
    assetName: string;
    precisionScale: number;
    nativeScale: number;
    blockChain: {
      chainName: string;
      withdrawFee: number;
      allowDeposit: boolean;
      allowWithdraw: boolean;
      minDepositAmt: number;
      minWithdrawal: number;
      numConfirmations: number;
    }[];
  }[];
};

fetchProducts

You can obtain a list of all products traded on the exchange through this API. Docs

example:

import { fetchProducts } from "https://deno.land/x/ascendex@$VERSION/mod.ts";

await fetchProducts();

returns:

type ProductsResponse = {
  code: 0;
  data: {
    symbol: string;
    displayName: string;
    baseAsset: string;
    quoteAsset: string;
    status: "Normal" | "NoTrading" | "InternalTrading";
    minNotional: number;
    maxNotional: number;
    marginTradable: boolean;
    commissionType: "Base" | "Quote" | "Received";
    commissionReserveRate: number;
    tickSize: number;
    lotSize: number;
  }[];
};

fetchTicker

Get summary statistics of one symbol (spot market). Docs

example:

import { fetchTicker } from "https://deno.land/x/ascendex@$VERSION/mod.ts";
await fetchTicker({ symbol: "ASD/USDT" });

parameters:

type TickerOptions = {
  symbol: `${string}/${string}`;
};

returns:

type TickerResponse = {
  code: 0;
  data: {
    symbol: `${string}/${string}`;
    open: number;
    close: number;
    high: number;
    low: number;
    volume: number;
    ask: [number, number];
    bid: [
      number,
      number,
    ];
    type: string;
  };
};

fetchTickers

Get summary statistics of multi symbols (spot market). Docs

example:

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

parameters:

type TickersOptions = {
  symbols: `${string}/${string}`[];
};

returns:

type TickersResponse = {
  code: 0;
  data: {
    symbol: `${string}/${string}`;
    open: number;
    close: number;
    high: number;
    low: number;
    volume: number;
    ask: [number, number];
    bid: [
      number,
      number,
    ];
    type: string;
  }[];
};

Versions

Current Tags

Version History

Package Sidebar

Install

npm i @coinset/ascendex

Weekly Downloads

32

Version

1.0.0-beta.1

License

MIT

Unpacked Size

87.7 kB

Total Files

179

Last publish

Collaborators

  • miyauci