Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NoFxAiOS/nofx
/ functions
Functions
2,846 in github.com/NoFxAiOS/nofx
⨍
Functions
2,846
◇
Types & classes
581
↓ 1,359 callers
Method
Errorf
(format string, args ...any)
mcp/logger.go:10
↓ 890 callers
Function
Infof
(format string, args ...interface{})
logger/logger.go:153
↓ 589 callers
Function
t
( key: string, lang: Language, params?: Record<string, string | number> )
web/src/i18n/translations.ts:3995
↓ 151 callers
Method
Set
(userID string, states map[string]ExchangeAccountState)
api/exchange_account_state.go:77
↓ 141 callers
Method
Error
()
hook/ip_hook.go:10
↓ 105 callers
Function
Warnf
(format string, args ...interface{})
logger/logger.go:157
↓ 100 callers
Method
Do
(req *http.Request)
mcp/examples_test.go:225
↓ 100 callers
Method
Error
()
mcp/payment/claw402.go:35
↓ 93 callers
Method
Close
Close closes database connection
store/store.go:311
↓ 87 callers
Method
String
()
mcp/client.go:429
↓ 78 callers
Method
Add
Add appends a message and triggers compaction if threshold exceeded
telegram/session/memory.go:33
↓ 70 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
↓ 66 callers
Method
Format
(entry *logrus.Entry)
logger/logger.go:27
↓ 66 callers
Method
Order
Order gets order storage
store/store.go:271
↓ 62 callers
Method
Infof
(format string, args ...any)
mcp/logger.go:8
↓ 60 callers
Method
Run
Run runs the automatic trading main loop
trader/auto_trader.go:444
↓ 59 callers
Method
log
(level, format string, args ...any)
mcp/mock_test.go:54
↓ 52 callers
Function
SafeInternalError
SafeInternalError logs internal error and returns a generic message
api/errors.go:50
↓ 51 callers
Method
Get
()
store/telegram_config.go:37
↓ 48 callers
Function
Info
(args ...interface{})
logger/logger.go:141
↓ 48 callers
Function
NewClient
NewClient creates client (supports options pattern) Usage examples: // Basic usage (backward compatible) client := mcp.NewClient() // Custom log
mcp/client.go:113
↓ 45 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
↓ 41 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:561
↓ 36 callers
Method
Cleanup
Cleanup Clean up resources
trader/lighter/trader.go:395
↓ 36 callers
Function
text
(language: string, zh: string, en: string)
web/src/pages/StrategyStudioPage.tsx:79
↓ 34 callers
Method
GetTrader
GetTrader retrieves a trader by ID
manager/trader_manager.go:56
↓ 33 callers
Function
Errorf
(format string, args ...interface{})
logger/logger.go:165
↓ 32 callers
Method
Scan
Scan implements sql.Scanner - called when reading from database Automatically decrypts the value
crypto/crypto.go:419
↓ 32 callers
Method
route
route registers an HTTP route with a one-line description.
api/route_registry.go:22
↓ 32 callers
Function
testTime
testTime returns a deterministic timestamp offset by n minutes.
trader/position_rebuild_test.go:10
↓ 30 callers
Method
Trader
Trader gets trader storage
store/store.go:221
↓ 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
↓ 29 callers
Function
ts
(entry: { zh: string; en: string; [k: string]: string }, lang: string)
web/src/i18n/strategy-translations.ts:291
↓ 29 callers
Function
useLanguage
()
web/src/contexts/LanguageContext.tsx:35
↓ 28 callers
Function
WithLogger
============================================================ Dependency Injection Options ============================================================
mcp/options.go:19
↓ 27 callers
Method
GetPositions
GetPositions Get all positions
trader/types/interface.go:48
↓ 27 callers
Function
ParseFloatField
ParseFloatField parses a numeric string field from an exchange API response. An empty string is treated as zero, since exchanges commonly omit fields
trader/types/parse.go:13
↓ 27 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
↓ 27 callers
Function
WithAPIKey
============================================================ Provider Configuration Options ==========================================================
mcp/options.go:117
↓ 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
Method
logInfof
(format string, args ...interface{})
trader/auto_trader.go:37
↓ 26 callers
Function
repeatStr
(s string, n int)
trader/binance/sync_verify_test.go:14
↓ 25 callers
Method
Position
Position gets position storage
store/store.go:241
↓ 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
doRequest
doRequest executes HTTP request
trader/okx/trader.go:207
↓ 25 callers
Method
logWarnf
(format string, args ...interface{})
trader/auto_trader.go:42
↓ 24 callers
Function
GetDefaultStrategyConfig
GetDefaultStrategyConfig returns the default strategy configuration for the given language
store/strategy.go:953
↓ 24 callers
Function
floatsClose
(a, b float64)
trader/position_rebuild_test.go:14
↓ 24 callers
Function
formatValue
formatValue formats a numeric value with sign and appropriate suffix
provider/nofxos/util.go:14
↓ 23 callers
Method
Count
Count returns the total number of users
store/user.go:87
↓ 23 callers
Method
Get
Get coinank openapi get request
provider/coinank/coinank_http.go:46
↓ 23 callers
Method
Warnf
(format string, args ...any)
mcp/logger.go:9
↓ 22 callers
Method
GetName
GetName gets trader name
trader/auto_trader.go:618
↓ 22 callers
Method
List
List gets user's trader list
store/trader.go:82
↓ 22 callers
Function
normalizeAddress
(address: string)
web/src/components/common/HyperliquidWalletConnect.tsx:96
↓ 22 callers
Method
request
request Send HTTP request (with retry mechanism)
trader/aster/trader.go:329
↓ 21 callers
Method
get
* GET request
web/src/lib/httpClient.ts:268
↓ 20 callers
Method
CreateOrder
CreateOrder Create order (market or limit) - uses official SDK for signing
trader/lighter/trading.go:190
↓ 20 callers
Method
Delete
Delete deletes trader and associated data
store/trader.go:163
↓ 20 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
↓ 20 callers
Function
NewRequestBuilder
NewRequestBuilder creates request builder Usage example: request := NewRequestBuilder(). WithSystemPrompt("You are helpful"). WithUserPrompt("Hello")
mcp/request_builder.go:30
↓ 20 callers
Method
Strategy
Strategy gets strategy storage
store/store.go:251
↓ 19 callers
Method
AIModel
AIModel gets AI model storage
store/store.go:201
↓ 19 callers
Method
GetBalance
GetBalance Get account balance
trader/types/interface.go:45
↓ 19 callers
Function
NewMockLogger
()
mcp/mock_test.go:31
↓ 19 callers
Function
SafeBadRequestWithDetails
(c *gin.Context, msg, errorKey string, errorParams map[string]string)
api/errors.go:61
↓ 19 callers
Method
WithUserPrompt
WithUserPrompt adds user prompt (convenience method)
mcp/request_builder.go:66
↓ 19 callers
Function
formatTraderCreationError
(reason, nextStep string)
api/handler_trader.go:62
↓ 18 callers
Method
Create
Create creates user
store/user.go:62
↓ 18 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
↓ 18 callers
Function
formatFloatSlice
(values []float64)
kernel/engine_prompt.go:1289
↓ 17 callers
Method
convertSymbol
convertSymbol converts generic symbol to Bitget format e.g., BTCUSDT -> BTCUSDT
trader/bitget/trader.go:215
↓ 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
GetMarketPrice
GetMarketPrice Get market price
trader/types/interface.go:69
↓ 16 callers
Method
convertSymbol
convertSymbol converts symbol format (e.g., BTCUSDT -> BTC_USDT)
trader/gate/trader.go:62
↓ 16 callers
Method
convertSymbol
convertSymbol converts generic symbol to OKX format e.g. BTCUSDT -> BTC-USDT-SWAP
trader/okx/trader.go:261
↓ 16 callers
Function
convertSymbolToHyperliquid
convertSymbolToHyperliquid converts standard/display symbols to Hyperliquid format. Examples: "BTCUSDT" -> "BTC", "TSLA" -> "xyz:TSLA", "SAMSUNG-USDC"
trader/hyperliquid/trader.go:83
↓ 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
GetID
GetID gets trader ID
trader/auto_trader.go:607
↓ 15 callers
Function
NewMockHTTPClient
()
mcp/mock_test.go:130
↓ 15 callers
Function
NewPositionBuilder
NewPositionBuilder creates a new PositionBuilder
store/position_builder.go:21
↓ 15 callers
Function
SafeNotFound
SafeNotFound returns a generic not found error
api/errors.go:66
↓ 15 callers
Method
ToHTTPClient
ToHTTPClient converts to http.Client
mcp/mock_test.go:138
↓ 15 callers
Function
WithModel
WithModel sets model name
mcp/options.go:131
↓ 15 callers
Function
formatFloatSlice
formatFloatSlice formats float64 slice to string (using dynamic precision)
market/data.go:517
↓ 15 callers
Function
toolCall
toolCall builds a mock LLM response that contains a single tool invocation.
telegram/agent/agent_test.go:62
↓ 14 callers
Method
CallWithMessages
CallWithMessages template method - fixed retry flow (cannot be overridden)
mcp/client.go:170
↓ 14 callers
Method
Close
Close websocket
provider/coinank/coinank_api/depth_ws.go:68
↓ 14 callers
Function
NewTraderManager
NewTraderManager creates a trader manager
manager/trader_manager.go:38
↓ 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
filterExcludedCoins
filterExcludedCoins removes excluded coins from the candidates list
kernel/engine.go:507
↓ 14 callers
Method
formatFloatWithPrecision
formatFloatWithPrecision Format float to string with specified precision (remove trailing zeros)
trader/aster/trader.go:199
↓ 14 callers
Function
formatMoney
(value: number | undefined)
web/src/pages/StrategyStudioPage.tsx:428
↓ 14 callers
Function
parseFloat
parseFloat parses float value
market/data.go:585
next →
1–100 of 2,846, ranked by callers