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

1.0.0-beta.1 • Public • Published

@coinset/gate.io

Universal gate.io API client

🚸 This is not official

Public API

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

fetchCurrencies

List all currencies' details.Docs

example

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

returns

type CurrenciesResponse = {
  currency: string;
  delisted: boolean;
  withdraw_disabled: boolean;
  withdraw_delayed: boolean;
  deposit_disabled: boolean;
  trade_disabled: boolean;
}[];

fetchCurrency

Get details of a specific currency.Docs

example

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

returns

type CurrencyResponse = {
  currency: string;
  delisted: boolean;
  withdraw_disabled: boolean;
  withdraw_delayed: boolean;
  deposit_disabled: boolean;
  trade_disabled: boolean;
}[];

fetchPairs

List all currency pairs supported.Docs

example

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

returns

type PairsResponse = {
  id: `${string}_${string}`;
  base: string;
  quote: string;
  fee: number;
  min_base_amount?: number | undefined;
  min_quote_amount?: number | undefined;
  amount_precision: number;
  precision: number;
  trade_status: "tradable" | "untradable" | "sellable";
  sell_start: number;
  buy_start: number;
}[];

fetchPair

Get details of a specific order.Docs

example

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

parameters

name type description
pair ${string}_${string} Currency pair

returns

type PairResponse = {
  id: `${string}_${string}`;
  base: string;
  quote: string;
  fee: number;
  min_base_amount?: number | undefined;
  min_quote_amount?: number | undefined;
  amount_precision: number;
  precision: number;
  trade_status: "tradable" | "untradable" | "sellable";
  sell_start: number;
  buy_start: number;
};

fetchTicker

Retrieve ticker information.Docs

example

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

parameters

name type description
pair ${string}_${string} Currency pair

returns

type TickerResponse = {
  currency_pair: `${string}_${string}`;
  last: number;
  lowest_ask: number;
  highest_bid: number;
  change_percentage: number;
  base_volume: number;
  quote_volume: number;
  high_24h: number;
  low_24h: number;
};

fetchTickers

Retrieve tickers information.Docs

example

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

returns

type TickerResponse = {
  currency_pair: `${string}_${string}`;
  last: number;
  lowest_ask: number;
  highest_bid: number;
  change_percentage: number;
  base_volume: number;
  quote_volume: number;
  high_24h: number;
  low_24h: number;
  etf_net_value?: number | undefined;
  etf_pre_net_value?: number | undefined;
  etf_pre_timestamp?: number | undefined;
  etf_leverage?: number | undefined;
}[];

Dependencies (1)

Dev Dependencies (1)

Package Sidebar

Install

npm i @coinset/gate.io

Weekly Downloads

0

Version

1.0.0-beta.1

License

MIT

Unpacked Size

85.3 kB

Total Files

185

Last publish

Collaborators

  • miyauci