@nktkas/hyperliquid
Version:
Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
38 lines • 1.57 kB
TypeScript
import * as v from "valibot";
/**
* Request liquidatable.
*/
export declare const LiquidatableRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{
/** Type of request. */
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"liquidatable", undefined>, v.DescriptionAction<"liquidatable", "Type of request.">]>;
}, undefined>, v.DescriptionAction<{
type: "liquidatable";
}, "Request liquidatable.">]>;
export type LiquidatableRequest = v.InferOutput<typeof LiquidatableRequest>;
/** */
export declare const LiquidatableResponse: v.SchemaWithPipe<readonly [v.ArraySchema<v.UnknownSchema, undefined>]>;
export type LiquidatableResponse = v.InferOutput<typeof LiquidatableResponse>;
import type { InfoConfig } from "./_types.js";
/**
* Request liquidatable.
*
* @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 unknown
*
* @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 { liquidatable } from "@nktkas/hyperliquid/api/info";
*
* const transport = new HttpTransport(); // or `WebSocketTransport`
*
* const data = await liquidatable({ transport });
* ```
*/
export declare function liquidatable(config: InfoConfig, signal?: AbortSignal): Promise<LiquidatableResponse>;
//# sourceMappingURL=liquidatable.d.ts.map