Commit Graph

118 Commits

Author SHA1 Message Date
Lance c6d9ef469e release: merge dev into main (2026-04-20) (#1487)
* feat(store): prevent deletion of active strategies and update translations (#1461)

Co-authored-by: Dean <afei.wuhao@gmail.com>

* fix: allow model switching without re-entering wallet key

Users with existing wallets could not switch AI models because the
"Start Trading" button required a valid private key even when one was
already configured. Now the button is enabled when hasExistingWallet
is true, and handleSubmit passes an empty key so the backend preserves
the existing key.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: replace window.location with useNavigate for routing in auth components (#1470)

Co-authored-by: Dean <afei.wuhao@gmail.com>

* feat(trader): implement margin mode handling for order and leverage settings

* refactor(trader): update SetMarginMode to avoid legacy endpoint and improve logging

* feat(api): enhance strategy handling by integrating claw402 wallet key validation

Added validation for the claw402 model's wallet key during strategy test runs. If the selected AI model is claw402, the server now checks for a valid wallet key and returns appropriate error messages if it's missing or if the model fails to load. This ensures better error handling and user feedback when working with AI models.

* refactor(api): streamline claw402 wallet key retrieval and error handling

Refactored the strategy handling logic to encapsulate claw402 wallet key retrieval in a new method, `resolveStrategyDataWalletKey`. This improves code readability and maintains consistent error handling for missing or invalid wallet keys during strategy test runs. The changes enhance the overall robustness of the AI model integration.

* feat(trader): add claw402 wallet key resolution for trader configuration

Implemented a new method, `resolveTraderDataWalletKey`, to retrieve the claw402 wallet key based on the selected AI model and user ID. This enhancement allows for better integration of the claw402 model within the trader configuration, ensuring that the correct wallet key is used for trading operations. The `AutoTraderConfig` struct has been updated to include the new `Claw402WalletKey` field, improving the overall handling of wallet keys in the trading process.

* feat(claw402): preflight USDC balance before AI calls (#1479)

* chore: ignore nofx-server build artifact

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(claw402): preflight USDC balance before AI calls

Short-circuit claw402 Call/CallWithRequestFull when the wallet balance
can't cover the estimated cost of the call, surfacing ErrInsufficientFunds
instead of letting x402 fail mid-flight after the sign step.

- wallet: cached balance lookup (30s TTL, per-address mutex) to avoid
  hammering the Base RPC; separate error-returning and display-only APIs
  so callers can distinguish zero balance from an unreachable RPC.
- claw402: 1.5× safety multiplier on the flat per-call estimate, 4.0×
  for reasoner models whose chain-of-thought cost can blow past the
  flat rate. Fail-open on RPC errors — x402 still gates actually-empty
  wallets, and we prefer availability over extra strictness.
- shortAddr redacts the wallet in error strings to avoid leaking the
  full address into telemetry bundles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(telemetry): report token usage for SSE streaming paths (#1475)

* fix(telemetry): report token usage for SSE streaming paths

ParseSSEStream already parsed the usage block from SSE chunks but only
printed it, so claw402 streaming calls (and native streaming) never
fired TokenUsageCallback. GA4 therefore undercounted AI usage on the
streaming path.

Return the parsed usage from ParseSSEStream and have both callers fire
the callback with their own Provider/Model.

* chore: drop leftover debug Printf in ParseSSEStream

Telemetry is now wired via TokenUsageCallback, so the Printf is
redundant noise in the stream path.

* fix(gemini): update default model to gemini-3.1-pro

Google discontinued gemini-3-pro-preview on 2026-03-26 and directs all
callers to gemini-3.1-pro / gemini-3.1-pro-preview. Users on their own
API key were getting errors from the native Gemini endpoint because the
provider default pointed at the retired ID. Claw402 was unaffected
because its route map already used gemini-3.1-pro.

Align both the native provider default and the handler's preset list
with gemini-3.1-pro so every code path sends a live model ID.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: extract ResolveClaw402WalletKey to store layer and expand OKX margin mode tests

- Move duplicated claw402 wallet resolution logic into store.AIModelStore.ResolveClaw402WalletKey
- api/strategy.go and manager/trader_manager.go now delegate to the shared method
- Add detailed doc comment on OKX SetMarginMode explaining the local-state-only approach
  and why the legacy /api/v5/account/set-isolated-mode endpoint is not called
- Add 3 new test cases: cross mode leverage, OpenShort tdMode, SetTakeProfit tdMode

* fix(auth): prevent SetupPage remount from wiping freshly-set auth token (#1481)

After #1470 moved routing into react-router, SetupPage is rendered at two
different tree positions (top-level guard + /setup Route). When register
success flushSync-sets `user`, the top-level guard stops matching and the
Route-level SetupPage mounts as a new instance, re-running its cleanup
useEffect and removing the auth_token that handlePostAuthSuccess just wrote.
Subsequent requests 401 and bounce the user back to /login.

Redirect /setup to /welcome when user is already set so SetupPage is never
re-mounted during the auth transition.

* fix(wallet): handle JSON-RPC null error field in balance query

Some RPC implementations return explicit "error": null on success.
json.RawMessage deserializes this as the 4-byte literal "null", so
len() > 0 was true, causing every balance query to fail with
"rpc error: null". Skip the null literal to avoid false positives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(readme): add quick demo video to localized READMEs (#1486)

* docs(README): add quick demo section with video link and image

* docs(README): update demo video link

* docs(i18n): add quick demo section with video link and image for multiple languages

---------

Co-authored-by: Dean <afei.wuhao@gmail.com>

---------

Co-authored-by: deanokk <wuhao@vergex.trade>
Co-authored-by: Dean <afei.wuhao@gmail.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: root <root@localhost.localdomain>
2026-04-20 01:12:43 +08:00
shinchan-zhai 9937542020 docs: add MiniMax to AI models and beginner mode to setup across all i18n READMEs
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 22:16:46 +08:00
tinkle-community 966995fb88 refactor: remove BlockRun provider, retain Claw402 as sole x402 payment provider
Remove all BlockRun (Base + Solana wallet) references from codebase:
- Delete blockrun_base.go, blockrun_sol.go, wallet setup docs, icon
- Move shared EIP-712 signing code to x402.go for Claw402 reuse
- Clean up provider constants, model lists, UI components, translations
- Update all README files (EN + 6 i18n) and getting-started docs
2026-03-24 01:44:54 +08:00
tinkle-community 21a15f98eb refactor: remove all backtest module code and references
Delete backtest/ engine (19 files), api/backtest.go, store/backtest.go,
web backtest components (7 files), API client, types, docs, screenshot.
Clean all backtest references from main.go, api/server.go, store/store.go,
App.tsx, HeaderBar.tsx, LandingPage.tsx, translations, README and docs.
2026-03-16 07:38:01 +08:00
tinkle-community 94ef009bb5 refactor: remove all Debate Arena feature code
Remove the entire AI Debate Arena module (~5,300 lines) to simplify
the codebase. This removes the multi-AI debate trading decision system
including backend engine, API handlers, database store, frontend page,
navigation, translations, and documentation references.
2026-03-11 17:32:41 +08:00
tinkle-community bdf1d2dfab feat: restructure README — autonomous AI trading assistant, restore exchange/model referral links 2026-03-11 16:34:28 +08:00
tinkle-community ca92b849cd fix: KuCoin timestamp sync, improve no-coins handling, update README icons
- Add server time synchronization for KuCoin API to fix timestamp error (400002)
- Return empty list instead of error when no available coins (ai500.go)
- Save cycle record even when no candidate coins (show in frontend without red error)
- Update Claude icon to Anthropic dark brand color (#141413)
- Add exchange and AI model icons to README.md and README.ja.md
2026-02-04 02:41:37 +08:00
tinkle-community 093d2a329d feat(gate): complete Gate.io exchange integration with trader refactoring
Gate.io Integration:
- Add Gate trader with full Trader interface implementation
- Add order_sync.go for background trade synchronization
- Fix quantity display (convert contracts to actual tokens via quanto_multiplier)
- Fix fill price return in OpenLong/OpenShort/CloseLong/CloseShort
- Add Gate-specific CoinAnk K-line data source support
- Add Gate to supported exchanges in frontend and backend
- Add Gate/KuCoin logo SVG icons

Trader Package Refactoring:
- Move exchange-specific code into subdirectories (binance/, bybit/, okx/, bitget/, hyperliquid/, aster/, lighter/, gate/)
- Create types/ package for shared types to avoid circular dependencies
- Move TraderTestSuite to trader/testutil package to avoid import cycles
- Update market.GetWithExchange to support exchange-specific data
2026-01-31 23:15:17 +08:00
tinkle-community e19e289c58 docs: add KuCoin exchange support 2026-01-31 18:26:38 +08:00
tinkle-community 5ea9a3990e docs: center README titles 2026-01-31 02:17:06 +08:00
tinkle-community 5b5199359c docs: rebrand as AI Trading OS across all languages 2026-01-31 02:15:07 +08:00
tinkle-community fcc0267a46 docs: update sponsors list (11 sponsors) 2026-01-23 21:23:38 +08:00
tinkle-community 2f54d1d4c0 docs: update sponsors list (8 sponsors) 2026-01-19 23:23:14 +08:00
tinkle-community 0b448558ca docs: update sponsors list (5 sponsors) 2026-01-19 20:27:41 +08:00
tinkle-community 84276f64ae docs: add sponsor @1733055465 2026-01-19 19:11:55 +08:00
tinkle-community 5560df133e docs: use manual sponsor list instead of workflow 2026-01-19 19:06:54 +08:00
tinkle-community 7b1edaa51f docs: add auto-update sponsors workflow 2026-01-19 19:04:33 +08:00
tinkle-community ed8ad63288 docs: add sponsors section to README 2026-01-19 18:48:36 +08:00
tinkle-community ee081ebc85 docs: add official website links to all README files
- Official Website: https://nofxai.com
- Data Dashboard: https://nofxos.ai/dashboard
- API Documentation: https://nofxos.ai/api-docs

Updated: EN, ZH-CN, JA, KO, RU, UK, VI
2026-01-17 23:18:37 +08:00
tinkle-community c0c89d7534 docs: update Railway deploy button with official template URL 2026-01-06 19:07:25 +08:00
tinkle-community 4804cfcb05 feat: add Railway one-click deployment support
- Add Dockerfile.railway for all-in-one container
- Add railway.toml configuration
- Add railway/nginx.conf and supervisord.conf
- Update README with Deploy on Railway button
- Update Chinese README with deployment instructions
2026-01-06 17:32:09 +08:00
tinkle-community 8b86d4d85c docs: add prerequisites section and reorganize README structure across all languages 2026-01-06 08:16:00 +08:00
tinkle-community 0408bf1f5f docs: update README with supported markets (crypto, stocks, forex, metals) 2025-12-29 22:20:48 +08:00
tinkle-community 98ba88b548 docs: add trading stats and position history screenshots 2025-12-28 22:57:03 +08:00
tinkle-community 27196a379e update docs 2025-12-21 01:28:18 +08:00
tinkle-community 710d9e4943 feat: increase default max users to 10 and add update reminder
- Change default MaxUsers from 5 to 10 in config
- Add update reminder section in install.sh output
- Add 'Keeping Updated' section in all README translations
2025-12-20 13:44:47 +08:00
tinkle-community 62df4a46f5 docs: add documentation section with architecture links to README 2025-12-15 16:05:33 +08:00
tinkle-community da1d905a31 fix: replace localhost with 127.0.0.1 and auto-detect server IP
- Install script now auto-detects server IP for remote deployments
- Changed all localhost:3000 references to 127.0.0.1:3000 for local access
- Updated README (EN/ZH) and frontend translations
2025-12-14 22:30:06 +08:00
tinkle-community 1785184481 docs: add Windows installation guide 2025-12-14 22:26:10 +08:00
tinkle-community 4725548a55 feat: fix Lighter V2 integration and improve error handling
- Fix Lighter API field name mismatches (position/size, avg_entry_price/entry_price, sign/side)
- Fix GetBalance return format to match standard fields (totalWalletBalance, totalUnrealizedProfit)
- Fix GetPositions return format to match standard fields (positionAmt, markPrice, unRealizedProfit)
- Add API Key Index field to frontend with explanation
- Update Lighter referral link
- Disable Lighter testnet (mainnet only)
- Add load error tracking for better error messages
- Remove old Lighter V1 implementation files
- Remove test credentials from test files
2025-12-14 20:50:10 +08:00
tinkle-community 48084f50cf docs: update README screenshots with backtest lab
- Rename img.png to backtest-lab.png
- Arrange 12 screenshots in 6 pairs (2 per row)
- Add Backtest Lab to Web Interface Features section
2025-12-14 00:42:26 +08:00
tinkle-community dcc16fec82 feat: add Bitget futures trading support
- Add BitgetTrader with full trading implementation
- Support one-way position mode with proper API parameters
- Add Bitget to all exchange switch statements
- Update exchange icons (Bybit, OKX, Bitget, Lighter)
- Add Bitget to frontend exchange config modal
2025-12-12 18:59:09 +08:00
tinkle-community 76574aacb2 docs: add debate arena screenshots to README 2025-12-12 16:58:44 +08:00
tinkle-community e9e60c82cb fix: further reduce competition screenshot size 2025-12-10 22:05:54 +08:00
tinkle-community b1664d4178 fix: reduce competition screenshot size 2025-12-10 22:05:19 +08:00
tinkle-community ecbedc6525 fix: OKX trading issues and improve position tracking
- Add maxMktSz check for OKX market orders to prevent exceeding limits
- Increase margin safety buffer (0.1% fee + 1% buffer) for all exchanges
- Fix Binance position closure detection with direct trade queries
- Move Recent Completed Trades before Current Positions in AI prompt
- Update README screenshots with table layout for better alignment
2025-12-10 22:01:57 +08:00
tinkle-community c720d663f1 feat: add TRANSPORT_ENCRYPTION toggle for easier deployment
- Add TRANSPORT_ENCRYPTION env config (default: false)
- Allow HTTP/IP access when transport encryption is disabled
- Add /api/crypto/config endpoint to expose encryption status
- Update WebCryptoEnvironmentCheck with 'disabled' status
- Update ExchangeConfigModal and AITradersPage to allow form submission when disabled
- Add i18n translations for disabled status (EN/CN)
- Update README with two deployment modes documentation
2025-12-09 18:04:42 +08:00
tinkle-community 5f3797e255 feat: add one-click install and simplify README
- Add docker-compose.prod.yml with env_file support
- Add install.sh with auto-generated encryption keys
- Remove API endpoints and recommendations from README
- Add multi-language links to README
2025-12-09 17:44:45 +08:00
tinkle-community 63ddeec7ba docs: rewrite README with updated features and deployment guide
- Update project description to reflect current AI trading platform
- Rewrite Core Features with 6 key capabilities
- Add complete deployment guide (Docker + manual installation)
- Update all i18n versions (zh-CN, ja, ko, ru, uk, vi)
- Remove outdated JSON config examples
2025-12-09 17:27:38 +08:00
tinkle-community 1e7c756dd7 docs: add new screenshots and update README
- Add dashboard-market-chart.png (market chart view)
- Add dashboard-positions.png (positions view)
- Add dashboard-page.png (full dashboard overview)
- Add strategy-indicators.png (technical indicators config)
- Update competition-page.png with latest UI
- Update README Screenshots section with all 7 images
2025-12-08 18:23:02 +08:00
tinkle-community 5cff32e4f2 Feature/custom strategy (#1172)
* feat: add Strategy Studio with multi-timeframe support
- Add Strategy Studio page with three-column layout for strategy management
- Support multi-timeframe K-line data selection (5m, 15m, 1h, 4h, etc.)
- Add GetWithTimeframes() function in market package for fetching multiple timeframes
- Add TimeframeSeriesData struct for storing per-timeframe technical indicators
- Update formatMarketData() to display all selected timeframes in AI prompt
- Add strategy API endpoints for CRUD operations and test run
- Integrate real AI test runs with configured AI models
- Support custom AI500 and OI Top API URLs from strategy config
* docs: add Strategy Studio screenshot to README files
* fix: correct strategy-studio.png filename case in README
* refactor: remove legacy signal source config and simplify trader creation
- Remove signal source configuration from traders page (now handled by strategy)
- Remove advanced options (legacy config) from TraderConfigModal
- Rename default strategy to "默认山寨策略" with AI500 coin pool URL
- Delete SignalSourceModal and SignalSourceWarning components
- Clean up related stores, hooks, and page components
2025-12-06 07:20:11 +08:00
tinkle-community 04f006abad docs: update airdrop program text 2025-11-27 04:08:43 +08:00
tinkle-community e98aeb2d03 docs: add priority rewards for pinned issue PRs 2025-11-27 04:05:29 +08:00
tinkle-community a5f34861c6 docs: add contributor airdrop program to all READMEs 2025-11-27 04:02:22 +08:00
tinkle-community 47c174c160 docs: move exchanges and AI models sections after screenshots 2025-11-27 03:39:42 +08:00
tinkle-community 8e0a746969 docs: add supported AI models table to all README files 2025-11-27 03:31:37 +08:00
tinkle-community 3ce631292a docs: simplify exchange sections, consolidate into Supported Exchanges table
- Remove individual exchange registration sections from all READMEs
- Remove redundant Binance, Hyperliquid, Aster DEX detailed setup sections
- Consolidate all exchange info into Supported Exchanges table with register links and setup guides
- Rename section to "Supported Exchanges (DEX/CEX Tutorials)" in respective languages
2025-11-27 03:19:59 +08:00
tinkle-community f2f91f281d docs: add Bybit, OKX, and Lighter exchange support
- Mark Bybit, OKX as supported in CEX section
- Mark Lighter as supported in Perp-DEX section
- Add Bybit API setup guide
- Add OKX API setup guide
- Add Lighter agent wallet setup guide
- Update all READMEs (EN, ZH-CN, JA, KO)
2025-11-27 03:05:19 +08:00
tinkle-community b9119b9c66 docs: add supported exchanges table and API/wallet setup guides
- Add supported exchanges table to EN, ZH-CN, JA, KO READMEs
- CEX: Binance (supported), OKX (coming soon), Bybit (coming soon)
- Perp-DEX: Hyperliquid (supported), Aster DEX (supported)
- Include referral links with fee discounts for all exchanges
- Remove What's New sections from all READMEs
- Create Binance API setup guide
- Create Hyperliquid agent wallet setup guide
- Create Aster DEX API wallet setup guide
2025-11-27 02:56:19 +08:00
tinkle-community 635870f2b0 chore: trigger cache refresh 2025-11-27 01:49:30 +08:00