Commit Graph

895 Commits

Author SHA1 Message Date
tinkle-community
bdfd8dc0d0 fix: auto-restart trader on config update and add scan interval debug logs
- RemoveTrader now stops running trader before removing from memory
- handleUpdateTrader auto-restarts trader if it was running before update
- Add debug logs to trace scan_interval_minutes through update/save/load flow
2026-01-04 01:27:30 +08:00
tinkle-community
0275e23b7e feat: unify NofxOS data provider and fix language consistency
- Add unified NofxOS API key configuration in IndicatorEditor
- Add language field to StrategyConfig for consistent prompt generation
- Auto-update prompt sections when interface language changes
- Remove scattered URL inputs from CoinSourceEditor and IndicatorEditor
- Create nofxos provider package with formatted data output
- Update kernel engine to use config-based language setting
2026-01-04 00:59:07 +08:00
tinkle-community
13fda47151 refactor: rename decision package to kernel 2026-01-03 14:25:40 +08:00
tinkle-community
d664dcca3d style: update CSS styles 2026-01-03 13:44:44 +08:00
tinkle-community
04141642a5 feat: improve landing page responsiveness and styling 2026-01-03 13:12:25 +08:00
tinkle-community
7f7c4ea2a7 fix: sanitize API error messages to prevent sensitive info exposure 2026-01-03 13:11:15 +08:00
tinkle-community
e07dc0de86 feat: add excluded coins filter for strategy
- Add excluded_coins field to CoinSourceConfig
- Filter excluded coins in GetCandidateCoins function
- Add excluded coins UI in CoinSourceEditor
2026-01-03 01:21:17 +08:00
tinkle-community
cc726adb57 feat: add strategy publish settings and reorder navigation
- Add is_public and config_visible fields to Strategy type
- Add PublishSettingsEditor component for strategy studio
- Enable GORM AutoMigrate to add new columns
- Reorder nav: Market → Config → Dashboard → Strategy → Leaderboard → Arena → Backtest → FAQ
- Rename Live to Leaderboard, Debate Arena to Arena
2026-01-03 00:52:11 +08:00
tinkle-community
7df8197542 fix: convert branch name for docker manifest tags 2026-01-01 23:34:43 +08:00
tinkle-community
60194306e1 feat: add stable release branch support
- Add release/stable branch to CI workflow
- Create docker-compose.stable.yml with :stable tag
- Create install-stable.sh for one-click deployment
- Add stable tag creation in manifest step
2026-01-01 23:27:53 +08:00
tinkle-community
f3fffd638d merge: resolve conflicts and update hyperliquid config 2026-01-01 23:12:51 +08:00
tinkle-community
09117bb404 feat: add strategy market, login overlay, and registration limit page
- Add public strategy market API endpoint (/api/strategies/public)
- Add is_public and config_visible fields to Strategy model
- Add LoginRequiredOverlay component for unified auth prompts
- Add WhitelistFullPage for registration capacity limit
- Add StrategyMarketPage for browsing public strategies
- Unify navigation logic across HeaderBar, LandingPage, App
- Reduce klines API calls (fetch once on mount)
- Fix various page transition issues
2026-01-01 23:05:58 +08:00
tinkle-community
4520b9ee88 fix: convert INTEGER columns to BOOLEAN for PostgreSQL compatibility
Fix type mismatch where Go bool fields couldn't be encoded into PostgreSQL int4 columns.
Affects: reduce_only, close_position, price_protect (trader_orders), is_maker (trader_fills)
2026-01-01 23:01:17 +08:00
tinkle-community
52d3f479cb feat: enhance market access strip UI and update fallback stats 2026-01-01 19:44:14 +08:00
tinkle-community
2d272bb7b8 feat: migrate store layer to GORM with PostgreSQL support
- Migrate all store packages from raw database/sql to GORM ORM
- Add PostgreSQL support alongside SQLite
- Move EncryptedString type to crypto package for cleaner architecture
- Add automatic encryption/decryption for sensitive fields (API keys, secrets)
- Fix PostgreSQL AutoMigrate conflicts by skipping existing tables
- Fix duplicate /klines route registration
- Update tests to use GORM database connections
- Add database configuration support in config package
2026-01-01 19:32:49 +08:00
tinkle-community
d547863ebb feat: add SQLite/PostgreSQL database switching support 2026-01-01 15:25:30 +08:00
tinkle-community
1af4589320 fix: improve Hyperliquid order execution compatibility 2026-01-01 13:23:36 +08:00
tinkle-community
74adedbc64 feat: improve landing page UI and add pprof port mapping 2026-01-01 13:09:54 +08:00
tinkle-community
445c3aad69 feat: add pprof server for memory profiling 2025-12-31 13:19:58 +08:00
tinkle-community
a555cbe463 fix: remove unused maskSecret function 2025-12-31 13:19:01 +08:00
tinkle-community
8f540ae17c feat: improve Hyperliquid agent wallet config UX and guidance 2025-12-31 12:56:19 +08:00
wqqqqqq
04e0cbad83 feat: implement coinank free base coin interface (#1293)
- implement coinank free base coin interface in coinank_api.BaseCoinSymbols
2025-12-30 23:25:08 +08:00
tinkle-community
13bc752e82 feat: redesign landing page with new brand components
- Add brand components: BrandHero, BrandFeatures, BrandStats, Marquee
- Add core components: TerminalHero, AgentGrid, LiveFeed
- Add mascot images
- Update LandingPage with new component structure
- Update CSS and Tailwind config for new design
- Add market data enhancements
2025-12-30 21:27:33 +08:00
tinkle-community
70eb35d6de feat: add Qwen LLM integration for AI-powered indicator calculation
- Add QwenAgent client for Alibaba Cloud Bailian platform
- Support both sync and streaming chat modes
- Add multi-turn conversation with session management
- Add OpenAI-compatible API support
- Add indicator calculation tests comparing local vs AI results
- Use environment variables for API credentials (QWEN_APP_ID, QWEN_API_KEY)
2025-12-30 21:26:07 +08:00
tinkle-community
ad04994d75 feat: improve order sync and add xyz dex trigger orders
- Add incremental sync for Binance trades using COMMISSION detection and fromId
- Add stop loss and take profit order support for xyz dex assets
- Add pagination for current positions and position history in UI
- Fix chart market type auto-selection based on exchange
2025-12-30 14:32:51 +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
47bff87966 feat: add xyz dex balance calculation, market data providers, and UI improvements
- Fix xyz dex balance calculation (use marginSummary for isolated margin)
- Add Alpaca provider for US stocks market data
- Add TwelveData provider for forex & metals market data
- Add Hyperliquid kline provider
- Centralize API keys in config system
- Add builder fee for order routing
- Improve chart UI with compact design
- Fix position history fee display precision
- Add comprehensive balance calculation tests
2025-12-29 22:16:48 +08:00
tinkle-community
4776fc37ce feat: add metric formula tooltips with KaTeX rendering 2025-12-29 00:28:20 +08:00
tinkle-community
7b30b687eb feat: improve user experience 2025-12-28 23:29:59 +08:00
tinkle-community
98ba88b548 docs: add trading stats and position history screenshots 2025-12-28 22:57:03 +08:00
tinkle-community
c83b29bec5 fix: use local sqlite3 to clear trading data before starting services 2025-12-28 22:35:33 +08:00
tinkle-community
d5a2f8ef8d fix: read user input from /dev/tty when piped via curl 2025-12-28 22:15:47 +08:00
tinkle-community
b228412821 feat: add trading stats to AI context and one-click deployment data clearing
- Add historical trading statistics to AI decision context with language detection
- Remove win rate from metrics, focus on profit factor, sharpe ratio, win/loss ratio
- Add option to clear trading data tables during one-click deployment
- Add sqlite to Docker runtime for container-based data clearing
2025-12-28 22:09:47 +08:00
tinkle-community
d74867c220 feat: add position history API and frontend integration
- Add /positions/history API endpoint
- Add position history types and API client
- Add translations for position history page
- Integrate PositionHistory component in App
2025-12-28 21:05:18 +08:00
tinkle-community
1c32c2ab08 fix: remove leverage from position history and fix max drawdown calculation
- Remove leverage column from position history table
- Fix max drawdown calculation using virtual starting equity
- Add formula tooltips for all statistics metrics
- Remove leverage parameter from pnlPct calculation
2025-12-28 21:03:37 +08:00
tinkle-community
0f3ba1382a feat: use coinank free API for kline data and show exchange badge
- Switch to coinank free/open kline API (no authentication required)
- Add exchange badge display with brand colors (Binance/Bybit/OKX/Hyperliquid/Aster)
- Auto-convert OKX symbol format (BTCUSDT -> BTC-USDT-SWAP)
- Fallback to Binance data for unsupported exchanges (Bitget/Lighter)
- Pass exchange prop from trader account to chart component
2025-12-27 23:35:15 +08:00
tinkle-community
9c66afd7a0 fix: use position's actual margin mode when closing OKX positions
- Parse mgnMode field from OKX positions API response
- Use position's mgnMode (cross/isolated) in close orders instead of hardcoding cross
- This fixes 'no position in this direction' error when closing isolated margin positions
2025-12-27 22:11:36 +08:00
tinkle-community
e204707845 fix: align order markers to kline candles using binary search
- Use binary search to find exact kline candle for each order
- Sort markers by time as required by lightweight-charts
- Filter orders outside kline data range
- Based on lightweight-charts issue #1182 recommendation
2025-12-27 19:38:01 +08:00
tinkle-community
8fb0d2e7e9 feat: order sync for multiple exchanges and position tracking improvements
- Add order sync support for Binance, Hyperliquid, Bybit, OKX, Bitget, Aster exchanges
- Fix weighted average exit price calculation for partial closes
- Handle position flip (翻仓) scenarios correctly
- Fix symbol normalization (ETH vs ETHUSDT)
- Skip order recording for exchanges with OrderSync to avoid duplicates
- Add chart timezone localization
2025-12-27 19:13:04 +08:00
tinkle-community
46922f8c53 feat: add multi-exchange order sync and position tracking
- Add order sync implementations for Hyperliquid, Bybit, OKX, Bitget, Aster
- Add position snapshot functionality for exchange position reset
- Update TraderOrder and TraderFill structures with exchange_type field
- Add exchange sync tests
- Update frontend charts components
- Remove deprecated position_sync.go
2025-12-27 02:09:48 +08:00
tinkle-community
2172b252a5 fix: position accumulation for split orders with same timestamp
- Fix CreateOpenPosition to accumulate into existing position when same
  exchange_position_id exists, instead of silently skipping
- Add GetOpenPositionByExchangePositionID method for lookup by exchange ID
- Update UpdatePositionQuantityAndPrice to also update entry_quantity
- This fixes the issue where split orders (same millisecond) only recorded
  the first order's quantity instead of the total position size
2025-12-27 02:08:22 +08:00
wqqqqqq
24cd329f3d feat: implement coinank free kline api and kline websocket (#1281)
- implement coinank free kline api in coinank_api.Kline
- implement coinank free kline ws in coinank_api.KlineWs. if needKline is true, kline data read from KlineCh. if needTicker is true, tickers data  read from TickersCh.
2025-12-27 01:54:44 +08:00
tinkle-community
e591ed8226 fix: normalize symbol comparison to prevent duplicate data in AI input
Use market.Normalize() for both position and candidate symbols to handle
different formats (ETH vs ETHUSDT), ensuring positions are correctly
excluded from candidate list.
2025-12-26 04:13:34 +08:00
tinkle-community
6a2abfa96d feat: improve AI decision input format and chart UX
Backend changes:
- Add symbol headers to market data sections for clarity
- Add symbol labels to quantitative data output
- Skip position coins in candidate list to avoid duplicate data

Frontend changes:
- Add B/S toggle button to show/hide order markers
- Remove bottom legend (B BUY S SELL)
- Fix chart position reset on data refresh
- Separate marker toggle logic from data loading
2025-12-26 02:43:34 +08:00
tinkle-community
4ff9d21783 fix: increase watermark visibility
- Increase color opacity to 0.15
- Add overall opacity 0.6 for better visibility
- Enhance text shadow effect
- Adjust z-index to 1
2025-12-26 02:14:07 +08:00
tinkle-community
60200b8460 feat: add elegant NOFX watermark to chart
- Add centered watermark with gradient effect
- Semi-transparent, non-intrusive design
- Professional branding for market charts
2025-12-26 02:10:33 +08:00
tinkle-community
39e7df253a fix: update vitest to 4.0.16 to resolve security vulnerabilities
- Fix esbuild vulnerability (GHSA-67mh-4wv8-2f99)
- Update vitest from 2.1.9 to 4.0.16
- Resolves 5 moderate severity vulnerabilities
2025-12-26 01:06:48 +08:00
tinkle-community
1744e7f38e feat: migrate to CoinAnk API and improve chart UI
- Chart improvements: professional styling, popular symbols quick selection, simplified B/S legend
- Data source migration: use CoinAnk API exclusively for all kline data
- Code cleanup: remove Binance WebSocket cache and related code (websocket_client.go, combined_streams.go, monitor.go)
- Log optimization: reduce hook spam, suppress 404 errors, increase P&L diff threshold
- Lighter integration: add order sync functionality, fix market order precision
- Remove ticker merge logic for simplicity
2025-12-26 00:58:12 +08:00
wqqqqqq
54b24167a7 feat: implement coinank openapi kline interface (#1275)
- implement kline interface
2025-12-25 14:24:35 +08:00
wqqqqqq
c328e23278 feat: implement coinank openapi netPositions interface (#1258)
- implement Net long & Net short interface
2025-12-23 00:06:14 +08:00