UNPKG

@nktkas/hyperliquid

Version:

Hyperliquid API SDK for all major JS runtimes, written in TypeScript.

46 lines (45 loc) 1.63 kB
/// <amd-module name="file:///home/runner/work/hyperliquid/hyperliquid/src/api/info/_methods/exchangeStatus.ts" /> import * as v from "valibot"; /** * Request exchange system status information. * @see null */ export declare const ExchangeStatusRequest: v.ObjectSchema<{ /** Type of request. */ readonly type: v.LiteralSchema<"exchangeStatus", undefined>; }, undefined>; export type ExchangeStatusRequest = v.InferOutput<typeof ExchangeStatusRequest>; /** * Exchange system status information. * @see null */ export type ExchangeStatusResponse = { /** Server time (in ms since epoch). */ time: number; /** Special statuses of the exchange system. */ specialStatuses: string | null; }; import type { InfoConfig } from "./_base/mod.js"; /** * Request exchange system status information. * * @param config General configuration for Info API requests. * @param signal {@link https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal | AbortSignal} to cancel the request. * @return Exchange system status information. * * @throws {ValidationError} When the request parameters fail validation (before sending). * @throws {TransportError} When the transport layer throws an error. * * @example * ```ts * import { HttpTransport } from "@nktkas/hyperliquid"; * import { exchangeStatus } from "@nktkas/hyperliquid/api/info"; * * const transport = new HttpTransport(); // or `WebSocketTransport` * * const data = await exchangeStatus({ transport }); * ``` * * @see null */ export declare function exchangeStatus(config: InfoConfig, signal?: AbortSignal): Promise<ExchangeStatusResponse>;