perp-cli 0.4.0 → 0.4.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +2 -0
  2. package/dist/arb/sizing.d.ts +12 -1
  3. package/dist/arb/sizing.js +38 -5
  4. package/dist/arb/state.d.ts +6 -0
  5. package/dist/arb/utils.d.ts +2 -0
  6. package/dist/arb/utils.js +1 -1
  7. package/dist/cli-spec.d.ts +0 -4
  8. package/dist/cli-spec.js +8 -1
  9. package/dist/commands/agent.js +12 -9
  10. package/dist/commands/arb/index.js +18 -3
  11. package/dist/commands/arb-auto.js +885 -67
  12. package/dist/commands/dex.js +7 -1
  13. package/dist/commands/funding.d.ts +2 -1
  14. package/dist/commands/funding.js +211 -4
  15. package/dist/commands/manage.js +1 -1
  16. package/dist/commands/market.js +1 -1
  17. package/dist/commands/multileg.d.ts +16 -0
  18. package/dist/commands/multileg.js +174 -0
  19. package/dist/commands/pnl.d.ts +12 -0
  20. package/dist/commands/pnl.js +243 -0
  21. package/dist/commands/settings.d.ts +2 -1
  22. package/dist/commands/settings.js +133 -2
  23. package/dist/commands/stream.js +132 -55
  24. package/dist/commands/trade.js +118 -43
  25. package/dist/commands/wallet.js +1 -1
  26. package/dist/config.d.ts +5 -0
  27. package/dist/config.js +12 -0
  28. package/dist/constants.d.ts +14 -0
  29. package/dist/constants.js +40 -0
  30. package/dist/dashboard/ws-feeds.js +1 -1
  31. package/dist/equity-tracker.d.ts +57 -0
  32. package/dist/equity-tracker.js +209 -0
  33. package/dist/exchanges/hyperliquid-spot.d.ts +68 -0
  34. package/dist/exchanges/hyperliquid-spot.js +317 -0
  35. package/dist/exchanges/hyperliquid.d.ts +26 -5
  36. package/dist/exchanges/hyperliquid.js +181 -92
  37. package/dist/exchanges/interface.d.ts +1 -1
  38. package/dist/exchanges/lighter-spot.d.ts +55 -0
  39. package/dist/exchanges/lighter-spot.js +417 -0
  40. package/dist/exchanges/lighter.d.ts +10 -2
  41. package/dist/exchanges/lighter.js +132 -37
  42. package/dist/exchanges/pacifica.d.ts +11 -4
  43. package/dist/exchanges/pacifica.js +52 -37
  44. package/dist/exchanges/spot-interface.d.ts +45 -0
  45. package/dist/exchanges/spot-interface.js +22 -0
  46. package/dist/execution-log.d.ts +2 -2
  47. package/dist/funding/rates.d.ts +36 -0
  48. package/dist/funding/rates.js +146 -0
  49. package/dist/index.js +148 -99
  50. package/dist/liquidity.d.ts +12 -0
  51. package/dist/liquidity.js +43 -0
  52. package/dist/settings.d.ts +6 -0
  53. package/dist/settings.js +18 -2
  54. package/dist/signer/evm-local.d.ts +12 -0
  55. package/dist/signer/evm-local.js +19 -0
  56. package/dist/signer/index.d.ts +3 -0
  57. package/dist/signer/index.js +2 -0
  58. package/dist/signer/interface.d.ts +31 -0
  59. package/dist/signer/interface.js +7 -0
  60. package/dist/signer/solana-local.d.ts +13 -0
  61. package/dist/signer/solana-local.js +19 -0
  62. package/dist/smart-order.d.ts +44 -0
  63. package/dist/smart-order.js +145 -0
  64. package/dist/trade-validator.js +2 -1
  65. package/dist/utils.js +7 -1
  66. package/dist/ws/market-feed.d.ts +74 -0
  67. package/dist/ws/market-feed.js +227 -0
  68. package/package.json +1 -1
  69. package/skills/perp-cli/SKILL.md +102 -4
  70. package/skills/perp-cli/references/commands.md +16 -1
  71. package/skills/perp-cli/references/strategies.md +1 -1
  72. package/skills/perp-cli/scripts/arb-monitor.sh +74 -0
  73. package/skills/perp-cli/scripts/funding-analysis.sh +85 -0
  74. package/skills/perp-cli/scripts/preflight.sh +98 -0
  75. package/skills/perp-cli/scripts/spot-perp-scan.sh +83 -0
  76. package/skills/perp-cli/scripts/validate-arb.sh +112 -0
  77. package/skills/perp-cli/templates/arb-scan.sh +0 -15
  78. package/skills/perp-cli/templates/open-position.sh +0 -38
  79. package/skills/perp-cli/templates/wallet-setup.sh +0 -17
