MCPcopy Create free account

hub / github.com/JMWL66/jmwl-autotrade / functions

Functions2,334 in github.com/JMWL66/jmwl-autotrade

↓ 1,189 callersMethodErrorf
(format string, args ...any)
mcp/logger.go:10
↓ 912 callersFunctionInfof
(format string, args ...interface{})
logger/logger.go:153
↓ 618 callersFunctiont
( key: string, lang: Language, params?: Record<string, string | number> )
web/src/i18n/translations.ts:3768
↓ 209 callersMethodError
()
hook/ip_hook.go:10
↓ 195 callersFunctionts
(entry: { zh: string; en: string; [k: string]: string }, lang: string)
web/src/i18n/strategy-translations.ts:287
↓ 135 callersMethodSet
(userID string, states map[string]ExchangeAccountState)
api/exchange_account_state.go:77
↓ 98 callersMethodDo
(req *http.Request)
mcp/examples_test.go:225
↓ 84 callersFunctiontr
(key: string)
web/src/pages/StrategyMarketPage.tsx:110
↓ 82 callersMethodClose
Close closes database connection
store/store.go:311
↓ 78 callersFunctionWarnf
(format string, args ...interface{})
logger/logger.go:157
↓ 71 callersMethodOrder
Order gets order storage
store/store.go:271
↓ 67 callersMethodString
()
mcp/client.go:390
↓ 63 callersMethodFormat
(entry *logrus.Entry)
logger/logger.go:27
↓ 62 callersMethodAdd
Add appends a message and triggers compaction if threshold exceeded
telegram/session/memory.go:33
↓ 62 callersMethodInfof
(format string, args ...any)
mcp/logger.go:8
↓ 59 callersMethodlog
(level, format string, args ...any)
mcp/mock_test.go:54
↓ 57 callersMethodRun
Run runs the automatic trading main loop
trader/auto_trader.go:374
↓ 49 callersMethodRun
Run processes one user message through the native function-calling agent loop. Architecture: - LLM receives the api_request tool definition alongside
telegram/agent/agent.go:194
↓ 48 callersFunctionSafeInternalError
SafeInternalError logs internal error and returns a generic message
api/errors.go:50
↓ 47 callersFunctionInfo
(args ...interface{})
logger/logger.go:141
↓ 46 callersMethodGet
()
store/telegram_config.go:37
↓ 45 callersFunctionNewClient
NewClient creates client (supports options pattern) Usage examples: // Basic usage (backward compatible) client := mcp.NewClient() // Custom log
mcp/client.go:110
↓ 44 callersMethodrouteWithSchema
routeWithSchema registers an HTTP route with full parameter schema documentation. schema is injected verbatim into the API docs seen by the LLM.
api/route_registry.go:28
↓ 37 callersFunctionNormalize
Normalize normalizes symbol For crypto: ensures it's a USDT trading pair For xyz dex assets (stocks, forex, commodities): uses xyz: prefix without USD
market/data.go:557
↓ 34 callersFunctionErrorf
(format string, args ...interface{})
logger/logger.go:165
↓ 32 callersMethodCleanup
Cleanup Clean up resources
trader/lighter/trader.go:395
↓ 32 callersMethodScan
Scan implements sql.Scanner - called when reading from database Automatically decrypts the value
crypto/crypto.go:415
↓ 30 callersFunctioncreateTestTrader
(t *testing.T)
trader/lighter/integration_test.go:51
↓ 30 callersFunctionskipIfNoEnv
(t *testing.T)
trader/lighter/integration_test.go:31
↓ 28 callersMethodTrader
Trader gets trader storage
store/store.go:221
↓ 28 callersFunctionuseLanguage
()
web/src/contexts/LanguageContext.tsx:35
↓ 27 callersMethodGetPositions
GetPositions Get all positions
trader/types/interface.go:48
↓ 26 callersMethodProcessTrade
ProcessTrade processes a single trade and updates position accordingly tradeTimeMs is Unix milliseconds UTC
store/position_builder.go:29
↓ 26 callersFunctionSafeBadRequest
SafeBadRequest returns a safe bad request error For validation errors, we can be more specific since they're about user input
api/errors.go:57
↓ 26 callersMethoddoRequest
doRequest executes HTTP request
trader/okx/trader.go:198
↓ 26 callersFunctionrepeatStr
(s string, n int)
trader/binance/sync_verify_test.go:14
↓ 25 callersMethodGetTrader
GetTrader retrieves a trader by ID
manager/trader_manager.go:48
↓ 25 callersFunctionWithLogger
============================================================ Dependency Injection Options ============================================================
mcp/options.go:19
↓ 25 callersMethoddoRequest
doRequest executes HTTP request
trader/kucoin/trader.go:196
↓ 25 callersMethoddoRequest
doRequest executes HTTP request
trader/bitget/trader.go:138
↓ 25 callersMethodroute
route registers an HTTP route with a one-line description.
api/route_registry.go:22
↓ 24 callersMethodPosition
Position gets position storage
store/store.go:241
↓ 24 callersFunctionWithAPIKey
============================================================ Provider Configuration Options ==========================================================
mcp/options.go:117
↓ 24 callersFunctionformatValue
formatValue formats a numeric value with sign and appropriate suffix
provider/nofxos/util.go:14
↓ 23 callersMethodGet
Get coinank openapi get request
provider/coinank/coinank_http.go:46
↓ 22 callersMethodCount
Count returns the total number of users
store/user.go:87
↓ 22 callersFunctionparseFloat
parseFloat parses float value
market/data.go:590
↓ 22 callersMethodrequest
request Send HTTP request (with retry mechanism)
trader/aster/trader.go:329
↓ 20 callersMethodCreateOrder
CreateOrder Create order (market or limit) - uses official SDK for signing
trader/lighter/trading.go:190
↓ 20 callersMethodGetName
GetName gets trader name
trader/auto_trader.go:547
↓ 20 callersMethodList
List gets user's trader list
store/trader.go:82
↓ 20 callersMethodWarnf
(format string, args ...any)
mcp/logger.go:9
↓ 19 callersMethodGetBalance
GetBalance Get account balance
trader/types/interface.go:45
↓ 19 callersFunctionformatTraderCreationError
(reason, nextStep string)
api/handler_trader.go:57
↓ 18 callersFunctionSafeBadRequestWithDetails
(c *gin.Context, msg, errorKey string, errorParams map[string]string)
api/errors.go:61
↓ 18 callersFunctionformatFloatSlice
(values []float64)
kernel/engine_prompt.go:773
↓ 17 callersMethodMustBuild
MustBuild builds request object, panics if failed Suitable for scenarios where build is guaranteed not to fail
mcp/request_builder.go:263
↓ 17 callersFunctionNewRequestBuilder
NewRequestBuilder creates request builder Usage example: request := NewRequestBuilder(). WithSystemPrompt("You are helpful"). WithUserPrompt("Hello")
mcp/request_builder.go:30
↓ 17 callersMethodconvertSymbol
convertSymbol converts generic symbol to Bitget format e.g., BTCUSDT -> BTCUSDT
trader/bitget/trader.go:215
↓ 17 callersMethodconvertSymbol
convertSymbol converts generic symbol to OKX format e.g. BTCUSDT -> BTC-USDT-SWAP
trader/okx/trader.go:252
↓ 17 callersFunctionvalidatePassword
( pwd: string, confirmPwd: string )
web/src/components/auth/RegisterPage.test.tsx:93
↓ 16 callersFunctionDebugf
(format string, args ...interface{})
logger/logger.go:149
↓ 16 callersFunctionDefaultConfig
DefaultConfig returns default configuration
mcp/config.go:41
↓ 16 callersMethodGetID
GetID gets trader ID
trader/auto_trader.go:536
↓ 16 callersMethodGetMarketPrice
GetMarketPrice Get market price
trader/types/interface.go:69
↓ 16 callersFunctionNewMockLogger
()
mcp/mock_test.go:31
↓ 16 callersMethodWithUserPrompt
WithUserPrompt adds user prompt (convenience method)
mcp/request_builder.go:66
↓ 16 callersMethodconvertSymbol
convertSymbol converts symbol format (e.g., BTCUSDT -> BTC_USDT)
trader/gate/trader.go:58
↓ 16 callersFunctionskipIfJurisdictionRestricted
skipIfJurisdictionRestricted checks if error is due to geographic restriction and skips the test if so (this is expected when running from restricted
trader/lighter/integration_test.go:45
↓ 15 callersMethodAIModel
AIModel gets AI model storage
store/store.go:201
↓ 15 callersMethodCreate
Create creates user
store/user.go:62
↓ 15 callersFunctionNewPositionBuilder
NewPositionBuilder creates a new PositionBuilder
store/position_builder.go:21
↓ 15 callersMethodStrategy
Strategy gets strategy storage
store/store.go:251
↓ 15 callersFunctionWithHTTPClient
WithHTTPClient sets custom HTTP client. WARNING: The default client uses security.SafeHTTPClient() with SSRF protection (blocks private IPs, cloud me
mcp/options.go:34
↓ 15 callersFunctionWithModel
WithModel sets model name
mcp/options.go:131
↓ 15 callersFunctionconvertSymbolToHyperliquid
convertSymbolToHyperliquid converts standard symbol to Hyperliquid format Example: "BTCUSDT" -> "BTC", "TSLA" -> "xyz:TSLA", "silver" -> "xyz:SILVER"
trader/hyperliquid/trader.go:88
↓ 15 callersFunctionformatFloatSlice
formatFloatSlice formats float64 slice to string (using dynamic precision)
market/data.go:516
↓ 15 callersFunctiontoolCall
toolCall builds a mock LLM response that contains a single tool invocation.
telegram/agent/agent_test.go:62
↓ 15 callersFunctionupdateField
( key: K, value: GridStrategyConfig[K] )
web/src/components/strategy/GridConfigEditor.tsx:38
↓ 14 callersMethodCallWithMessages
CallWithMessages template method - fixed retry flow (cannot be overridden)
mcp/client.go:167
↓ 14 callersMethodClose
Close websocket
provider/coinank/coinank_api/depth_ws.go:68
↓ 14 callersMethodTelegramConfig
TelegramConfig gets Telegram bot configuration storage
store/store.go:301
↓ 14 callersFunctionWithBaseURL
WithBaseURL sets base URL
mcp/options.go:124
↓ 14 callersFunctionWithProvider
WithProvider sets provider
mcp/options.go:138
↓ 14 callersMethodformatFloatWithPrecision
formatFloatWithPrecision Format float to string with specified precision (remove trailing zeros)
trader/aster/trader.go:199
↓ 14 callersFunctionskipIfNoLiveTest
(t *testing.T)
trader/binance/order_sync_test.go:11
↓ 13 callersMethodCreateFill
CreateFill creates fill record
store/order.go:186
↓ 13 callersFunctioncn
(...inputs: ClassValue[])
web/src/lib/cn.ts:5
↓ 13 callersFunctioncontains
Helper functions
trader/binance/futures.go:126
↓ 13 callersMethodconvertSymbol
convertSymbol converts generic symbol to KuCoin format e.g. BTCUSDT -> XBTUSDTM (KuCoin uses XBT for BTC)
trader/kucoin/trader.go:261
↓ 13 callersFunctionhasSpecialChar
(pwd: string)
web/src/components/auth/RegisterPage.test.tsx:61
↓ 12 callersMethodDelete
Delete deletes trader and associated data
store/trader.go:155
↓ 12 callersFunctionNew
New creates an Agent for one chat session.
telegram/agent/agent.go:57
↓ 12 callersFunctionNewMockHTTPClient
()
mcp/mock_test.go:130
↓ 12 callersFunctionSafeNotFound
SafeNotFound returns a generic not found error
api/errors.go:66
↓ 12 callersMethodToHTTPClient
ToHTTPClient converts to http.Client
mcp/mock_test.go:138
↓ 12 callersMethodfilterExcludedCoins
filterExcludedCoins removes excluded coins from the candidates list
kernel/engine.go:450
↓ 12 callersMethodget
* GET request
web/src/lib/httpClient.ts:258
↓ 12 callersMethodgetSzDecimals
getSzDecimals gets quantity precision for coin
trader/hyperliquid/trader.go:243
↓ 12 callersMethodgetTraderFromQuery
getTraderFromQuery Get trader from query parameter
api/server.go:511
next →1–100 of 2,334, ranked by callers