UNPKG

@nktkas/hyperliquid

Version:

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

47 lines 2.39 kB
import * as v from "valibot"; /** * Request exchange system status information. */ export declare const ExchangeStatusRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{ /** Type of request. */ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"exchangeStatus", undefined>, v.DescriptionAction<"exchangeStatus", "Type of request.">]>; }, undefined>, v.DescriptionAction<{ type: "exchangeStatus"; }, "Request exchange system status information.">]>; export type ExchangeStatusRequest = v.InferOutput<typeof ExchangeStatusRequest>; /** * Exchange system status information. */ export declare const ExchangeStatusResponse: v.SchemaWithPipe<readonly [v.ObjectSchema<{ /** Server time (in ms since epoch). */ readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.TransformAction<any, number>, v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Server time (in ms since epoch).">]>; readonly specialStatuses: v.SchemaWithPipe<readonly [v.NullableSchema<v.UnknownSchema, undefined>]>; }, undefined>, v.DescriptionAction<{ time: number; specialStatuses: unknown; }, "Exchange system status information.">]>; export type ExchangeStatusResponse = v.InferOutput<typeof ExchangeStatusResponse>; import type { InfoConfig } from "./_types.js"; /** * Request exchange system status information. * * @param config - General configuration for Info API requests. * @param signal - [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) to cancel the request. * * @returns Exchange system status information. * * @throws {ValiError} 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 }); * ``` */ export declare function exchangeStatus(config: InfoConfig, signal?: AbortSignal): Promise<ExchangeStatusResponse>; //# sourceMappingURL=exchangeStatus.d.ts.map