Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JMWL66/jmwl-autotrade
/ functions
Functions
2,334 in github.com/JMWL66/jmwl-autotrade
⨍
Functions
2,334
◇
Types & classes
502
↓ 1,189 callers
Method
Errorf
(format string, args ...any)
mcp/logger.go:10
↓ 912 callers
Function
Infof
(format string, args ...interface{})
logger/logger.go:153
↓ 618 callers
Function
t
( key: string, lang: Language, params?: Record<string, string | number> )
web/src/i18n/translations.ts:3768
↓ 209 callers
Method
Error
()
hook/ip_hook.go:10
↓ 195 callers
Function
ts
(entry: { zh: string; en: string; [k: string]: string }, lang: string)
web/src/i18n/strategy-translations.ts:287
↓ 135 callers
Method
Set
(userID string, states map[string]ExchangeAccountState)
api/exchange_account_state.go:77
↓ 98 callers
Method
Do
(req *http.Request)
mcp/examples_test.go:225
↓ 84 callers
Function
tr
(key: string)
web/src/pages/StrategyMarketPage.tsx:110
↓ 82 callers
Method
Close
Close closes database connection
store/store.go:311
↓ 78 callers
Function
Warnf
(format string, args ...interface{})
logger/logger.go:157
↓ 71 callers
Method
Order
Order gets order storage
store/store.go:271
↓ 67 callers
Method
String
()
mcp/client.go:390
↓ 63 callers
Method
Format
(entry *logrus.Entry)
logger/logger.go:27
↓ 62 callers
Method
Add
Add appends a message and triggers compaction if threshold exceeded
telegram/session/memory.go:33
↓ 62 callers
Method
Infof
(format string, args ...any)
mcp/logger.go:8
↓ 59 callers
Method
log
(level, format string, args ...any)
mcp/mock_test.go:54
↓ 57 callers
Method
Run
Run runs the automatic trading main loop
trader/auto_trader.go:374
↓ 49 callers
Method
Run
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 callers
Function
SafeInternalError
SafeInternalError logs internal error and returns a generic message
api/errors.go:50
↓ 47 callers
Function
Info
(args ...interface{})
logger/logger.go:141
↓ 46 callers
Method
Get
()
store/telegram_config.go:37
↓ 45 callers
Function
NewClient
NewClient creates client (supports options pattern) Usage examples: // Basic usage (backward compatible) client := mcp.NewClient() // Custom log
mcp/client.go:110
↓ 44 callers
Method
routeWithSchema
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 callers
Function
Normalize
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 callers
Function
Errorf
(format string, args ...interface{})
logger/logger.go:165
↓ 32 callers
Method
Cleanup
Cleanup Clean up resources
trader/lighter/trader.go:395
↓ 32 callers
Method
Scan
Scan implements sql.Scanner - called when reading from database Automatically decrypts the value
crypto/crypto.go:415
↓ 30 callers
Function
createTestTrader
(t *testing.T)
trader/lighter/integration_test.go:51
↓ 30 callers
Function
skipIfNoEnv
(t *testing.T)
trader/lighter/integration_test.go:31
↓ 28 callers
Method
Trader
Trader gets trader storage
store/store.go:221
↓ 28 callers
Function
useLanguage
()
web/src/contexts/LanguageContext.tsx:35
↓ 27 callers
Method
GetPositions
GetPositions Get all positions
trader/types/interface.go:48
↓ 26 callers
Method
ProcessTrade
ProcessTrade processes a single trade and updates position accordingly tradeTimeMs is Unix milliseconds UTC
store/position_builder.go:29
↓ 26 callers
Function
SafeBadRequest
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 callers
Method
doRequest
doRequest executes HTTP request
trader/okx/trader.go:198
↓ 26 callers
Function
repeatStr
(s string, n int)
trader/binance/sync_verify_test.go:14
↓ 25 callers
Method
GetTrader
GetTrader retrieves a trader by ID
manager/trader_manager.go:48
↓ 25 callers
Function
WithLogger
============================================================ Dependency Injection Options ============================================================
mcp/options.go:19
↓ 25 callers
Method
doRequest
doRequest executes HTTP request
trader/kucoin/trader.go:196
↓ 25 callers
Method
doRequest
doRequest executes HTTP request
trader/bitget/trader.go:138
↓ 25 callers
Method
route
route registers an HTTP route with a one-line description.
api/route_registry.go:22
↓ 24 callers
Method
Position
Position gets position storage
store/store.go:241
↓ 24 callers
Function
WithAPIKey
============================================================ Provider Configuration Options ==========================================================
mcp/options.go:117
↓ 24 callers
Function
formatValue
formatValue formats a numeric value with sign and appropriate suffix
provider/nofxos/util.go:14
↓ 23 callers
Method
Get
Get coinank openapi get request
provider/coinank/coinank_http.go:46
↓ 22 callers
Method
Count
Count returns the total number of users
store/user.go:87
↓ 22 callers
Function
parseFloat
parseFloat parses float value
market/data.go:590
↓ 22 callers
Method
request
request Send HTTP request (with retry mechanism)
trader/aster/trader.go:329
↓ 20 callers
Method
CreateOrder
CreateOrder Create order (market or limit) - uses official SDK for signing
trader/lighter/trading.go:190
↓ 20 callers
Method
GetName
GetName gets trader name
trader/auto_trader.go:547
↓ 20 callers
Method
List
List gets user's trader list
store/trader.go:82
↓ 20 callers
Method
Warnf
(format string, args ...any)
mcp/logger.go:9
↓ 19 callers
Method
GetBalance
GetBalance Get account balance
trader/types/interface.go:45
↓ 19 callers
Function
formatTraderCreationError
(reason, nextStep string)
api/handler_trader.go:57
↓ 18 callers
Function
SafeBadRequestWithDetails
(c *gin.Context, msg, errorKey string, errorParams map[string]string)
api/errors.go:61
↓ 18 callers
Function
formatFloatSlice
(values []float64)
kernel/engine_prompt.go:773
↓ 17 callers
Method
MustBuild
MustBuild builds request object, panics if failed Suitable for scenarios where build is guaranteed not to fail
mcp/request_builder.go:263
↓ 17 callers
Function
NewRequestBuilder
NewRequestBuilder creates request builder Usage example: request := NewRequestBuilder(). WithSystemPrompt("You are helpful"). WithUserPrompt("Hello")
mcp/request_builder.go:30
↓ 17 callers
Method
convertSymbol
convertSymbol converts generic symbol to Bitget format e.g., BTCUSDT -> BTCUSDT
trader/bitget/trader.go:215
↓ 17 callers
Method
convertSymbol
convertSymbol converts generic symbol to OKX format e.g. BTCUSDT -> BTC-USDT-SWAP
trader/okx/trader.go:252
↓ 17 callers
Function
validatePassword
( pwd: string, confirmPwd: string )
web/src/components/auth/RegisterPage.test.tsx:93
↓ 16 callers
Function
Debugf
(format string, args ...interface{})
logger/logger.go:149
↓ 16 callers
Function
DefaultConfig
DefaultConfig returns default configuration
mcp/config.go:41
↓ 16 callers
Method
GetID
GetID gets trader ID
trader/auto_trader.go:536
↓ 16 callers
Method
GetMarketPrice
GetMarketPrice Get market price
trader/types/interface.go:69
↓ 16 callers
Function
NewMockLogger
()
mcp/mock_test.go:31
↓ 16 callers
Method
WithUserPrompt
WithUserPrompt adds user prompt (convenience method)
mcp/request_builder.go:66
↓ 16 callers
Method
convertSymbol
convertSymbol converts symbol format (e.g., BTCUSDT -> BTC_USDT)
trader/gate/trader.go:58
↓ 16 callers
Function
skipIfJurisdictionRestricted
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 callers
Method
AIModel
AIModel gets AI model storage
store/store.go:201
↓ 15 callers
Method
Create
Create creates user
store/user.go:62
↓ 15 callers
Function
NewPositionBuilder
NewPositionBuilder creates a new PositionBuilder
store/position_builder.go:21
↓ 15 callers
Method
Strategy
Strategy gets strategy storage
store/store.go:251
↓ 15 callers
Function
WithHTTPClient
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 callers
Function
WithModel
WithModel sets model name
mcp/options.go:131
↓ 15 callers
Function
convertSymbolToHyperliquid
convertSymbolToHyperliquid converts standard symbol to Hyperliquid format Example: "BTCUSDT" -> "BTC", "TSLA" -> "xyz:TSLA", "silver" -> "xyz:SILVER"
trader/hyperliquid/trader.go:88
↓ 15 callers
Function
formatFloatSlice
formatFloatSlice formats float64 slice to string (using dynamic precision)
market/data.go:516
↓ 15 callers
Function
toolCall
toolCall builds a mock LLM response that contains a single tool invocation.
telegram/agent/agent_test.go:62
↓ 15 callers
Function
updateField
( key: K, value: GridStrategyConfig[K] )
web/src/components/strategy/GridConfigEditor.tsx:38
↓ 14 callers
Method
CallWithMessages
CallWithMessages template method - fixed retry flow (cannot be overridden)
mcp/client.go:167
↓ 14 callers
Method
Close
Close websocket
provider/coinank/coinank_api/depth_ws.go:68
↓ 14 callers
Method
TelegramConfig
TelegramConfig gets Telegram bot configuration storage
store/store.go:301
↓ 14 callers
Function
WithBaseURL
WithBaseURL sets base URL
mcp/options.go:124
↓ 14 callers
Function
WithProvider
WithProvider sets provider
mcp/options.go:138
↓ 14 callers
Method
formatFloatWithPrecision
formatFloatWithPrecision Format float to string with specified precision (remove trailing zeros)
trader/aster/trader.go:199
↓ 14 callers
Function
skipIfNoLiveTest
(t *testing.T)
trader/binance/order_sync_test.go:11
↓ 13 callers
Method
CreateFill
CreateFill creates fill record
store/order.go:186
↓ 13 callers
Function
cn
(...inputs: ClassValue[])
web/src/lib/cn.ts:5
↓ 13 callers
Function
contains
Helper functions
trader/binance/futures.go:126
↓ 13 callers
Method
convertSymbol
convertSymbol converts generic symbol to KuCoin format e.g. BTCUSDT -> XBTUSDTM (KuCoin uses XBT for BTC)
trader/kucoin/trader.go:261
↓ 13 callers
Function
hasSpecialChar
(pwd: string)
web/src/components/auth/RegisterPage.test.tsx:61
↓ 12 callers
Method
Delete
Delete deletes trader and associated data
store/trader.go:155
↓ 12 callers
Function
New
New creates an Agent for one chat session.
telegram/agent/agent.go:57
↓ 12 callers
Function
NewMockHTTPClient
()
mcp/mock_test.go:130
↓ 12 callers
Function
SafeNotFound
SafeNotFound returns a generic not found error
api/errors.go:66
↓ 12 callers
Method
ToHTTPClient
ToHTTPClient converts to http.Client
mcp/mock_test.go:138
↓ 12 callers
Method
filterExcludedCoins
filterExcludedCoins removes excluded coins from the candidates list
kernel/engine.go:450
↓ 12 callers
Method
get
* GET request
web/src/lib/httpClient.ts:258
↓ 12 callers
Method
getSzDecimals
getSzDecimals gets quantity precision for coin
trader/hyperliquid/trader.go:243
↓ 12 callers
Method
getTraderFromQuery
getTraderFromQuery Get trader from query parameter
api/server.go:511
next →
1–100 of 2,334, ranked by callers