Commit Graph

872 Commits

Author SHA1 Message Date
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 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
tinkle-community d8aeba6906 fix: remove unused badge property from FooterSection 2025-12-21 13:23:13 +08:00
tinkle-community 58a3253817 update docs 2025-12-21 02:40:17 +08:00
tinkle-community e5e42c8e18 update docs 2025-12-21 02:37:11 +08:00
tinkle-community 16ff57778d update docs 2025-12-21 01:36:16 +08:00
tinkle-community 27196a379e update docs 2025-12-21 01:28:18 +08:00
tinkle-community 2eb3cac7e1 update docs 2025-12-21 01:17:34 +08:00
tinkle-community bbda385696 docs: update legal framework to international copyright treaties 2025-12-20 23:50:13 +08:00
tinkle-community 0407bca549 docs: add legal remedies for AGPL infringement 2025-12-20 23:46:00 +08:00
tinkle-community 35c1bae4e0 docs: add ChainOpera evidence screenshot 2025-12-20 23:40:59 +08:00
tinkle-community cd5126599f docs: update contact email 2025-12-20 23:32:57 +08:00
tinkle-community cbc66a85e8 docs: add AGPL violation evidence report against ChainOpera (CN/EN)
- Add Chinese version: AGPL-VIOLATION-REPORT-ChainOpera.md
- Add English version: AGPL-VIOLATION-REPORT-ChainOpera-EN.md
- Document timeline evidence, technical comparison, and legal analysis
- Address "Python rewrite" defense with AGPL and copyright law references
2025-12-20 23:26:20 +08:00
tinkle-community 0009c9c3dd feat: add BOLL (Bollinger Bands) indicator to Strategy Studio
- Add BOLL to frontend indicator grid with period selection
- Add BOLL calculation (upper/middle/lower bands) in market data
- Add BOLL fields to TimeframeSeriesData struct
- Integrate BOLL into AI decision engine prompts
- Support multi-timeframe BOLL analysis
2025-12-20 16:17:16 +08:00
tinkle-community 8e57fb986f fix: improve exchange/model edit and usage status display
- Fixed ExchangeConfigModal to use allExchanges for editing
- Improved wallet address display layout (moved to right side)
- Added privacy toggle and copy button for addresses
- Enhanced usage status for both AI models and exchanges:
  - Shows '2/3 Running' when traders are active (green badge)
  - Shows '2 Traders' when assigned but stopped (yellow badge)
  - Shows 'Idle' when enabled but not used
  - Shows 'Configured' when not enabled
2025-12-20 15:53:43 +08:00
tinkle-community d1ff1c2375 fix: exchange edit modal now shows account data correctly
Fixed ExchangeConfigModal to receive allExchanges (user's configured accounts)
instead of supportedExchanges (templates only), so editing an exchange now
properly displays account name and other non-sensitive information.
2025-12-20 15:30:54 +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
wqqqqqq 7baa07738a feat: implement coinank openapi rank interface (#1250)
- implement VisualScreener Rank
- implement More Instrument Agg Rank
- rank interface can help user to choose a coin
2025-12-20 01:12:50 +08:00
tinkle-community e2d702c662 feat: enhance backtest with real-time positions, P&L fixes, and strategy integration
- Add real-time position display with unrealized P&L during backtest
- Fix P&L calculation by tracking accumulated opening fees
- Add strategy coin source resolution (AI500, OI Top, mixed)
- Infer AI provider from model name for better compatibility
- Cap position size to available margin to prevent insufficient cash errors
- Fix trade markers on K-line chart (long/short instead of buy/sell)
- Add QuantData and OI ranking to backtest decision context
2025-12-20 01:10:11 +08:00
tinkle-community 5534861fe5 feat: display wallet address for perp-dex exchanges with visibility toggle
- Add wallet address display for perp-dex exchanges (hyperliquid, lighter, aster)
- Add eye icon to toggle address visibility (truncated/full)
- Add copy to clipboard functionality
- Fix dashboard refresh losing selected trader
- Use URL slug format (name-id4) for trader identification
2025-12-19 18:38:21 +08:00
tinkle-community 97f58b49f4 feat: add experience improvement module and system config storage (#1248)
- Add experience module for product telemetry
- Add system_config table for persistent settings
- Update privacy policy documentation
2025-12-19 13:57:08 +08:00
wqqqqqq c81e6b0094 feat: implement coinank openapi liquidation interface (#1247)
- implement LiquidationExchangeStatistics,LiquidationCoinAggHistory in provider/coinank/liquidation.go
- implement LiquidationHistory,LiquidationOrders in provider/coinank/liquidation.go
2025-12-18 21:44:43 +08:00
wqqqqqq 182265c1d0 feat: implement coinank openapi Instruments interface (#1243)
- implement OpenInterestAll,OpenInterestChartV2,OpenInterestSymbolChart,OpenInterestKline in provider/coinank/open_interest.go
- implement OpenInterestAggKline,TickersTopOIByEx,InstrumentsOiVsMc in provider/coinank/open_interest.go
2025-12-17 18:55:31 +08:00
wqqqqqq 612e25db66 feat: init coinank openapi http request framework (#1240) 2025-12-17 10:22:02 +08:00
tinkle-community b169fcd3d2 feat: add time period selector to competition chart (1D/3D/7D/30D/All) 2025-12-17 03:51:21 +08:00