Commit Graph

1032 Commits

Author SHA1 Message Date
667ac44b03 Update SpotBot tolerance calculation to 0.6% to better account for slippage; adjust logging to reflect new tolerance value for position synchronization checks. 2025-12-23 10:13:39 +07:00
30bdc8c114 Update dependency versions in bun.lock and package.json for consistency; lock specific versions for @gelatonetwork/relay-sdk, cross-fetch, lodash, query-string, typescript, and viem; add overrides for viem to ensure compatibility across the project. 2025-12-20 16:15:39 +07:00
73afdf4328 Update build script in package.json to use 'bunx tsc' for TypeScript compilation, enhancing build process consistency. 2025-12-20 16:05:58 +07:00
4fda65e3c2 Enhance error handling in TradingService by capturing exceptions with Sentry; update TypeScript version in package.json for improved features; modify tsconfig.json to exclude unnecessary directories; add new performance benchmark entries in CSV files for better tracking of telemetry data. 2025-12-20 15:53:16 +07:00
e9b4878ffa Refactor BacktestExecutor and TradingBotBase for performance optimizations; remove unused SignalCache and pre-calculation logic; implement caching for open position state and streamline signal access with TryGetValue; enhance logging for detailed timing breakdown during backtest execution. 2025-12-20 10:05:07 +07:00
415845ed5a Refactor BacktestSpotBot signal generation to utilize base implementation for optimizations; update BacktestExecutorTests with revised metrics reflecting recent backtest results; add new performance benchmark entries for improved tracking. 2025-12-19 18:00:37 +07:00
b52f00a450 Remove agent logging and debug statements from gmx.ts to streamline token approval and position opening processes; enhance code clarity and maintainability. 2025-12-19 16:34:42 +07:00
af20a2c503 Fix futures open positions 2025-12-19 16:29:34 +07:00
e6880c9b18 Update fullstack guidelines to use 'bun' instead of 'npm' for testing; modify package.json to lock specific versions of dependencies for consistency; adjust TypeScript code for improved type handling in simulateExecuteOrder function; enhance swap-tokens test with additional parameters for better coverage. 2025-12-19 12:07:54 +07:00
Oda
6d64af7c01 Update sdk (#39)
* Update .DS_Store files and remove obsolete ABI JSON files from Managing.Web3Proxy; enhance bun.lock and package.json for dependency consistency.

* Update import statements in TypeScript files to include .js extensions for consistency across the gmxsdk module.
2025-12-18 21:45:54 +07:00
bcb00b9a86 Refactor pagination sorting parameters across multiple controllers and services to use the new SortDirection enum; update related API models and TypeScript definitions for consistency. Fix minor documentation and naming inconsistencies in the Bot and Data controllers. 2025-12-14 20:23:26 +07:00
cb6b52ef4a Upgrade Vite to version 7.2.7 in package.json and bun.lock; update source-map dependency versions across multiple entries for consistency and compatibility. 2025-12-14 01:53:59 +07:00
eff0c11f26 Refactor Sentry initialization in Program.cs to conditionally set DSN based on configuration; enhance DiscordService to create a service scope for command module registration. 2025-12-14 01:24:24 +07:00
71aff19eb5 Update .DS_Store binary file 2025-12-14 01:24:08 +07:00
e0e4dda808 Set config to env variables 2025-12-14 01:15:40 +07:00
2157d1f2c9 Remove references to Managing.Aspire.AppHost and Managing.Aspire.ServiceDefaults from solution and project files; update API project to eliminate unused references and adjust JWT token handling in Program.cs; enhance NSwag generation for Axios and Fetch clients, including new import handling. 2025-12-14 00:18:02 +07:00
0126377486 Remove obsolete configuration files and project references from Managing.Aspire.AppHost and Managing.Aspire.ServiceDefaults 2025-12-14 00:16:25 +07:00
588927678c Use bun for web3proxy and webui 2025-12-13 17:46:25 +07:00
c4e444347c Fix bot update with the tradingtype 2025-12-13 14:46:30 +07:00
e6cac0057b Uodate Env key for flagsmith prod 2025-12-12 02:49:07 +07:00
87bc2e9dce Enhance PostgreSqlBacktestRepository to include PositionCount in backtest mappings
- Updated the mapping logic in multiple methods to include PositionCount alongside existing fields such as NetPnl, Score, and InitialBalance.
2025-12-12 01:44:34 +07:00
5328d760dd Add support for backtesting trading types in LiveTradingBotGrain and TradingBox
- Introduced handling for TradingType.BacktestFutures and TradingType.BacktestSpot in LiveTradingBotGrain.
- Updated TradingBox to map backtest trading types to their respective futures and spot types.
2025-12-11 23:41:53 +07:00
a254db6d24 Update bot market type 2025-12-11 23:32:06 +07:00
35df25915f Add flagsmith 2025-12-11 19:22:54 +07:00
65d00c0b9a Add reconcilliation for cancelled position if needed 2025-12-11 18:35:25 +07:00
1426f0b560 Clean code, remove warning for future and spot 2025-12-11 14:36:35 +07:00
df8c199cce Clean tradingbot and spot and future 2025-12-11 14:10:38 +07:00
292a48d108 Fix close position 2025-12-11 12:23:01 +07:00
8ff9437400 Fix a bit the spot trading 2025-12-10 23:16:46 +07:00
931af3d3af Refactor SpotBot and ExchangeService for balance retrieval
- Updated SpotBot to fetch token balance directly using the new GetBalance method in IExchangeService.
- Modified IExchangeService to include a method for retrieving balance by ticker.
- Enhanced ExchangeService to implement the new balance retrieval logic for both EVM and non-EVM exchanges.
- Updated TokenService to streamline contract address and decimal retrieval for various tokens.
- Adjusted TradesModal to reflect changes in position status handling.
2025-12-08 23:37:10 +07:00
a2ed4edd32 Implement spot position history retrieval in SpotBot and related services
- Added CheckSpotPositionInExchangeHistory method to SpotBot for verifying closed positions against exchange history.
- Enhanced logging for Web3Proxy errors during position verification.
- Introduced GetSpotPositionHistory method in IEvmManager, IExchangeService, and IWeb3ProxyService interfaces.
- Implemented GetSpotPositionHistory in EvmManager and ExchangeService to fetch historical swap data.
- Updated GMX SDK integration to support fetching spot position history.
- Modified generated API types to include new trading type and position history structures.
2025-12-07 19:20:47 +07:00
15d8b38d8b Adapt spot for recovery 2025-12-05 15:24:51 +07:00
78edd850fe Add isLiveTrading helper to fix bug 2025-12-04 23:42:09 +07:00
b44e1f66a7 Fix spot bot 2025-12-04 21:21:48 +07:00
a07d7ede18 Fix backtest spot 2025-12-03 16:47:32 +07:00
c932fef289 Add spot trading 2025-12-02 14:38:54 +07:00
9f4aa16997 Update benchmark 2025-12-02 00:03:33 +07:00
5bd03259da Add BacktestSpotBot and update BacktestExecutor for spot trading support
- Introduced BacktestSpotBot class to handle backtesting for spot trading scenarios.
- Updated BacktestExecutor to support both BacktestFutures and BacktestSpot trading types.
- Enhanced error handling to provide clearer messages for unsupported trading types.
- Registered new command handlers for OpenSpotPositionRequest and CloseSpotPositionCommand in ApiBootstrap.
- Added unit tests for executing backtests with spot trading configurations, ensuring correct behavior and metrics validation.
2025-12-01 23:41:23 +07:00
3771bb5dde Refactor SwapGmxTokens functionality into TradingService
- Moved SwapGmxTokensAsync method from AccountService to TradingService to centralize trading operations.
- Updated AccountController and AgentGrain to utilize the new TradingService method for swapping GMX tokens.
- Removed the old SwapGmxTokensAsync method from IAccountService and its implementation in AccountService.
2025-12-01 22:49:30 +07:00
Oda
9d536ea49e Refactoring TradingBotBase.cs + clean architecture (#38)
* Refactoring TradingBotBase.cs + clean architecture

* Fix basic tests

* Fix tests

* Fix workers

* Fix open positions

* Fix closing position stucking the grain

* Fix comments

* Refactor candle handling to use IReadOnlyList for chronological order preservation across various components
2025-12-01 19:32:06 +07:00
ab26260f6d Prepare for refactoring 2025-11-26 19:26:57 +07:00
f81a2da9df Fix tests 2025-11-26 18:42:02 +07:00
cef8073314 Remove comments 2025-11-26 10:38:24 +07:00
a93c738032 Build docker image for workers 2025-11-25 12:26:17 +07:00
3802187155 Update BB volume protection 2025-11-25 12:04:26 +07:00
4b5c1c5ce0 Fix graph 2025-11-25 11:03:52 +07:00
6376e13b07 Add Bollinger Bands Volatility Protection indicator support
- Introduced BollingerBandsVolatilityProtection indicator in GeneticService with configuration settings for period and standard deviation (stdev).
- Updated ScenarioHelpers to handle creation and validation of the new indicator type.
- Enhanced CustomScenario, backtest, and scenario pages to include BollingerBandsVolatilityProtection in indicator lists and parameter mappings.
- Modified API and types to reflect the addition of the new indicator in relevant enums and mappings.
- Updated frontend components to support new parameters and visualization for Bollinger Bands.
2025-11-25 02:12:57 +07:00
3ec1da531a Fix stuck the bundle backtests 2025-11-25 00:12:23 +07:00
4b33b01707 Update ichimoku 2025-11-24 20:02:14 +07:00
4268626897 Add IchimokuKumoTrend indicator support across application
- Introduced IchimokuKumoTrend indicator in GeneticService with configuration settings for tenkanPeriods, kijunPeriods, senkouBPeriods, offsetPeriods, senkouOffset, and chikouOffset.
- Updated ScenarioHelpers to handle creation and validation of the new indicator type.
- Enhanced CustomScenario, backtest, and scenario pages to include IchimokuKumoTrend in indicator lists and parameter mappings.
- Modified API and types to reflect the addition of the new indicator in relevant enums and mappings.
2025-11-24 19:43:18 +07:00