UNPKG

@nktkas/hyperliquid

Version:

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

87 lines 6.72 kB
import * as v from "valibot"; /** * Request all perpetual dexs. * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-all-perpetual-dexs */ export declare const PerpDexsRequest: v.SchemaWithPipe<readonly [v.ObjectSchema<{ /** Type of request. */ readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"perpDexs", undefined>, v.DescriptionAction<"perpDexs", "Type of request.">]>; }, undefined>, v.DescriptionAction<{ type: "perpDexs"; }, "Request all perpetual dexs.">]>; export type PerpDexsRequest = v.InferOutput<typeof PerpDexsRequest>; /** * Array of perpetual dexes (null is main dex). * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-all-perpetual-dexs */ export declare const PerpDexsResponse: v.SchemaWithPipe<readonly [v.ArraySchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{ /** Short name of the perpetual dex. */ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Short name of the perpetual dex.">]>; /** Complete name of the perpetual dex. */ readonly fullName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Complete name of the perpetual dex.">]>; /** Hex address of the dex deployer. */ readonly deployer: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Hex address of the dex deployer.">]>; /** Hex address of the oracle updater, or null if not available. */ readonly oracleUpdater: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | null, "Hex address of the oracle updater, or null if not available.">]>; /** Hex address of the fee recipient, or null if not available. */ readonly feeRecipient: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | null, "Hex address of the fee recipient, or null if not available.">]>; /** Mapping of asset names to their streaming open interest caps. */ readonly assetToStreamingOiCap: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.StringSchema<undefined>, v.StringSchema<undefined>], undefined>, undefined>, v.DescriptionAction<[string, string][], "Mapping of asset names to their streaming open interest caps.">]>; /** List of delegated function names and their authorized executor addresses. */ readonly subDeployers: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.StringSchema<undefined>, v.ArraySchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, undefined>], undefined>, undefined>, v.DescriptionAction<[string, `0x${string}`[]][], "List of delegated function names and their authorized executor addresses.">]>; /** Fee scale applied to deployer fees. */ readonly deployerFeeScale: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, v.TransformAction<any, string>, v.StringSchema<undefined>, v.TransformAction<string, string>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Fee scale applied to deployer fees.">]>; /** ISO 8601 timestamp (without timezone) of the last deployer fee scale change. */ readonly lastDeployerFeeScaleChangeTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "ISO 8601 timestamp (without timezone) of the last deployer fee scale change.">]>; /** Array of tuples mapping asset names to their funding multipliers. */ readonly assetToFundingMultiplier: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.StringSchema<undefined>, v.StringSchema<undefined>], undefined>, undefined>, v.DescriptionAction<[string, string][], "Array of tuples mapping asset names to their funding multipliers.">]>; }, undefined>, v.DescriptionAction<{ name: string; fullName: string; deployer: `0x${string}`; oracleUpdater: `0x${string}` | null; feeRecipient: `0x${string}` | null; assetToStreamingOiCap: [string, string][]; subDeployers: [string, `0x${string}`[]][]; deployerFeeScale: string; lastDeployerFeeScaleChangeTime: string; assetToFundingMultiplier: [string, string][]; }, " Perpetual dex metadata.">]>, undefined>, undefined>, v.DescriptionAction<({ name: string; fullName: string; deployer: `0x${string}`; oracleUpdater: `0x${string}` | null; feeRecipient: `0x${string}` | null; assetToStreamingOiCap: [string, string][]; subDeployers: [string, `0x${string}`[]][]; deployerFeeScale: string; lastDeployerFeeScaleChangeTime: string; assetToFundingMultiplier: [string, string][]; } | null)[], "Array of perpetual dexes (null is main dex).">]>; export type PerpDexsResponse = v.InferOutput<typeof PerpDexsResponse>; import type { InfoConfig } from "./_types.js"; /** * Request all perpetual dexs. * * @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 Array of perpetual dexes (null is main dex). * * @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 { perpDexs } from "@nktkas/hyperliquid/api/info"; * * const transport = new HttpTransport(); // or `WebSocketTransport` * * const data = await perpDexs({ transport }); * ``` * * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/perpetuals#retrieve-all-perpetual-dexs */ export declare function perpDexs(config: InfoConfig, signal?: AbortSignal): Promise<PerpDexsResponse>; //# sourceMappingURL=perpDexs.d.ts.map