import * as hyperliquid from '@nktkas/hyperliquid'; import { OrderResponse } from '@nktkas/hyperliquid/api/exchange'; export type TimeInForce = 'Gtc' | 'Ioc' | 'Alo'; export interface SpotTradeParams { symbol: string; price: string; size: string; isBuy: boolean; /** * Order type configuration. * - For limit orders: specify { type: 'limit', tif: 'Gtc' | 'Ioc' | 'Alo' } * - For market orders: specify { type: 'market' } * @default { type: 'limit', tif: 'Gtc' } */ orderType?: { type: 'limit'; tif: TimeInForce; } | { type: 'market'; }; /** * Builder fee configuration. * Only applies to sell orders (builder codes do not apply to buying side of spot trades). * Fee is specified in tenths of basis points (e.g., 50 = 0.05% = 5 basis points). * @see https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint#builder-codes */ builderFee?: { builderAddress: string; feeInTenthsOfBps: number; }; } export type SpotOrderResult = SpotOrderResultSuccess | SpotOrderResultFailure; export interface SpotOrderResultSuccess { status: 'success'; orderResult: OrderResponse; } export interface SpotOrderResultFailure { status: 'error'; error: string; } /** * Execute a spot trade on Hyperliquid */ export declare function executeSpotOrder({ transport, pkpPublicKey, params, useTestnet, }: { transport: hyperliquid.HttpTransport; pkpPublicKey: string; params: SpotTradeParams; useTestnet?: boolean; }): Promise; //# sourceMappingURL=execute-spot-order.d.ts.map