MCPcopy Create free account

hub / github.com/MarilynClarke/Hyperliquid-Copy-Trading-Bot / functions

Functions71 in github.com/MarilynClarke/Hyperliquid-Copy-Trading-Bot

↓ 24 callersMethodformatError
* Format error for logging
src/utils/errors.ts:170
↓ 9 callersFunctionsendErrorNotification
( error: string | Error, context?: Record<string, unknown> )
src/notifications/telegram.ts:137
↓ 8 callersFunctionisTelegramEnabled
* Check if Telegram is enabled and bot is ready
src/notifications/telegram.ts:43
↓ 7 callersMethodwrapError
* Wrap unknown error into AppError
src/utils/errors.ts:194
↓ 5 callersMethodgetAccountEquity
* Get account equity information
src/hyperliquidClient.ts:113
↓ 4 callersMethodgetErrorMessage
* Extract error message safely
src/utils/errors.ts:134
↓ 4 callersMethodgetPositions
* Get open positions for an address
src/hyperliquidClient.ts:155
↓ 3 callersMethodcheckHealth
* Perform health check
src/utils/healthCheck.ts:72
↓ 3 callersMethodisRetryable
* Check if error is retryable
src/utils/errors.ts:113
↓ 3 callersFunctionretryWithBackoff
( fn: () => Promise<T>, config: RetryConfig = DEFAULT_RETRY_CONFIG, onRetry?: (error: unknown, attempt:
src/utils/errors.ts:239
↓ 3 callersFunctionshutdown
(signal: string)
src/index.ts:95
↓ 2 callersMethodgetAddress
* Get our wallet address
src/hyperliquidClient.ts:485
↓ 2 callersMethodstop
* Stop monitoring
src/copyTrader.ts:64
↓ 2 callersMethodsubscribeToUserFills
* Subscribe to user fills via WebSocket * Returns unsubscribe function
src/hyperliquidClient.ts:311
↓ 1 callersFunctioncalculatePositionSize
( targetSize: number, ourEquity: number, targetEquity: number )
src/utils/risk.ts:55
↓ 1 callersMethodcalculateTradeParams
* Calculate trade parameters for copying
src/copyTrader.ts:237
↓ 1 callersFunctioncapLeverage
(leverage: number)
src/utils/risk.ts:36
↓ 1 callersFunctioncapPositionSize
( calculatedSize: number, ourEquity: number )
src/utils/risk.ts:43
↓ 1 callersMethodcheckHealthPublic
* Perform health check (public method)
src/utils/healthCheck.ts:175
↓ 1 callersFunctioncleanupTelegramBot
()
src/notifications/telegram.ts:306
↓ 1 callersMethodexecuteTrade
* Execute trade with retry logic
src/copyTrader.ts:318
↓ 1 callersMethodgetErrorCode
* Extract error code
src/utils/errors.ts:150
↓ 1 callersMethodgetErrorContext
* Extract error context
src/utils/errors.ts:160
↓ 1 callersFunctiongetTradeAction
(fill: FillEvent)
src/utils/risk.ts:85
↓ 1 callersMethodhandleFill
* Handle incoming fill event from target wallet
src/copyTrader.ts:75
↓ 1 callersFunctioninitTelegramBot
()
src/notifications/telegram.ts:17
↓ 1 callersMethodinitialize
* Initialize SDK clients (call after SDK is loaded)
src/hyperliquidClient.ts:91
↓ 1 callersFunctionisAssetBlocked
(coin: string)
src/utils/risk.ts:20
↓ 1 callersFunctionloadConfig
()
src/config.ts:83
↓ 1 callersFunctionloadSDK
()
src/hyperliquidClient.ts:37
↓ 1 callersFunctionmain
* Main application entry point
src/index.ts:26
↓ 1 callersFunctionmeetsMinimumNotional
(size: string, price: string)
src/utils/risk.ts:28
↓ 1 callersMethodplaceOrder
* Place an order * Returns order ID or throws error
src/hyperliquidClient.ts:209
↓ 1 callersMethodreconnect
* Reconnect WebSocket with exponential backoff
src/hyperliquidClient.ts:453
↓ 1 callersFunctionremoveTrailingZeros
(value: string)
src/utils/risk.ts:13
↓ 1 callersFunctionsendHealthCheckNotification
( healthCheck: HealthCheckResult )
src/notifications/telegram.ts:173
↓ 1 callersMethodsendNotification
* Send notification (Telegram, etc.)
src/copyTrader.ts:389
↓ 1 callersFunctionsendShutdownNotification
()
src/notifications/telegram.ts:75
↓ 1 callersFunctionsendStartupNotification
()
src/notifications/telegram.ts:50
↓ 1 callersFunctionsendTradeNotification
( fill: FillEvent, params: CopyTradeParams, result: TradeResult )
src/notifications/telegram.ts:93
↓ 1 callersMethodstart
* Start monitoring target wallet and copying trades
src/copyTrader.ts:45
↓ 1 callersMethodstart
* Start periodic health checks
src/utils/healthCheck.ts:32
↓ 1 callersFunctionvalidateSetup
()
scripts/validate-setup.ts:12
↓ 1 callersFunctionvalidateTradeParams
( params: CopyTradeParams, price: string, ourEquity: number )
src/utils/risk.ts:104
Functionchild
* Create a child logger with additional context
src/logger.ts:265
Methodconstructor
(client: HyperliquidClientWrapper, targetWallet: string)
src/copyTrader.ts:36
Methodconstructor
()
src/hyperliquidClient.ts:72
Methodconstructor
( client: HyperliquidClientWrapper, ourAddress: string, targetAddress: string )
src/utils/healthCheck.ts:19
Methodconstructor
( message: string, code: string, retryable = false, context?: Record<string, unknown> )
src/utils/errors.ts:13
Methodconstructor
(message: string, context?: Record<string, unknown>)
src/utils/errors.ts:32
Methodconstructor
(message: string, context?: Record<string, unknown>)
src/utils/errors.ts:41
Methodconstructor
(message: string, context?: Record<string, unknown>)
src/utils/errors.ts:50
Methodconstructor
(message: string, retryable = false, context?: Record<string, unknown>)
src/utils/errors.ts:60
Methodconstructor
(message: string, context?: Record<string, unknown>)
src/utils/errors.ts:69
Methodconstructor
(message: string, context?: Record<string, unknown>)
src/utils/errors.ts:78
Methodconstructor
(message: string, retryAfter?: number, context?: Record<string, unknown>)
src/utils/errors.ts:87
Methodconstructor
(message: string, context?: Record<string, unknown>)
src/utils/errors.ts:101
MethodgetActiveTradesCount
* Get active trades count
src/copyTrader.ts:404
MethodgetLastResult
* Get last health check result
src/utils/healthCheck.ts:58
MethodisWsConnected
* Check if WebSocket is connected
src/hyperliquidClient.ts:492
FunctionlogApiCall
* Log an API call
src/logger.ts:169
FunctionlogConfig
* Log configuration changes
src/logger.ts:247
FunctionlogHealthCheck
* Log health check results
src/logger.ts:231
FunctionlogPerformance
* Log performance metrics
src/logger.ts:200
FunctionlogTrade
* Log a trade operation
src/logger.ts:154
FunctionlogWebSocket
* Log WebSocket events
src/logger.ts:216
MethodrunHealthCheck
* Manually trigger health check and return result
src/utils/healthCheck.ts:65
FunctionsendInfoNotification
( info: string, context?: Record<string, unknown> )
src/notifications/telegram.ts:279
FunctionsendSummaryNotification
(stats: { tradesCopied: number; successfulTrades: number; failedTrades: number; activePositions: numbe
src/notifications/telegram.ts:212
FunctionsendWarningNotification
( warning: string, context?: Record<string, unknown> )
src/notifications/telegram.ts:252
Methodstop
* Stop health checks
src/utils/healthCheck.ts:47