@@ -1,3 +1,7 @@
1
+ export interface ExchangeFees {
2
+ taker: number;
3
+ maker: number;
4
+ }
1
5
  export interface Settings {
2
6
  /** Default exchange when -e flag is omitted */
3
7
  defaultExchange: string;
@@ -14,6 +18,8 @@ export interface Settings {
14
18
  hyperliquid: boolean;
15
19
  lighter: boolean;
16
20
  };
21
+ /** Per-exchange fee tiers (fetched from exchange APIs) */
22
+ fees: Record<string, ExchangeFees>;
17
23
  }
18
24
  export declare function loadSettings(): Settings;
19
25
  export declare function saveSettings(settings: Settings): void;
package/dist/settings.js CHANGED
@@ -14,12 +14,27 @@ const DEFAULTS = {
14
14
  hyperliquid: false,
15
15
  lighter: false,
16
16
  },
17
+ fees: {
18
+ hyperliquid: { taker: 0.00035, maker: 0.00002 },
19
+ pacifica: { taker: 0.00035, maker: 0.0001 },
20
+ lighter: { taker: 0, maker: 0 },
21
+ },
17
22
  };
18
23
  export function loadSettings() {
19
24
  if (!existsSync(SETTINGS_FILE))
20
- return { ...DEFAULTS, referralCodes: { ...DEFAULTS.referralCodes } };
25
+ return { ...DEFAULTS, referralCodes: { ...DEFAULTS.referralCodes }, fees: { ...DEFAULTS.fees } };
21
26
  try {
22
27
  const stored = JSON.parse(readFileSync(SETTINGS_FILE, "utf-8"));
28
+ // Merge stored fees with defaults (so new exchanges get defaults)
29
+ const fees = { ...DEFAULTS.fees };
30
+ if (stored.fees && typeof stored.fees === "object") {
31
+ for (const [ex, f] of Object.entries(stored.fees)) {
32
+ const fee = f;
33
+ if (fee && typeof fee.taker === "number" && typeof fee.maker === "number") {
34
+ fees[ex] = { taker: fee.taker, maker: fee.maker };
35
+ }
36
+ }
37
+ }
23
38
  return {
24
39
  defaultExchange: stored.defaultExchange ?? DEFAULTS.defaultExchange,
25
40
  referrals: stored.referrals ?? DEFAULTS.referrals,
@@ -32,10 +47,11 @@ export function loadSettings() {
32
47
  hyperliquid: stored.referralApplied?.hyperliquid ?? DEFAULTS.referralApplied.hyperliquid,
33
48
  lighter: stored.referralApplied?.lighter ?? DEFAULTS.referralApplied.lighter,
34
49
  },
50
+ fees,
35
51
  };
36
52
  }
37
53
  catch {
38
- return { ...DEFAULTS, referralCodes: { ...DEFAULTS.referralCodes } };
54
+ return { ...DEFAULTS, referralCodes: { ...DEFAULTS.referralCodes }, fees: { ...DEFAULTS.fees } };
39
55
  }
40
56
  }
