Commit Graph

74 Commits

Author SHA1 Message Date
1426f0b560 Clean code, remove warning for future and spot 2025-12-11 14:36:35 +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
b7796ede0c Add logging for owned keys in KaigenService
- Enhanced logging to include the count of owned keys fetched for a user.
- Added detailed logging for each owned key's agent name.
2025-11-19 23:18:56 +07:00
799b27b0a8 Remove credit have to be enable for owned keys 2025-11-19 21:12:25 +07:00
87712038ff Update configs 2025-11-18 11:23:21 +07:00
8697f1598d Add validation for Kudai strategy staking requirements in StartCopyTradingCommandHandler. Implemented methods in IEvmManager to retrieve staked KUDAI balance and GBC NFT count. Enhanced error handling for staking checks. 2025-11-17 12:57:47 +07:00
c229212acd Add copy trading authorization checks in LiveTradingBotGrain and StartCopyTradingCommandHandler. Integrated IKaigenService to verify user ownership of master strategy keys before allowing copy trading. Enhanced error handling and logging for authorization verification. 2025-11-16 22:11:54 +07:00
ffe1bed051 Prepare production deploy 2025-10-27 19:23:12 +07:00
fc4369a008 Add start and enddate when fetching the position history 2025-10-24 18:00:23 +07:00
79f07af899 Fix get Balance 2025-10-20 16:20:36 +07:00
e3f2577db4 Prevent no last candle error 2025-10-11 13:59:09 +07:00
e917edd939 Add more logs, 95%ram alert for GmxMarkets, Proxy retry 2times max 2025-10-11 13:43:32 +07:00
04df72a6bd Fix .First Position update + add more details when position rejected 2025-10-11 12:27:54 +07:00
67065469a6 Fix config update + remove messages + Summary fix for not open position 2025-10-08 02:52:11 +07:00
dac0a9641f Fetch closed position to get last pnl realized 2025-10-05 23:31:17 +07:00
de0d042254 Use usdc balance instead usdc value for ensuring balance check 2025-10-05 01:36:25 +07:00
343b85dada Fix fetch and restart bot 2025-10-04 18:31:50 +07:00
a97b5804a0 Update position saving and update 2025-10-04 17:38:01 +07:00
1e19e29cec Fix get Gas fees + position direction list 2025-09-26 12:02:07 +07:00
bcfeb693ce Update account/position and platform summary 2025-09-26 01:18:59 +07:00
40f3c66694 Add ETH and USDC balance check before start/restart bot and autoswap 2025-09-23 14:03:46 +07:00
931c4661dc Fix get current price 2025-09-20 16:20:47 +07:00
d58672f879 Add retry + idempotency on trading when try + add more tts 2025-09-20 02:28:16 +07:00
Oda
cee3902a4d Update SDK (#35)
* Update SDK for swap

* Fix web3proxy build

* Update types

* Fix swap

* Send token test and BASE transfer

* fix cache and hook

* Fix send

* Update health check with uiFeereceiver

* Fix sdk

* Fix get positions

* Fix timeoutloop

* Fix open position

* Fix closes positions

* Review
2025-09-17 14:28:56 +07:00
a922ae961a Fix datetime 2025-09-14 17:33:45 +07:00
Oda
56b4f14eb3 Price reminder and init approval
* Start price reminder grain

* Add config and init grain at startup

* Save init wallet when already init
2025-09-13 02:29:14 +07:00
7c58e1d7d2 Add missing privy tokens 2025-08-17 01:45:13 +07:00
3464e072d6 Update get balance for token not handle by privy 2025-08-17 01:32:00 +07:00
289fd25dc3 Add agent balance fetch from proxy 2025-08-15 20:52:37 +07:00
Oda
082ae8714b Trading bot grain (#33)
* Trading bot Grain

* Fix a bit more of the trading bot

* Advance on the tradingbot grain

* Fix build

* Fix db script

* Fix user login

* Fix a bit backtest

* Fix cooldown and backtest

* start fixing bot start

* Fix startup

* Setup local db

* Fix build and update candles and scenario

* Add bot registry

* Add reminder

* Updateing the grains

* fix bootstraping

* Save stats on tick

* Save bot data every tick

* Fix serialization

* fix save bot stats

* Fix get candles

* use dict instead of list for position

* Switch hashset to dict

* Fix a bit

* Fix bot launch and bot view

* add migrations

* Remove the tolist

* Add agent grain

* Save agent summary

* clean

* Add save bot

* Update get bots

* Add get bots

* Fix stop/restart

* fix Update config

* Update scanner table on new backtest saved

* Fix backtestRowDetails.tsx

* Fix agentIndex

* Update agentIndex

* Fix more things

* Update user cache

* Fix

* Fix account load/start/restart/run
2025-08-05 04:07:06 +07:00
5fabfbfadd fix backtest credit 2025-07-31 20:58:37 +07:00
36cb672ce4 Update front and config 2025-07-29 03:02:33 +07:00
Oda
422fecea7b Postgres (#30)
* Add postgres

* Migrate users

* Migrate geneticRequest

* Try to fix Concurrent call

* Fix asyncawait

* Fix async and concurrent

* Migrate backtests

* Add cache for user by address

* Fix backtest migration

* Fix not open connection

* Fix backtest command error

* Fix concurrent

* Fix all concurrency

* Migrate TradingRepo

* Fix scenarios

* Migrate statistic repo

* Save botbackup

* Add settings et moneymanagement

* Add bot postgres

* fix a bit more backups

* Fix bot model

* Fix loading backup

* Remove cache market for read positions

* Add workers to postgre

* Fix workers api

* Reduce get Accounts for workers

* Migrate synth to postgre

* Fix backtest saved

* Remove mongodb

* botservice decorrelation

* Fix tradingbot scope call

* fix tradingbot

* fix concurrent

* Fix scope for genetics

* Fix account over requesting

* Fix bundle backtest worker

* fix a lot of things

* fix tab backtest

* Remove optimized moneymanagement

* Add light signal to not use User and too much property

* Make money management lighter

* insert indicators to awaitable

* Migrate add strategies to await

* Refactor scenario and indicator retrieval to use asynchronous methods throughout the application

* add more async await

* Add services

* Fix and clean

* Fix bot a bit

* Fix bot and add message for cooldown

* Remove fees

* Add script to deploy db

* Update dfeeploy script

* fix script

* Add idempotent script and backup

* finish script migration

* Fix did user and agent name on start bot
2025-07-27 20:42:17 +07:00
f6013b8e9d Add encryption for Kaigen server auth 2025-07-17 16:50:54 +07:00
6a634eafaa Update get backtests 2025-07-17 04:40:18 +07:00
e4de01211d Add flag for credit 2025-07-17 02:41:02 +07:00
4b18d43b3f Update payload 2025-07-17 01:59:37 +07:00
3bd22922c7 Update kaigen credit private key 2025-07-17 00:46:30 +07:00
11778aa2a4 Add kaigen debit credit for backtest 2025-07-15 10:31:21 +07:00
f973be2e08 Send tokens 2025-07-06 14:39:01 +07:00
c7dec76809 Swap tokens 2025-07-06 14:00:44 +07:00
3f34c56968 Get fees to claims 2025-06-13 14:22:38 +07:00
7147072836 Fix cache for get candle 2025-06-09 16:37:37 +07:00
456867c352 fix signal and get position during closing 2025-05-14 14:48:01 +07:00
549c4ae746 Add initAddress api 2025-05-10 14:41:17 +07:00
8a3c09809f Fix cache reference 2025-04-30 14:04:37 +07:00
bc1ef78747 Fix worker cancelled on worker + Cache tickers 2025-04-30 13:19:03 +07:00
bc8aa2f2a8 Update tickers 2025-04-29 02:07:02 +07:00
1121a7c6d3 Update healthcheck and display pnl on trades 2025-04-26 14:48:23 +07:00