Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Haehnchen/crypto-trading-bot
/ functions
Functions
500 in github.com/Haehnchen/crypto-trading-bot
⨍
Functions
500
◇
Types & classes
267
↓ 52 callers
Method
log
(info: LogInfo, callback: () => void)
src/utils/winston_sqlite_transport.ts:33
↓ 49 callers
Method
get
* Get a value from cache
src/utils/file_cache.ts:33
↓ 47 callers
Method
execute
(context: TypedStrategyContext<TIndicators>, signal: StrategySignal)
src/strategy/strategy.ts:201
↓ 35 callers
Method
getOptions
()
src/strategy/strategy.ts:202
↓ 32 callers
Function
createIndicator
(name: K, options: IndicatorOptions<K> = {})
src/strategy/strategy.ts:136
↓ 27 callers
Method
debugAll
(values: Record<string, any>)
src/strategy/strategy.ts:189
↓ 18 callers
Method
getConfig
()
src/modules/services.ts:179
↓ 18 callers
Method
getIndicatorSlice
(key: K, count: number)
src/strategy/strategy.ts:174
↓ 17 callers
Method
set
* Set a value in cache with TTL in seconds * @throws Error if value contains non-JSON-serializable types (Map, Set, etc.)
src/utils/file_cache.ts:52
↓ 15 callers
Method
all
(parameters?: any)
src/repository/candlestick_repository.ts:10
↓ 15 callers
Function
createOrderService
Create OrderService with mocked logger
test/profile/profile_order_service.test.ts:42
↓ 15 callers
Method
getProfile
(id: string)
src/profile/profile_service.ts:35
↓ 14 callers
Method
defineIndicators
()
src/strategy/strategy.ts:200
↓ 14 callers
Method
getDescription
()
src/strategy/strategy.ts:199
↓ 14 callers
Method
prepare
(sql: string)
src/repository/candlestick_repository.ts:5
↓ 13 callers
Method
getProfiles
()
src/profile/profile_service.ts:31
↓ 13 callers
Method
registerRoutes
(router: express.Router)
src/controller/base_controller.ts:4
↓ 12 callers
Method
close
()
src/strategy/strategy.ts:188
↓ 12 callers
Method
goLong
()
src/strategy/strategy.ts:186
↓ 12 callers
Method
nullIfEmpty
(value: string | undefined)
src/controller/settings_controller.ts:160
↓ 11 callers
Function
calculateIndicators
( candles: Candlestick[], definitions: T )
src/modules/strategy/v2/indicator_calculator.ts:24
↓ 11 callers
Function
closePosition
( exchange: ccxt.Exchange, symbol: string, type: 'limit' | 'market' )
src/profile/profile_order_service.ts:305
↓ 11 callers
Function
stubPositions
Stub fetchPositions directly on the exchange instance (avoids ts-mockito matcher-stack skew)
test/profile/profile_order_service.test.ts:32
↓ 10 callers
Function
convertPeriodToMinute
(period: string)
src/utils/resample.ts:89
↓ 10 callers
Method
createStrategy
* Create a strategy instance by name with options * Loads fresh from var/strategies if not a built-in strategy
src/modules/strategy/v2/strategy_registry.ts:217
↓ 10 callers
Method
getLogger
()
src/modules/services.ts:163
↓ 9 callers
Function
executeSimpleTalib
* Execute a simple talib indicator that returns a single array of values
src/utils/indicators.ts:202
↓ 9 callers
Method
getExchangeForProfile
* Get a cached exchange instance by profile ID (1-hour TTL).
src/profile/profile_service.ts:135
↓ 9 callers
Method
getIndicator
(key: K)
src/strategy/strategy.ts:164
↓ 9 callers
Method
goShort
()
src/strategy/strategy.ts:187
↓ 9 callers
Method
placeLimitOrder
* Places a limit order on the exchange
src/profile/profile_order_service.ts:54
↓ 9 callers
Method
readConfig
()
src/modules/system/config_service.ts:124
↓ 9 callers
Method
send
(message: string)
src/notify/notify.ts:2
↓ 8 callers
Method
fetchTicker
* Fetch ticker/market data for a pair using authenticated exchange
src/profile/profile_service.ts:146
↓ 8 callers
Method
getDesks
()
src/modules/system/desk_service.ts:6
↓ 8 callers
Function
mockExchange
Build a non-Bybit exchange mock with a given id
test/profile/profile_order_service.test.ts:16
↓ 8 callers
Method
placeMarketOrder
* Places a market order on the exchange * If isQuoteCurrency is true, converts quote amount to base amount first
src/profile/profile_order_service.ts:114
↓ 8 callers
Function
roundAmountDown
(value: number, precision: number | undefined)
src/profile/profile_order_service.ts:39
↓ 8 callers
Function
talibExecute
* Execute talib synchronously (talib now supports sync calls)
src/utils/indicators.ts:123
↓ 7 callers
Method
getDatabase
()
src/modules/services.ts:157
↓ 7 callers
Method
run
(parameters?: any)
src/repository/candlestick_repository.ts:11
↓ 6 callers
Method
getCcxtCandleWatchService
()
src/modules/services.ts:185
↓ 6 callers
Method
getSystemUtil
()
src/modules/services.ts:167
↓ 6 callers
Method
isFlat
()
src/strategy/strategy.ts:162
↓ 6 callers
Method
saveProfiles
(profiles: Profile[])
src/modules/system/config_service.ts:185
↓ 5 callers
Method
fetchOpenOrders
* Fetch open orders for a profile/pair
src/profile/profile_service.ts:163
↓ 5 callers
Method
getAllPairs
* Get all pairs for a list of profiles with caching per exchange
src/modules/profile_pair_service.ts:74
↓ 5 callers
Method
getProfileService
()
src/modules/services.ts:198
↓ 5 callers
Method
getStrategyClass
* Find a strategy class by name (loads fresh from file if not built-in)
src/modules/strategy/v2/strategy_registry.ts:196
↓ 5 callers
Function
getTechnicalIndicators
()
src/utils/indicators.ts:70
↓ 5 callers
Function
pluck
(result: any[], key: string)
test/modules/strategy/v2/indicator_calculator.test.ts:250
↓ 5 callers
Method
stripHtml
(html: string)
src/modules/system/symbol_search_service.ts:57
↓ 4 callers
Method
assetVersion
()
src/controller/base_controller.ts:12
↓ 4 callers
Method
enqueue
(jobs: PrefillJob[])
src/modules/system/ccxt_candle_prefill_service.ts:23
↓ 4 callers
Function
executeCandleTalib
* Execute a candle-based talib indicator that returns a single array of values
src/utils/indicators.ts:216
↓ 4 callers
Method
getAllStrategyInfo
* Get info for all strategies (discovers from var/strategies each time)
src/modules/strategy/v2/strategy_registry.ts:238
↓ 4 callers
Method
getBotSettings
()
src/modules/system/config_service.ts:206
↓ 4 callers
Method
getCandlestickRepository
()
src/modules/services.ts:161
↓ 4 callers
Method
getExchangeInstanceService
()
src/modules/services.ts:197
↓ 4 callers
Method
getPublicExchange
* Returns a cached public (unauthenticated) exchange instance with markets already loaded. * Creates a new instance on first call or after the 1-ho
src/modules/system/exchange_instance_service.ts:26
↓ 4 callers
Method
getStrategyId
* Get strategy identifier from class
src/modules/strategy/v2/strategy_registry.ts:180
↓ 4 callers
Method
insertCandles
(candles: ExchangeCandlestick[])
src/modules/system/candle_importer.ts:39
↓ 4 callers
Method
key
([exchange, symbol, period]: PrefillJob)
src/modules/system/ccxt_candle_prefill_service.ts:40
↓ 4 callers
Method
restart
* Called when dashboard settings are saved. Stops old subscriptions and * starts new ones reflecting the updated pairs/periods configuration.
src/modules/system/ccxt_candle_watch_service.ts:92
↓ 4 callers
Function
roundToPrecision
(value: number, precision: number | undefined)
src/profile/profile_order_service.ts:31
↓ 4 callers
Method
writeConfig
(config: Config)
src/modules/system/config_service.ts:136
↓ 3 callers
Function
buildTradingViewSymbol
(exchange: string, pair: string)
src/utils/tradingview_util.ts:5
↓ 3 callers
Function
calcPercent
(value: number, total: number)
src/utils/indicators.ts:865
↓ 3 callers
Function
calculateBollingerBandsPadded
* Calculate BB (padded version - what we expect)
test/modules/strategy/v2/indicator_calculator.test.ts:29
↓ 3 callers
Function
calculateHmaPadded
* Calculate HMA (padded version)
test/modules/strategy/v2/indicator_calculator.test.ts:78
↓ 3 callers
Function
calculateWMA
* Simple WMA helper for custom indicators (HMA)
src/utils/indicators.ts:324
↓ 3 callers
Function
draw
()
web/static/js/backtest.js:257
↓ 3 callers
Method
fetchClosedOrders
* Fetch closed/filled orders for a profile
src/profile/profile_service.ts:171
↓ 3 callers
Method
getCandleImporter
()
src/modules/services.ts:159
↓ 3 callers
Method
getDashboardConfigService
()
src/modules/services.ts:183
↓ 3 callers
Function
getMaTypeFromString
(maType: string)
src/utils/indicators.ts:628
↓ 3 callers
Method
getProfilePairService
()
src/modules/services.ts:199
↓ 3 callers
Method
getProfiles
()
src/modules/system/config_service.ts:180
↓ 3 callers
Method
getSupportedExchanges
()
src/profile/profile_service.ts:125
↓ 3 callers
Method
getV2StrategyRegistry
()
src/modules/services.ts:202
↓ 3 callers
Method
isValidCandleStickLookback
(lookbackNewestFirst: CandlestickLookback[], period: string)
src/utils/technical_analysis_validator.ts:8
↓ 3 callers
Method
isValidStrategy
* Check if a strategy name is valid
src/modules/strategy/v2/strategy_registry.ts:226
↓ 3 callers
Method
memoryUsage
()
src/controller/base_controller.ts:14
↓ 3 callers
Function
mockBybit
Build a Bybit exchange mock (id contains 'bybit')
test/profile/profile_order_service.test.ts:24
↓ 3 callers
Method
placeOrder
* Place an order (limit or market)
src/profile/profile_service.ts:191
↓ 3 callers
Function
resampleMinutes
(lookbackNewestFirst: Candlestick[], minutes: number)
src/utils/resample.ts:19
↓ 3 callers
Method
saveDesks
(desks: Desk[])
src/modules/system/desk_service.ts:14
↓ 3 callers
Function
wma
(data: number[], p: number)
test/modules/strategy/v2/indicator_calculator.test.ts:83
↓ 2 callers
Method
add
(promise: () => Promise<any>)
src/utils/queue.ts:28
↓ 2 callers
Function
calcPercent
(v: number, t: number)
test/utils/indicators.test.ts:373
↓ 2 callers
Function
calculateSMA
* Simple SMA helper for custom indicators
src/utils/indicators.ts:309
↓ 2 callers
Function
calculateSmaPadded
* Calculate SMA (padded version)
test/modules/strategy/v2/indicator_calculator.test.ts:58
↓ 2 callers
Method
cancelOrder
(req: express.Request, res: express.Response)
src/controller/profile_controller.ts:173
↓ 2 callers
Function
candles2MarketData
( candles: CandleSource, length: number = 1000, keys: string[] = ['open', 'close', 'high', 'low', 'volum
src/utils/indicators.ts:77
↓ 2 callers
Method
cleanOldLogEntries
(days: number = 7)
src/repository/logs_repository.ts:39
↓ 2 callers
Method
combinedCandles
( candlesAwait: Promise<Candlestick[]>, mainExchange: string, symbol: string, period: string,
src/modules/exchange/exchange_candle_combine.ts:48
↓ 2 callers
Function
createCandleFixtures
* Test fixture: BTC/USD 5m candles
test/modules/strategy/v2/indicator_calculator.test.ts:20
↓ 2 callers
Function
createCandleFixtures
()
test/utils/resample.test.ts:92
↓ 2 callers
Method
discoverStrategyFiles
* Discover all strategy files in var/strategies directory * Returns array of {name, filePath}
src/modules/strategy/v2/strategy_registry.ts:95
↓ 2 callers
Method
enqueuePrefill
()
src/controller/dashboard_settings_controller.ts:100
next →
1–100 of 500, ranked by callers