@clawnch/clawncher-sdk 0.3.2 → 0.3.3
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.
- package/README.md +89 -0
- package/dist/deployer.d.ts +13 -0
- package/dist/deployer.d.ts.map +1 -1
- package/dist/deployer.js +8 -0
- package/dist/deployer.js.map +1 -1
- package/dist/errors.d.ts +2 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +2 -0
- package/dist/errors.js.map +1 -1
- package/dist/herd-auth.d.ts +79 -0
- package/dist/herd-auth.d.ts.map +1 -0
- package/dist/herd-auth.js +188 -0
- package/dist/herd-auth.js.map +1 -0
- package/dist/herd-hal.d.ts +92 -0
- package/dist/herd-hal.d.ts.map +1 -0
- package/dist/herd-hal.js +337 -0
- package/dist/herd-hal.js.map +1 -0
- package/dist/herd-types.d.ts +479 -0
- package/dist/herd-types.d.ts.map +1 -0
- package/dist/herd-types.js +18 -0
- package/dist/herd-types.js.map +1 -0
- package/dist/herd.d.ts +223 -0
- package/dist/herd.d.ts.map +1 -0
- package/dist/herd.js +1486 -0
- package/dist/herd.js.map +1 -0
- package/dist/hummingbot-types.d.ts +702 -0
- package/dist/hummingbot-types.d.ts.map +1 -0
- package/dist/hummingbot-types.js +12 -0
- package/dist/hummingbot-types.js.map +1 -0
- package/dist/hummingbot.d.ts +747 -0
- package/dist/hummingbot.d.ts.map +1 -0
- package/dist/hummingbot.js +1478 -0
- package/dist/hummingbot.js.map +1 -0
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/price.d.ts +16 -11
- package/dist/price.d.ts.map +1 -1
- package/dist/price.js +56 -25
- package/dist/price.js.map +1 -1
- package/dist/uniswap-quoter.d.ts +25 -4
- package/dist/uniswap-quoter.d.ts.map +1 -1
- package/dist/uniswap-quoter.js +52 -8
- package/dist/uniswap-quoter.js.map +1 -1
- package/dist/walletconnect-signer.d.ts +154 -0
- package/dist/walletconnect-signer.d.ts.map +1 -0
- package/dist/walletconnect-signer.js +307 -0
- package/dist/walletconnect-signer.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hummingbot SDK Types
|
|
3
|
+
*
|
|
4
|
+
* Types for interacting with the Hummingbot API server for automated
|
|
5
|
+
* cryptocurrency trading, market making, and portfolio management
|
|
6
|
+
* across 40+ exchange connectors.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/hummingbot/hummingbot
|
|
9
|
+
* @see https://github.com/hummingbot/mcp
|
|
10
|
+
*/
|
|
11
|
+
export interface HummingbotConfig {
|
|
12
|
+
/** Hummingbot API server URL (default: http://localhost:8000) */
|
|
13
|
+
apiUrl?: string;
|
|
14
|
+
/** API username (default: admin) */
|
|
15
|
+
username?: string;
|
|
16
|
+
/** API password (default: admin) */
|
|
17
|
+
password?: string;
|
|
18
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
19
|
+
timeout?: number;
|
|
20
|
+
/** Maximum retry attempts (default: 3) */
|
|
21
|
+
maxRetries?: number;
|
|
22
|
+
/** Delay between retries in milliseconds (default: 2000) */
|
|
23
|
+
retryDelay?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface HummingbotServerConfig {
|
|
26
|
+
/** Server name */
|
|
27
|
+
name: string;
|
|
28
|
+
/** API URL */
|
|
29
|
+
url: string;
|
|
30
|
+
/** API username */
|
|
31
|
+
username: string;
|
|
32
|
+
/** API password */
|
|
33
|
+
password: string;
|
|
34
|
+
/** Whether this is the default server */
|
|
35
|
+
isDefault: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface HummingbotConnectorField {
|
|
38
|
+
/** Field name */
|
|
39
|
+
name: string;
|
|
40
|
+
/** Field type */
|
|
41
|
+
type: string;
|
|
42
|
+
/** Whether the field is required */
|
|
43
|
+
required: boolean;
|
|
44
|
+
/** Field description */
|
|
45
|
+
description?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface HummingbotConnectorInfo {
|
|
48
|
+
/** Connector name (e.g. 'binance', 'binance_perpetual') */
|
|
49
|
+
name: string;
|
|
50
|
+
/** Required credential fields */
|
|
51
|
+
fields: HummingbotConnectorField[];
|
|
52
|
+
}
|
|
53
|
+
export interface HummingbotSetupConnectorRequest {
|
|
54
|
+
/** Action: 'setup' or 'delete' */
|
|
55
|
+
action?: 'setup' | 'delete';
|
|
56
|
+
/** Exchange connector name */
|
|
57
|
+
connector?: string;
|
|
58
|
+
/** Credentials object */
|
|
59
|
+
credentials?: Record<string, string>;
|
|
60
|
+
/** Account name */
|
|
61
|
+
account?: string;
|
|
62
|
+
/** Confirm override of existing connector */
|
|
63
|
+
confirmOverride?: boolean;
|
|
64
|
+
}
|
|
65
|
+
export interface HummingbotTokenBalance {
|
|
66
|
+
/** Token symbol */
|
|
67
|
+
token: string;
|
|
68
|
+
/** Available balance */
|
|
69
|
+
available: number;
|
|
70
|
+
/** Frozen/locked balance */
|
|
71
|
+
frozen: number;
|
|
72
|
+
/** Total balance */
|
|
73
|
+
total: number;
|
|
74
|
+
/** Balance value in USD */
|
|
75
|
+
valueUsd?: number;
|
|
76
|
+
}
|
|
77
|
+
export interface HummingbotPerpPosition {
|
|
78
|
+
/** Trading pair */
|
|
79
|
+
tradingPair: string;
|
|
80
|
+
/** Position side: LONG or SHORT */
|
|
81
|
+
side: 'LONG' | 'SHORT';
|
|
82
|
+
/** Position amount */
|
|
83
|
+
amount: number;
|
|
84
|
+
/** Entry price */
|
|
85
|
+
entryPrice: number;
|
|
86
|
+
/** Mark price */
|
|
87
|
+
markPrice: number;
|
|
88
|
+
/** Unrealized PnL */
|
|
89
|
+
unrealizedPnl: number;
|
|
90
|
+
/** Leverage */
|
|
91
|
+
leverage: number;
|
|
92
|
+
/** Connector name */
|
|
93
|
+
connector: string;
|
|
94
|
+
/** Account name */
|
|
95
|
+
account: string;
|
|
96
|
+
}
|
|
97
|
+
export interface HummingbotLPPosition {
|
|
98
|
+
/** Pool address */
|
|
99
|
+
poolAddress: string;
|
|
100
|
+
/** Position address/NFT ID */
|
|
101
|
+
positionAddress: string;
|
|
102
|
+
/** Trading pair */
|
|
103
|
+
tradingPair: string;
|
|
104
|
+
/** Lower price range */
|
|
105
|
+
lowerPrice: number;
|
|
106
|
+
/** Upper price range */
|
|
107
|
+
upperPrice: number;
|
|
108
|
+
/** Current price */
|
|
109
|
+
currentPrice: number;
|
|
110
|
+
/** Base token amount */
|
|
111
|
+
baseAmount: number;
|
|
112
|
+
/** Quote token amount */
|
|
113
|
+
quoteAmount: number;
|
|
114
|
+
/** Uncollected base fees */
|
|
115
|
+
uncollectedBaseFees: number;
|
|
116
|
+
/** Uncollected quote fees */
|
|
117
|
+
uncollectedQuoteFees: number;
|
|
118
|
+
/** Whether position is in range */
|
|
119
|
+
inRange: boolean;
|
|
120
|
+
/** Connector name */
|
|
121
|
+
connector: string;
|
|
122
|
+
/** Network */
|
|
123
|
+
network: string;
|
|
124
|
+
}
|
|
125
|
+
export interface HummingbotActiveOrder {
|
|
126
|
+
/** Order ID */
|
|
127
|
+
orderId: string;
|
|
128
|
+
/** Trading pair */
|
|
129
|
+
tradingPair: string;
|
|
130
|
+
/** Order type */
|
|
131
|
+
orderType: string;
|
|
132
|
+
/** Trade side */
|
|
133
|
+
side: 'BUY' | 'SELL';
|
|
134
|
+
/** Order amount */
|
|
135
|
+
amount: number;
|
|
136
|
+
/** Order price */
|
|
137
|
+
price: number;
|
|
138
|
+
/** Filled amount */
|
|
139
|
+
filledAmount: number;
|
|
140
|
+
/** Order status */
|
|
141
|
+
status: string;
|
|
142
|
+
/** Connector name */
|
|
143
|
+
connector: string;
|
|
144
|
+
/** Account name */
|
|
145
|
+
account: string;
|
|
146
|
+
}
|
|
147
|
+
export interface HummingbotPortfolioOverview {
|
|
148
|
+
/** Token balances across all exchanges */
|
|
149
|
+
balances: HummingbotTokenBalance[];
|
|
150
|
+
/** Open perpetual positions */
|
|
151
|
+
perpPositions: HummingbotPerpPosition[];
|
|
152
|
+
/** LP (CLMM) positions */
|
|
153
|
+
lpPositions: HummingbotLPPosition[];
|
|
154
|
+
/** Active orders */
|
|
155
|
+
activeOrders: HummingbotActiveOrder[];
|
|
156
|
+
/** Raw formatted output from the API */
|
|
157
|
+
formattedOutput: string;
|
|
158
|
+
}
|
|
159
|
+
export interface HummingbotPortfolioRequest {
|
|
160
|
+
/** Filter by account names */
|
|
161
|
+
accountNames?: string[];
|
|
162
|
+
/** Filter by connector names */
|
|
163
|
+
connectorNames?: string[];
|
|
164
|
+
/** Include token balances */
|
|
165
|
+
includeBalances?: boolean;
|
|
166
|
+
/** Include perpetual positions */
|
|
167
|
+
includePerpPositions?: boolean;
|
|
168
|
+
/** Include LP positions */
|
|
169
|
+
includeLPPositions?: boolean;
|
|
170
|
+
/** Include active orders */
|
|
171
|
+
includeActiveOrders?: boolean;
|
|
172
|
+
/** Show balances as distribution percentages */
|
|
173
|
+
asDistribution?: boolean;
|
|
174
|
+
/** Force refresh from exchanges */
|
|
175
|
+
refresh?: boolean;
|
|
176
|
+
}
|
|
177
|
+
export type HummingbotOrderType = 'MARKET' | 'LIMIT' | 'LIMIT_MAKER';
|
|
178
|
+
export type HummingbotTradeType = 'BUY' | 'SELL';
|
|
179
|
+
export type HummingbotPositionAction = 'OPEN' | 'CLOSE';
|
|
180
|
+
export interface HummingbotPlaceOrderRequest {
|
|
181
|
+
/** Exchange connector name */
|
|
182
|
+
connectorName: string;
|
|
183
|
+
/** Trading pair (e.g. 'BTC-USDT') */
|
|
184
|
+
tradingPair: string;
|
|
185
|
+
/** Order side */
|
|
186
|
+
tradeType: HummingbotTradeType;
|
|
187
|
+
/** Order amount (base currency, or '$100' for USD) */
|
|
188
|
+
amount: string;
|
|
189
|
+
/** Order type */
|
|
190
|
+
orderType?: HummingbotOrderType;
|
|
191
|
+
/** Price for limit orders */
|
|
192
|
+
price?: string;
|
|
193
|
+
/** Position action for perpetuals */
|
|
194
|
+
positionAction?: HummingbotPositionAction;
|
|
195
|
+
/** Account name */
|
|
196
|
+
accountName?: string;
|
|
197
|
+
}
|
|
198
|
+
export interface HummingbotOrderResult {
|
|
199
|
+
/** Whether the order was placed successfully */
|
|
200
|
+
success: boolean;
|
|
201
|
+
/** Order ID */
|
|
202
|
+
orderId?: string;
|
|
203
|
+
/** Result message */
|
|
204
|
+
result: string;
|
|
205
|
+
}
|
|
206
|
+
export interface HummingbotSetLeverageRequest {
|
|
207
|
+
/** Account name */
|
|
208
|
+
accountName: string;
|
|
209
|
+
/** Exchange connector name */
|
|
210
|
+
connectorName: string;
|
|
211
|
+
/** Trading pair */
|
|
212
|
+
tradingPair?: string;
|
|
213
|
+
/** Position mode */
|
|
214
|
+
positionMode?: 'HEDGE' | 'ONE-WAY';
|
|
215
|
+
/** Leverage multiplier */
|
|
216
|
+
leverage?: number;
|
|
217
|
+
}
|
|
218
|
+
export type HummingbotExecutorType = 'position_executor' | 'dca_executor' | 'grid_executor' | 'order_executor' | 'arbitrage_executor';
|
|
219
|
+
export type HummingbotExecutorStatus = 'RUNNING' | 'TERMINATED';
|
|
220
|
+
export interface HummingbotExecutorConfig {
|
|
221
|
+
/** Executor type */
|
|
222
|
+
executorType: HummingbotExecutorType;
|
|
223
|
+
/** Exchange connector name */
|
|
224
|
+
connectorName: string;
|
|
225
|
+
/** Trading pair */
|
|
226
|
+
tradingPair: string;
|
|
227
|
+
/** Account name */
|
|
228
|
+
accountName?: string;
|
|
229
|
+
/** Additional config specific to executor type */
|
|
230
|
+
[key: string]: unknown;
|
|
231
|
+
}
|
|
232
|
+
/** Position executor config */
|
|
233
|
+
export interface HummingbotPositionExecutorConfig extends HummingbotExecutorConfig {
|
|
234
|
+
executorType: 'position_executor';
|
|
235
|
+
/** Trade side: 1=BUY, 2=SELL */
|
|
236
|
+
side: 1 | 2;
|
|
237
|
+
/** Entry price */
|
|
238
|
+
entryPrice?: number;
|
|
239
|
+
/** Amount in base currency */
|
|
240
|
+
amount: number;
|
|
241
|
+
/** Stop loss percentage (as decimal, e.g. 0.03 = 3%) */
|
|
242
|
+
stopLoss?: number;
|
|
243
|
+
/** Take profit percentage */
|
|
244
|
+
takeProfit?: number;
|
|
245
|
+
/** Time limit in seconds */
|
|
246
|
+
timeLimit?: number;
|
|
247
|
+
/** Order type: 1=MARKET, 2=LIMIT, 3=LIMIT_MAKER */
|
|
248
|
+
orderType?: 1 | 2 | 3;
|
|
249
|
+
}
|
|
250
|
+
/** Grid executor config */
|
|
251
|
+
export interface HummingbotGridExecutorConfig extends HummingbotExecutorConfig {
|
|
252
|
+
executorType: 'grid_executor';
|
|
253
|
+
/** Trade side: 1=BUY (LONG), 2=SELL (SHORT) */
|
|
254
|
+
side: 1 | 2;
|
|
255
|
+
/** Start price of grid range */
|
|
256
|
+
startPrice: number;
|
|
257
|
+
/** End price of grid range */
|
|
258
|
+
endPrice: number;
|
|
259
|
+
/** Limit price (safety boundary) */
|
|
260
|
+
limitPrice: number;
|
|
261
|
+
/** Total amount in quote currency */
|
|
262
|
+
totalAmountQuote: number;
|
|
263
|
+
/** Number of grid levels */
|
|
264
|
+
levels?: number;
|
|
265
|
+
/** Whether to keep position on stop */
|
|
266
|
+
keepPosition?: boolean;
|
|
267
|
+
}
|
|
268
|
+
/** DCA executor config */
|
|
269
|
+
export interface HummingbotDCAExecutorConfig extends HummingbotExecutorConfig {
|
|
270
|
+
executorType: 'dca_executor';
|
|
271
|
+
/** Trade side: 1=BUY, 2=SELL */
|
|
272
|
+
side: 1 | 2;
|
|
273
|
+
/** Amounts per level in quote currency */
|
|
274
|
+
amountsQuote: number[];
|
|
275
|
+
/** Price intervals between DCA levels (as percentages) */
|
|
276
|
+
priceIntervals?: number[];
|
|
277
|
+
/** Time between DCA orders in seconds */
|
|
278
|
+
timeBetweenOrders?: number;
|
|
279
|
+
/** Stop loss percentage */
|
|
280
|
+
stopLoss?: number;
|
|
281
|
+
/** Take profit percentage */
|
|
282
|
+
takeProfit?: number;
|
|
283
|
+
}
|
|
284
|
+
/** Order executor config */
|
|
285
|
+
export interface HummingbotOrderExecutorConfig extends HummingbotExecutorConfig {
|
|
286
|
+
executorType: 'order_executor';
|
|
287
|
+
/** Trade side: 1=BUY, 2=SELL */
|
|
288
|
+
side: 1 | 2;
|
|
289
|
+
/** Amount (base currency, or '$100' for USD) */
|
|
290
|
+
amount: string;
|
|
291
|
+
/** Execution strategy: MARKET, LIMIT, LIMIT_MAKER, LIMIT_CHASER */
|
|
292
|
+
executionStrategy?: string;
|
|
293
|
+
/** Price for limit orders */
|
|
294
|
+
price?: number;
|
|
295
|
+
}
|
|
296
|
+
export interface HummingbotExecutorInfo {
|
|
297
|
+
/** Executor ID */
|
|
298
|
+
executorId: string;
|
|
299
|
+
/** Executor type */
|
|
300
|
+
executorType: HummingbotExecutorType;
|
|
301
|
+
/** Trading pair */
|
|
302
|
+
tradingPair: string;
|
|
303
|
+
/** Status */
|
|
304
|
+
status: HummingbotExecutorStatus;
|
|
305
|
+
/** Connector name */
|
|
306
|
+
connectorName: string;
|
|
307
|
+
/** Account name */
|
|
308
|
+
accountName: string;
|
|
309
|
+
/** PnL in quote currency */
|
|
310
|
+
pnlQuote?: number;
|
|
311
|
+
/** PnL percentage */
|
|
312
|
+
pnlPct?: number;
|
|
313
|
+
/** Volume traded */
|
|
314
|
+
volumeTraded?: number;
|
|
315
|
+
/** Creation timestamp */
|
|
316
|
+
createdAt?: number;
|
|
317
|
+
/** Termination timestamp */
|
|
318
|
+
terminatedAt?: number;
|
|
319
|
+
/** Raw config */
|
|
320
|
+
config?: Record<string, unknown>;
|
|
321
|
+
}
|
|
322
|
+
export interface HummingbotManageExecutorsRequest {
|
|
323
|
+
/** Action to perform */
|
|
324
|
+
action?: 'create' | 'search' | 'stop' | 'get_logs' | 'get_preferences' | 'save_preferences' | 'reset_preferences' | 'positions_summary' | 'clear_position';
|
|
325
|
+
/** Executor type (for schema discovery or creation) */
|
|
326
|
+
executorType?: HummingbotExecutorType;
|
|
327
|
+
/** Config for creation */
|
|
328
|
+
executorConfig?: HummingbotExecutorConfig;
|
|
329
|
+
/** Executor ID for stop/logs */
|
|
330
|
+
executorId?: string;
|
|
331
|
+
/** Log level filter */
|
|
332
|
+
logLevel?: 'ERROR' | 'WARNING' | 'INFO' | 'DEBUG';
|
|
333
|
+
/** Filter by account names */
|
|
334
|
+
accountNames?: string[];
|
|
335
|
+
/** Filter by connector names */
|
|
336
|
+
connectorNames?: string[];
|
|
337
|
+
/** Filter by trading pairs */
|
|
338
|
+
tradingPairs?: string[];
|
|
339
|
+
/** Filter by executor types */
|
|
340
|
+
executorTypes?: HummingbotExecutorType[];
|
|
341
|
+
/** Filter by status */
|
|
342
|
+
status?: HummingbotExecutorStatus;
|
|
343
|
+
/** Pagination cursor */
|
|
344
|
+
cursor?: string;
|
|
345
|
+
/** Max results */
|
|
346
|
+
limit?: number;
|
|
347
|
+
/** Keep position when stopping */
|
|
348
|
+
keepPosition?: boolean;
|
|
349
|
+
/** Save config as default */
|
|
350
|
+
saveAsDefault?: boolean;
|
|
351
|
+
/** Preferences markdown content */
|
|
352
|
+
preferencesContent?: string;
|
|
353
|
+
/** Account name for creation */
|
|
354
|
+
accountName?: string;
|
|
355
|
+
/** Connector name for position filtering */
|
|
356
|
+
connectorName?: string;
|
|
357
|
+
/** Trading pair for position filtering */
|
|
358
|
+
tradingPair?: string;
|
|
359
|
+
}
|
|
360
|
+
export type HummingbotMarketDataType = 'prices' | 'candles' | 'funding_rate' | 'order_book';
|
|
361
|
+
export type HummingbotCandleInterval = '1m' | '5m' | '15m' | '30m' | '1h' | '4h' | '1d';
|
|
362
|
+
export interface HummingbotPriceData {
|
|
363
|
+
/** Trading pair */
|
|
364
|
+
tradingPair: string;
|
|
365
|
+
/** Mid price */
|
|
366
|
+
midPrice: number;
|
|
367
|
+
/** Best ask */
|
|
368
|
+
bestAsk: number;
|
|
369
|
+
/** Best bid */
|
|
370
|
+
bestBid: number;
|
|
371
|
+
/** Timestamp */
|
|
372
|
+
timestamp: string;
|
|
373
|
+
}
|
|
374
|
+
export interface HummingbotCandle {
|
|
375
|
+
/** Timestamp */
|
|
376
|
+
timestamp: string;
|
|
377
|
+
/** Open price */
|
|
378
|
+
open: number;
|
|
379
|
+
/** High price */
|
|
380
|
+
high: number;
|
|
381
|
+
/** Low price */
|
|
382
|
+
low: number;
|
|
383
|
+
/** Close price */
|
|
384
|
+
close: number;
|
|
385
|
+
/** Volume */
|
|
386
|
+
volume: number;
|
|
387
|
+
}
|
|
388
|
+
export interface HummingbotCandlesResponse {
|
|
389
|
+
/** Connector name */
|
|
390
|
+
connectorName: string;
|
|
391
|
+
/** Trading pair */
|
|
392
|
+
tradingPair: string;
|
|
393
|
+
/** Candle interval */
|
|
394
|
+
interval: HummingbotCandleInterval;
|
|
395
|
+
/** Total candles */
|
|
396
|
+
totalCandles: number;
|
|
397
|
+
/** Candle data */
|
|
398
|
+
candles: HummingbotCandle[];
|
|
399
|
+
/** Raw formatted table */
|
|
400
|
+
candlesTable: string;
|
|
401
|
+
}
|
|
402
|
+
export interface HummingbotFundingRate {
|
|
403
|
+
/** Trading pair */
|
|
404
|
+
tradingPair: string;
|
|
405
|
+
/** Connector name */
|
|
406
|
+
connectorName: string;
|
|
407
|
+
/** Funding rate percentage */
|
|
408
|
+
fundingRatePct: number;
|
|
409
|
+
/** Mark price */
|
|
410
|
+
markPrice: number;
|
|
411
|
+
/** Index price */
|
|
412
|
+
indexPrice: number;
|
|
413
|
+
/** Next funding time */
|
|
414
|
+
nextFundingTime: string;
|
|
415
|
+
}
|
|
416
|
+
export type HummingbotOrderBookQueryType = 'snapshot' | 'volume_for_price' | 'price_for_volume' | 'quote_volume_for_price' | 'price_for_quote_volume';
|
|
417
|
+
export interface HummingbotOrderBookLevel {
|
|
418
|
+
/** Price */
|
|
419
|
+
price: number;
|
|
420
|
+
/** Amount */
|
|
421
|
+
amount: number;
|
|
422
|
+
/** Cumulative amount */
|
|
423
|
+
cumulativeAmount?: number;
|
|
424
|
+
}
|
|
425
|
+
export interface HummingbotOrderBookSnapshot {
|
|
426
|
+
/** Trading pair */
|
|
427
|
+
tradingPair: string;
|
|
428
|
+
/** Connector name */
|
|
429
|
+
connectorName: string;
|
|
430
|
+
/** Timestamp */
|
|
431
|
+
timestamp: string;
|
|
432
|
+
/** Bids */
|
|
433
|
+
bids: HummingbotOrderBookLevel[];
|
|
434
|
+
/** Asks */
|
|
435
|
+
asks: HummingbotOrderBookLevel[];
|
|
436
|
+
}
|
|
437
|
+
export interface HummingbotMarketDataRequest {
|
|
438
|
+
/** Data type */
|
|
439
|
+
dataType: HummingbotMarketDataType;
|
|
440
|
+
/** Connector name */
|
|
441
|
+
connectorName: string;
|
|
442
|
+
/** Trading pairs (for 'prices') */
|
|
443
|
+
tradingPairs?: string[];
|
|
444
|
+
/** Trading pair (for candles, funding, order book) */
|
|
445
|
+
tradingPair?: string;
|
|
446
|
+
/** Candle interval */
|
|
447
|
+
interval?: HummingbotCandleInterval;
|
|
448
|
+
/** Days of historical data */
|
|
449
|
+
days?: number;
|
|
450
|
+
/** Order book query type */
|
|
451
|
+
queryType?: HummingbotOrderBookQueryType;
|
|
452
|
+
/** Order book query value */
|
|
453
|
+
queryValue?: number;
|
|
454
|
+
/** Order book side */
|
|
455
|
+
isBuy?: boolean;
|
|
456
|
+
}
|
|
457
|
+
export type HummingbotControllerType = 'directional_trading' | 'market_making' | 'generic';
|
|
458
|
+
export interface HummingbotControllerInfo {
|
|
459
|
+
/** Controller name */
|
|
460
|
+
name: string;
|
|
461
|
+
/** Controller type */
|
|
462
|
+
type: HummingbotControllerType;
|
|
463
|
+
/** Description */
|
|
464
|
+
description?: string;
|
|
465
|
+
/** Source code */
|
|
466
|
+
code?: string;
|
|
467
|
+
/** Number of configs */
|
|
468
|
+
configCount?: number;
|
|
469
|
+
}
|
|
470
|
+
export interface HummingbotControllerConfig {
|
|
471
|
+
/** Config name */
|
|
472
|
+
name: string;
|
|
473
|
+
/** Controller name */
|
|
474
|
+
controllerName: string;
|
|
475
|
+
/** Controller type */
|
|
476
|
+
controllerType: HummingbotControllerType;
|
|
477
|
+
/** Config data */
|
|
478
|
+
data: Record<string, unknown>;
|
|
479
|
+
}
|
|
480
|
+
export interface HummingbotBotInfo {
|
|
481
|
+
/** Bot name */
|
|
482
|
+
name: string;
|
|
483
|
+
/** Bot status */
|
|
484
|
+
status: string;
|
|
485
|
+
/** Controllers */
|
|
486
|
+
controllers: string[];
|
|
487
|
+
/** Account name */
|
|
488
|
+
accountName: string;
|
|
489
|
+
/** Uptime */
|
|
490
|
+
uptime?: string;
|
|
491
|
+
/** PnL */
|
|
492
|
+
pnl?: number;
|
|
493
|
+
}
|
|
494
|
+
export interface HummingbotBotDeployRequest {
|
|
495
|
+
/** Bot name */
|
|
496
|
+
botName: string;
|
|
497
|
+
/** Controller config names */
|
|
498
|
+
controllersConfig: string[];
|
|
499
|
+
/** Account name */
|
|
500
|
+
accountName?: string;
|
|
501
|
+
/** Max global drawdown in quote currency */
|
|
502
|
+
maxGlobalDrawdownQuote?: number;
|
|
503
|
+
/** Max per-controller drawdown */
|
|
504
|
+
maxControllerDrawdownQuote?: number;
|
|
505
|
+
/** Docker image */
|
|
506
|
+
image?: string;
|
|
507
|
+
}
|
|
508
|
+
export interface HummingbotBotLogsRequest {
|
|
509
|
+
/** Bot name */
|
|
510
|
+
botName: string;
|
|
511
|
+
/** Log type filter */
|
|
512
|
+
logType?: 'error' | 'general' | 'all';
|
|
513
|
+
/** Max entries */
|
|
514
|
+
limit?: number;
|
|
515
|
+
/** Search term */
|
|
516
|
+
searchTerm?: string;
|
|
517
|
+
}
|
|
518
|
+
export interface HummingbotGatewayStatus {
|
|
519
|
+
/** Whether Gateway is running */
|
|
520
|
+
running: boolean;
|
|
521
|
+
/** Container ID */
|
|
522
|
+
containerId?: string;
|
|
523
|
+
/** Status message */
|
|
524
|
+
status: string;
|
|
525
|
+
}
|
|
526
|
+
export interface HummingbotGatewayStartConfig {
|
|
527
|
+
/** Gateway passphrase */
|
|
528
|
+
passphrase: string;
|
|
529
|
+
/** Docker image */
|
|
530
|
+
image: string;
|
|
531
|
+
/** Port (default: 15888) */
|
|
532
|
+
port?: number;
|
|
533
|
+
/** Environment variables */
|
|
534
|
+
environment?: Record<string, string>;
|
|
535
|
+
}
|
|
536
|
+
export interface HummingbotGatewaySwapRequest {
|
|
537
|
+
/** Action */
|
|
538
|
+
action: 'quote' | 'execute' | 'search' | 'get_status';
|
|
539
|
+
/** DEX connector name (e.g. 'jupiter', '0x') */
|
|
540
|
+
connector?: string;
|
|
541
|
+
/** Network ID (e.g. 'solana-mainnet-beta') */
|
|
542
|
+
network?: string;
|
|
543
|
+
/** Trading pair */
|
|
544
|
+
tradingPair?: string;
|
|
545
|
+
/** Trade side */
|
|
546
|
+
side?: 'BUY' | 'SELL';
|
|
547
|
+
/** Amount */
|
|
548
|
+
amount?: string;
|
|
549
|
+
/** Slippage percentage */
|
|
550
|
+
slippagePct?: string;
|
|
551
|
+
/** Wallet address */
|
|
552
|
+
walletAddress?: string;
|
|
553
|
+
/** Tx hash for status check */
|
|
554
|
+
transactionHash?: string;
|
|
555
|
+
}
|
|
556
|
+
export interface HummingbotGatewaySwapQuote {
|
|
557
|
+
/** Expected price */
|
|
558
|
+
price: number;
|
|
559
|
+
/** Expected output amount */
|
|
560
|
+
expectedAmount: string;
|
|
561
|
+
/** Gas estimate */
|
|
562
|
+
gasEstimate?: number;
|
|
563
|
+
/** Network */
|
|
564
|
+
network: string;
|
|
565
|
+
/** Connector */
|
|
566
|
+
connector: string;
|
|
567
|
+
}
|
|
568
|
+
export interface HummingbotGatewayCLMMRequest {
|
|
569
|
+
/** Action */
|
|
570
|
+
action: 'list_pools' | 'get_pool_info' | 'open_position' | 'close_position' | 'collect_fees' | 'get_positions';
|
|
571
|
+
/** CLMM connector name */
|
|
572
|
+
connector?: string;
|
|
573
|
+
/** Network ID */
|
|
574
|
+
network?: string;
|
|
575
|
+
/** Pool address */
|
|
576
|
+
poolAddress?: string;
|
|
577
|
+
/** Position address */
|
|
578
|
+
positionAddress?: string;
|
|
579
|
+
/** Pagination page */
|
|
580
|
+
page?: number;
|
|
581
|
+
/** Results limit */
|
|
582
|
+
limit?: number;
|
|
583
|
+
/** Search term */
|
|
584
|
+
searchTerm?: string;
|
|
585
|
+
/** Sort key */
|
|
586
|
+
sortKey?: string;
|
|
587
|
+
/** Sort order */
|
|
588
|
+
orderBy?: 'asc' | 'desc';
|
|
589
|
+
/** Wallet address */
|
|
590
|
+
walletAddress?: string;
|
|
591
|
+
/** Lower price for open_position */
|
|
592
|
+
lowerPrice?: string;
|
|
593
|
+
/** Upper price for open_position */
|
|
594
|
+
upperPrice?: string;
|
|
595
|
+
/** Base token amount */
|
|
596
|
+
baseTokenAmount?: string;
|
|
597
|
+
/** Quote token amount */
|
|
598
|
+
quoteTokenAmount?: string;
|
|
599
|
+
/** Slippage */
|
|
600
|
+
slippagePct?: string;
|
|
601
|
+
}
|
|
602
|
+
export interface HummingbotCLMMPool {
|
|
603
|
+
/** Pool address */
|
|
604
|
+
address: string;
|
|
605
|
+
/** Base token */
|
|
606
|
+
baseToken: string;
|
|
607
|
+
/** Quote token */
|
|
608
|
+
quoteToken: string;
|
|
609
|
+
/** Fee rate */
|
|
610
|
+
feeRate: number;
|
|
611
|
+
/** TVL in USD */
|
|
612
|
+
tvlUsd: number;
|
|
613
|
+
/** 24h volume in USD */
|
|
614
|
+
volume24hUsd: number;
|
|
615
|
+
/** Current price */
|
|
616
|
+
price: number;
|
|
617
|
+
}
|
|
618
|
+
export type HummingbotHistoryDataType = 'orders' | 'perp_positions' | 'clmm_positions';
|
|
619
|
+
export interface HummingbotHistorySearchRequest {
|
|
620
|
+
/** Data type to search */
|
|
621
|
+
dataType: HummingbotHistoryDataType;
|
|
622
|
+
/** Filter by account names */
|
|
623
|
+
accountNames?: string[];
|
|
624
|
+
/** Filter by connector names */
|
|
625
|
+
connectorNames?: string[];
|
|
626
|
+
/** Filter by trading pairs */
|
|
627
|
+
tradingPairs?: string[];
|
|
628
|
+
/** Filter by status */
|
|
629
|
+
status?: string;
|
|
630
|
+
/** Start timestamp (seconds) */
|
|
631
|
+
startTime?: number;
|
|
632
|
+
/** End timestamp (seconds) */
|
|
633
|
+
endTime?: number;
|
|
634
|
+
/** Max results */
|
|
635
|
+
limit?: number;
|
|
636
|
+
/** Pagination offset */
|
|
637
|
+
offset?: number;
|
|
638
|
+
/** Network filter (CLMM only) */
|
|
639
|
+
network?: string;
|
|
640
|
+
/** Wallet address filter (CLMM only) */
|
|
641
|
+
walletAddress?: string;
|
|
642
|
+
/** Position addresses (CLMM only) */
|
|
643
|
+
positionAddresses?: string[];
|
|
644
|
+
}
|
|
645
|
+
export interface HummingbotHistoricalOrder {
|
|
646
|
+
/** Order ID */
|
|
647
|
+
orderId: string;
|
|
648
|
+
/** Trading pair */
|
|
649
|
+
tradingPair: string;
|
|
650
|
+
/** Order type */
|
|
651
|
+
orderType: string;
|
|
652
|
+
/** Trade side */
|
|
653
|
+
side: string;
|
|
654
|
+
/** Amount */
|
|
655
|
+
amount: number;
|
|
656
|
+
/** Price */
|
|
657
|
+
price: number;
|
|
658
|
+
/** Filled amount */
|
|
659
|
+
filledAmount: number;
|
|
660
|
+
/** Status */
|
|
661
|
+
status: string;
|
|
662
|
+
/** Connector name */
|
|
663
|
+
connector: string;
|
|
664
|
+
/** Account name */
|
|
665
|
+
account: string;
|
|
666
|
+
/** Creation timestamp */
|
|
667
|
+
createdAt: number;
|
|
668
|
+
/** Update timestamp */
|
|
669
|
+
updatedAt: number;
|
|
670
|
+
}
|
|
671
|
+
export type HummingbotStrategyTemplate = 'clawnch_initial_liquidity' | 'clawnch_post_launch_mm' | 'clawnch_fee_optimization' | 'clawnch_accumulation' | 'pure_market_making' | 'avellaneda_market_making' | 'grid_trading' | 'dca_buying' | 'twap_execution';
|
|
672
|
+
export interface HummingbotStrategyTemplateConfig {
|
|
673
|
+
/** Template name */
|
|
674
|
+
template: HummingbotStrategyTemplate;
|
|
675
|
+
/** Template description */
|
|
676
|
+
description: string;
|
|
677
|
+
/** Executor type used */
|
|
678
|
+
executorType: HummingbotExecutorType;
|
|
679
|
+
/** Pre-configured parameters */
|
|
680
|
+
defaultConfig: Record<string, unknown>;
|
|
681
|
+
/** Parameters that should be customized */
|
|
682
|
+
requiredOverrides: string[];
|
|
683
|
+
}
|
|
684
|
+
export interface HummingbotDockerInstance {
|
|
685
|
+
/** Container name */
|
|
686
|
+
name: string;
|
|
687
|
+
/** Container status */
|
|
688
|
+
status: string;
|
|
689
|
+
/** Creation time */
|
|
690
|
+
created: string;
|
|
691
|
+
}
|
|
692
|
+
export interface HummingbotDockerPrerequisites {
|
|
693
|
+
/** Docker available */
|
|
694
|
+
docker: boolean;
|
|
695
|
+
/** Hummingbot image installed */
|
|
696
|
+
image: boolean;
|
|
697
|
+
/** Hummingbot MCP server running */
|
|
698
|
+
mcp: boolean;
|
|
699
|
+
/** Hummingbot API server running */
|
|
700
|
+
api: boolean;
|
|
701
|
+
}
|
|
702
|
+
//# sourceMappingURL=hummingbot-types.d.ts.map
|