41
57
  export function saveSettings(settings) {
@@ -0,0 +1,12 @@
1
+ import type { EvmSigner } from "./interface.js";
2
+ export declare class LocalEvmSigner implements EvmSigner {
3
+ private _wallet;
4
+ private constructor();
5
+ static create(privateKey: string): Promise<LocalEvmSigner>;
6
+ getAddress(): string;
7
+ signTypedData(domain: Record<string, unknown>, types: Record<string, Array<{
8
+ name: string;
9
+ type: string;
10
+ }>>, value: Record<string, unknown>): Promise<string>;
11
+ signMessage(message: string | Uint8Array): Promise<string>;
12
+ }
@@ -0,0 +1,19 @@
1
+ export class LocalEvmSigner {
2
+ _wallet;
3
+ constructor() { }
4
+ static async create(privateKey) {
5
+ const { ethers } = await import("ethers");
6
+ const signer = new LocalEvmSigner();
7
+ signer._wallet = new ethers.Wallet(privateKey);
8
+ return signer;
9
+ }
10
+ getAddress() {
11
+ return this._wallet.address;
12
+ }
13
+ async signTypedData(domain, types, value) {
14
+ return this._wallet.signTypedData(domain, types, value);
15
+ }
16
+ async signMessage(message) {
17
+ return this._wallet.signMessage(message);
18
+ }
19
+ }
@@ -0,0 +1,3 @@
1
+ export type { EvmSigner, SolanaSigner } from "./interface.js";
2
+ export { LocalEvmSigner } from "./evm-local.js";
3
+ export { LocalSolanaSigner } from "./solana-local.js";
@@ -0,0 +1,2 @@
1
+ export { LocalEvmSigner } from "./evm-local.js";
2
+ export { LocalSolanaSigner } from "./solana-local.js";
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Signer interfaces for exchange adapters.
3
+ *
4
+ * Separates signing logic from adapters so it can be injected
5
+ * (e.g., HSM, hardware wallet, delegated signing).
6
+ */
7
+ /** EVM signer (Hyperliquid + Lighter L1) */
8
+ export interface EvmSigner {
9
+ getAddress(): string;
10
+ /** EIP-712 typed data signing — returns flat hex signature (0x...) */
11
+ signTypedData(domain: Record<string, unknown>, types: Record<string, Array<{
12
+ name: string;
13
+ type: string;
14
+ }>>, value: Record<string, unknown>): Promise<string>;
15
+ /** EIP-191 personal message signing — returns hex signature */
16
+ signMessage(message: string | Uint8Array): Promise<string>;
17
+ }
18
+ /** Solana signer (Pacifica) */
19
+ export interface SolanaSigner {
20
+ getPublicKeyBase58(): string;
21
+ /** Ed25519 detached signature */
22
+ signMessage(message: Uint8Array): Promise<Uint8Array>;
23
+ /** Sign a Solana transaction (full sign) */
24
+ signTransaction(tx: {
25
+ sign(keypair: unknown): void;
26
+ }): void;
27
+ /** Partially sign a Solana transaction */
28
+ partialSignTransaction(tx: {
29
+ partialSign(keypair: unknown): void;
30
+ }): void;
31
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Signer interfaces for exchange adapters.
3
+ *
4
+ * Separates signing logic from adapters so it can be injected
5
+ * (e.g., HSM, hardware wallet, delegated signing).
6
+ */
7
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { SolanaSigner } from "./interface.js";
2
+ export declare class LocalSolanaSigner implements SolanaSigner {
3
+ private _keypair;
4
+ constructor(keypair: import("@solana/web3.js").Keypair);
5
+ getPublicKeyBase58(): string;
6
+ signMessage(message: Uint8Array): Promise<Uint8Array>;
7
+ signTransaction(tx: {
8
+ sign(keypair: unknown): void;
9
+ }): void;
10
+ partialSignTransaction(tx: {
11
+ partialSign(keypair: unknown): void;
12
+ }): void;
13
+ }
@@ -0,0 +1,19 @@
1
+ export class LocalSolanaSigner {
2
+ _keypair;
3
+ constructor(keypair) {
4
+ this._keypair = keypair;
5
+ }
6
+ getPublicKeyBase58() {
7
+ return this._keypair.publicKey.toBase58();
8
+ }
9
+ async signMessage(message) {
10
+ const nacl = await import("tweetnacl");
11
+ return nacl.default.sign.detached(message, this._keypair.secretKey);
12
+ }
13
+ signTransaction(tx) {
14
+ tx.sign(this._keypair);
15
+ }
16
+ partialSignTransaction(tx) {
17
+ tx.partialSign(this._keypair);
18
+ }
19
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Smart Order Execution — best bid/ask + 1 tick pricing.
3
+ *
4
+ * Instead of `marketOrder()` which can sweep deep into the book (Hyperliquid
5
+ * DEX uses 5% slippage by default), this fetches the orderbook and places an
6
+ * order at exactly the best available price plus one tick.
7
+ *
8
+ * For buys: limit price = best ask + 1 tick (fills at best ask or better)
9
+ * For sells: limit price = best bid - 1 tick (fills at best bid or better)
10
+ *
11
+ * Uses IOC (Immediate-Or-Cancel) so the order fills instantly at the best
12
+ * level and any unfilled remainder is cancelled — no resting orders left.
13
+ *
14
+ * Benefits:
15
+ * - Fills only at the top-of-book price (no multi-level sweep)
16
+ * - Saves 5-50+ bps vs raw market orders on thin books
17
+ * - Predictable execution price
18
+ *
19
+ * Fallback: if the IOC limit fails, falls back to market order.
20
+ */
21
+ import type { ExchangeAdapter } from "./exchanges/interface.js";
22
+ export interface SmartOrderOpts {
23
+ /** Extra ticks of tolerance beyond best price. Default: 1 */
24
+ tickTolerance?: number;
25
+ /** Fall back to market order if IOC limit fails. Default: true */
26
+ fallback?: boolean;
27
+ /** Reduce only flag for closing positions. Default: false */
28
+ reduceOnly?: boolean;
29
+ }
30
+ export interface SmartOrderResult {
31
+ result: unknown;
32
+ method: "limit_ioc" | "market_fallback";
33
+ /** The actual limit price used for the order */
34
+ price: string;
35
+ /** The best price from the orderbook */
36
+ bestBookPrice: string;
37
+ /** Tick size inferred from orderbook */
38
+ tickSize: string;
39
+ }
40
+ /**
41
+ * Execute a smart order at best bid/ask + 1 tick.
42
+ * Drop-in replacement for `adapter.marketOrder()`.
43
+ */
44
+ export declare function smartOrder(adapter: ExchangeAdapter, symbol: string, side: "buy" | "sell", size: string, opts?: SmartOrderOpts): Promise<SmartOrderResult>;
@@ -0,0 +1,145 @@
1
+ /**
2
+ * Smart Order Execution — best bid/ask + 1 tick pricing.
3
+ *
4
+ * Instead of `marketOrder()` which can sweep deep into the book (Hyperliquid
5
+ * DEX uses 5% slippage by default), this fetches the orderbook and places an
6
+ * order at exactly the best available price plus one tick.
7
+ *
8
+ * For buys: limit price = best ask + 1 tick (fills at best ask or better)
9
+ * For sells: limit price = best bid - 1 tick (fills at best bid or better)
10
+ *
11
+ * Uses IOC (Immediate-Or-Cancel) so the order fills instantly at the best
12
+ * level and any unfilled remainder is cancelled — no resting orders left.
13
+ *
14
+ * Benefits:
15
+ * - Fills only at the top-of-book price (no multi-level sweep)
16
+ * - Saves 5-50+ bps vs raw market orders on thin books
17
+ * - Predictable execution price
18
+ *
19
+ * Fallback: if the IOC limit fails, falls back to market order.
20
+ */
21
+ /**
22
+ * Infer tick size from orderbook prices.
23
+ * Uses the minimum price increment visible in the book.
24
+ */
25
+ function inferTickSize(levels) {
26
+ if (levels.length < 2) {
27
+ // Single level: infer from decimal places (e.g., "1.234" → tick = 0.001)
28
+ const price = levels[0]?.[0] ?? "1";
29
+ const decimals = price.includes(".") ? price.split(".")[1].length : 0;
30
+ return decimals > 0 ? Math.pow(10, -decimals) : 1;
31
+ }
32
+ // Use minimum difference between adjacent price levels
33
+ // Determine max decimal places from the orderbook to round away float noise
34
+ let maxDecimals = 0;
35
+ for (let i = 0; i < Math.min(levels.length, 5); i++) {
36
+ const p = levels[i][0];
37
+ const d = p.includes(".") ? p.split(".")[1].length : 0;
38
+ if (d > maxDecimals)
39
+ maxDecimals = d;
40
+ }
41
+ let minDiff = Infinity;
42
+ for (let i = 1; i < Math.min(levels.length, 5); i++) {
43
+ const diff = Math.abs(Number(levels[i][0]) - Number(levels[i - 1][0]));
44
+ if (diff > 0 && diff < minDiff)
45
+ minDiff = diff;
46
+ }
47
+ if (minDiff === Infinity) {
48
+ return Math.pow(10, -maxDecimals);
49
+ }
50
+ // Round to orderbook precision to eliminate floating-point noise
51
+ // e.g., 0.10000000000000142 → 0.1
52
+ return Number(minDiff.toFixed(maxDecimals));
53
+ }
54
+ /**
55
+ * Get price precision (decimal places) from a price string.
56
+ */
57
+ function pricePrecision(priceStr) {
58
+ return priceStr.includes(".") ? priceStr.split(".")[1].length : 0;
59
+ }
60
+ /**
61
+ * Check if an order response contains an embedded error (not thrown).
62
+ * Some exchanges (e.g., Hyperliquid) return success at HTTP level but include
63
+ * error statuses inside the response body.
64
+ */
65
+ function hasOrderError(result) {
66
+ if (!result || typeof result !== "object")
67
+ return false;
68
+ const r = result;
69
+ // Hyperliquid: { response: { data: { statuses: [{ error: "..." }] } } }
70
+ const resp = r.response;
71
+ const data = resp?.data;
72
+ const statuses = data?.statuses;
73
+ if (Array.isArray(statuses) && statuses.length > 0 && statuses[0].error)
74
+ return true;
75
+ // Generic: { ok: false } or { success: false }
76
+ if (r.ok === false || r.success === false)
77
+ return true;
78
+ return false;
79
+ }
80
+ /**
81
+ * Execute a smart order at best bid/ask + 1 tick.
82
+ * Drop-in replacement for `adapter.marketOrder()`.
83
+ */
84
+ export async function smartOrder(adapter, symbol, side, size, opts = {}) {
85
+ const { tickTolerance = 1, fallback = true, reduceOnly = false } = opts;
86
+ // 1. Fetch orderbook
87
+ const book = await adapter.getOrderbook(symbol);
88
+ // 2. Validate book has liquidity on the relevant side
89
+ const relevantSide = side === "buy" ? book.asks : book.bids;
90
+ if (relevantSide.length === 0) {
91
+ if (!fallback)
92
+ throw new Error(`No ${side === "buy" ? "asks" : "bids"} in orderbook for ${symbol}`);
93
+ const result = await adapter.marketOrder(symbol, side, size);
94
+ return { result, method: "market_fallback", price: "0", bestBookPrice: "0", tickSize: "0" };
95
+ }
96
+ // 3. Get best price and tick size
97
+ const bestEntry = relevantSide[0];
98
+ const bestPrice = Number(bestEntry[0]);
99
+ const tick = inferTickSize(relevantSide);
100
+ const decimals = pricePrecision(bestEntry[0]);
101
+ // 4. Calculate limit price: best price + N ticks in favorable direction
102
+ const limitPrice = side === "buy"
103
+ ? bestPrice + tick * tickTolerance // 1 tick above best ask
104
+ : bestPrice - tick * tickTolerance; // 1 tick below best bid
105
+ const formattedPrice = limitPrice.toFixed(decimals);
106
+ // 5. Place IOC limit order at calculated price
107
+ try {
108
+ const result = await adapter.limitOrder(symbol, side, formattedPrice, size, {
109
+ tif: "IOC",
110
+ reduceOnly,
111
+ });
112
+ // Check for exchange-level rejection inside a "success" response
113
+ // (e.g., Hyperliquid returns { status: "ok", response: { data: { statuses: [{ error: "..." }] } } })
114
+ if (fallback && hasOrderError(result)) {
115
+ const fallbackResult = await adapter.marketOrder(symbol, side, size);
116
+ return {
117
+ result: fallbackResult,
118
+ method: "market_fallback",
119
+ price: formattedPrice,
120
+ bestBookPrice: bestEntry[0],
121
+ tickSize: tick.toFixed(decimals),
122
+ };
123
+ }
124
+ return {
125
+ result,
126
+ method: "limit_ioc",
127
+ price: formattedPrice,
128
+ bestBookPrice: bestEntry[0],
129
+ tickSize: tick.toFixed(decimals),
130
+ };
131
+ }
132
+ catch (err) {
133
+ if (!fallback)
134
+ throw err;
135
+ // Fallback to raw market order for reliability
136
+ const result = await adapter.marketOrder(symbol, side, size);
137
+ return {
138
+ result,
139
+ method: "market_fallback",
140
+ price: formattedPrice,
141
+ bestBookPrice: bestEntry[0],
142
+ tickSize: tick.toFixed(decimals),
143
+ };
144
+ }
145
+ }
@@ -1,5 +1,6 @@
1
1
  import { symbolMatch } from "./utils.js";
2
- const DEFAULT_TAKER_FEE = 0.0005; // 0.05%
2
+ import { DEFAULT_TAKER_FEE } from "./constants.js";
3
+ // Use centralized DEFAULT_TAKER_FEE from constants.ts (0.035%)
3
4
  const DEFAULT_MAX_SLIPPAGE = 0.005; // 0.5%
4
5
  /**
5
6
  * Validate a trade before execution.
package/dist/utils.js CHANGED
@@ -107,7 +107,13 @@ export function printJson(data) {
107
107
  const fields = process.argv[fieldsArg + 1].split(",").map(f => f.trim());
108
108
  const envelope = output;
109
109
  if (envelope.ok && envelope.data && typeof envelope.data === "object") {
110
- envelope.data = pickFields(envelope.data, fields);
110
+ // If data is an array, apply pickFields to each element
111
+ if (Array.isArray(envelope.data)) {
112
+ envelope.data = envelope.data.map((item) => pickFields(item, fields));
113
+ }
114
+ else {
115
+ envelope.data = pickFields(envelope.data, fields);
116
+ }
111
117
  }
112
118
  output = envelope;
113
119
  }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Unified market data feeds for CLI streaming commands.
3
+ *
4
+ * - Hyperliquid: native WebSocket (allMids, l2Book, trades, candle)
5
+ * - Lighter: REST polling (no public market data WS)
6
+ * - Pacifica: handled via existing PacificaWSClient in stream.ts
7
+ */
8
+ import { EventEmitter } from "events";
9
+ export interface PriceUpdate {
10
+ symbol: string;
11
+ mid: number;
12
+ funding?: number;
13
+ }
14
+ export interface BookUpdate {
15
+ bids: [string, string][];
16
+ asks: [string, string][];
17
+ }
18
+ export interface TradeUpdate {
19
+ side: string;
20
+ price: string;
21
+ size: string;
22
+ time: number;
23
+ }
24
+ export interface CandleUpdate {
25
+ o: string;
26
+ h: string;
27
+ l: string;
28
+ c: string;
29
+ v: string;
30
+ t: number;
31
+ }
32
+ export declare class HyperliquidMarketFeed extends EventEmitter {
33
+ private ws;
34
+ private closed;
35
+ private reconnectTimer;
36
+ private subs;
37
+ get wsUrl(): string;
38
+ connect(): Promise<void>;
39
+ private send;
40
+ private sub;
41
+ private scheduleReconnect;
42
+ subscribePrices(): void;
43
+ subscribeBook(symbol: string): void;
44
+ subscribeTrades(symbol: string): void;
45
+ subscribeCandle(symbol: string, interval: string): void;
46
+ private handleMessage;
47
+ close(): void;
48
+ }
49
+ export interface LighterFeedOpts {
50
+ /** Polling interval for prices in ms (default: 3000) */
51
+ pricesIntervalMs?: number;
52
+ /** Polling interval for book/trades in ms (default: 2000) */
53
+ bookIntervalMs?: number;
54
+ /** Polling interval for candles in ms (default: 5000) */
55
+ candleIntervalMs?: number;
56
+ }
57
+ export declare class LighterMarketFeed extends EventEmitter {
58
+ private closed;
59
+ private timers;
60
+ private marketMap;
61
+ private pricesMs;
62
+ private bookMs;
63
+ private candleMs;
64
+ constructor(opts?: LighterFeedOpts);
65
+ connect(): Promise<void>;
66
+ private getMarketId;
67
+ private poll;
68
+ subscribePrices(): void;
69
+ subscribeBook(symbol: string): void;
70
+ subscribeTrades(symbol: string): void;
71
+ subscribeCandle(symbol: string, interval: string): void;
72
+ close(): void;
73
+ }
74
+ export declare function createMarketFeed(exchange: string): HyperliquidMarketFeed | LighterMarketFeed;