@coinset/ascendex
Universal AscendEX API client
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;
}[];
};