@nktkas/hyperliquid
Version:
Hyperliquid API SDK for all major JS runtimes, written in TypeScript.
52 lines • 2.39 kB
JavaScript
import * as v from "valibot";
// ============================================================
// API Schemas
// ============================================================
import { PerpDeployAuctionStatusResponse } from "./perpDeployAuctionStatus.js";
/**
* Request for the status of the spot deploy auction.
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-pair-deploy-auction
*/
export const SpotPairDeployAuctionStatusRequest = /* @__PURE__ */ (() => {
return v.pipe(v.object({
/** Type of request. */
type: v.pipe(v.literal("spotPairDeployAuctionStatus"), v.description("Type of request.")),
}), v.description("Request for the status of the spot deploy auction."));
})();
/**
* Status of the spot deploy auction.
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-pair-deploy-auction
*/
export const SpotPairDeployAuctionStatusResponse = /* @__PURE__ */ (() => {
return v.pipe(PerpDeployAuctionStatusResponse, v.description("Status of the spot deploy auction."));
})();
/**
* Request for the status of the spot deploy auction.
*
* @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.
*
* @returns Status of the spot deploy auction.
*
* @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 { spotPairDeployAuctionStatus } from "@nktkas/hyperliquid/api/info";
*
* const transport = new HttpTransport(); // or `WebSocketTransport`
*
* const data = await spotPairDeployAuctionStatus({ transport });
* ```
*
* @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/info-endpoint/spot#retrieve-information-about-the-spot-pair-deploy-auction
*/
export function spotPairDeployAuctionStatus(config, signal) {
const request = v.parse(SpotPairDeployAuctionStatusRequest, {
type: "spotPairDeployAuctionStatus",
});
return config.transport.request("info", request, signal);
}
//# sourceMappingURL=spotPairDeployAuctionStatus.js.map