Commit Graph

191 Commits

Author SHA1 Message Date
868c7bdb65 Fix getbalance + fix get orders for bot 2025-04-21 12:15:53 +02:00
Oda
528c62a0a1 Filter everything with users (#16)
* Filter everything with users

* Fix backtests and user management

* Add cursor rules

* Fix backtest and bots

* Update configs names

* Sign until unauth

* Setup delegate

* Setup delegate and sign

* refact

* Enhance Privy signature generation with improved cryptographic methods

* Add Fastify backend

* Add Fastify backend routes for privy

* fix privy signing

* fix privy client

* Fix tests

* add gmx core

* fix merging sdk

* Fix tests

* add gmx core

* add gmx core

* add privy to boilerplate

* clean

* fix

* add fastify

* Remove Managing.Fastify submodule

* Add Managing.Fastify as regular directory instead of submodule

* Update .gitignore to exclude Managing.Fastify dist and node_modules directories

* Add token approval functionality to Privy plugin

- Introduced a new endpoint `/approve-token` for approving ERC20 tokens.
- Added `approveToken` method to the Privy plugin for handling token approvals.
- Updated `signPrivyMessage` to differentiate between message signing and token approval requests.
- Enhanced the plugin with additional schemas for input validation.
- Included new utility functions for token data retrieval and message construction.
- Updated tests to verify the new functionality and ensure proper request decoration.

* Add PrivyApproveTokenResponse model for token approval response

- Created a new class `PrivyApproveTokenResponse` to encapsulate the response structure for token approval requests.
- The class includes properties for `Success` status and a transaction `Hash`.

* Refactor trading commands and enhance API routes

- Updated `OpenPositionCommandHandler` to use asynchronous methods for opening trades and canceling orders.
- Introduced new Fastify routes for opening positions and canceling orders with appropriate request validation.
- Modified `EvmManager` to handle both Privy and non-Privy wallet operations, utilizing the Fastify API for Privy wallets.
- Adjusted test configurations to reflect changes in account types and added helper methods for testing Web3 proxy services.

* Enhance GMX trading functionality and update dependencies

- Updated `dev:start` script in `package.json` to include the `-d` flag for Fastify.
- Upgraded `fastify-cli` dependency to version 7.3.0.
- Added `sourceMap` option to `tsconfig.json`.
- Refactored GMX plugin to improve position opening logic, including enhanced error handling and validation.
- Introduced a new method `getMarketInfoFromTicker` for better market data retrieval.
- Updated account type in `PrivateKeys.cs` to use `Privy`.
- Adjusted `EvmManager` to utilize the `direction` enum directly for trade direction handling.

* Refactor GMX plugin for improved trading logic and market data retrieval

- Enhanced the `openGmxPositionImpl` function to utilize the `TradeDirection` enum for trade direction handling.
- Introduced `getTokenDataFromTicker` and `getMarketByIndexToken` functions for better market and token data retrieval.
- Updated collateral calculation and logging for clarity.
- Adjusted `EvmManager` to ensure proper handling of price values in trade requests.

* Refactor GMX plugin and enhance testing for position opening

- Updated `test:single` script in `package.json` to include TypeScript compilation before running tests.
- Removed `this` context from `getClientForAddress` function and replaced logging with `console.error`.
- Improved collateral calculation in `openGmxPositionImpl` for better precision.
- Adjusted type casting for `direction` in the API route to utilize `TradeDirection` enum.
- Added a new test for opening a long position in GMX, ensuring functionality and correctness.

* Update sdk

* Update

* update fastify

* Refactor start script in package.json to simplify command execution

- Removed the build step from the start script, allowing for a more direct launch of the Fastify server.

* Update package.json for Web3Proxy

- Changed the name from "Web3Proxy" to "web3-proxy".
- Updated version from "0.0.0" to "1.0.0".
- Modified the description to "The official Managing Web3 Proxy".

* Update Dockerfile for Web3Proxy

- Upgraded Node.js base image from 18-alpine to 22.14.0-alpine.
- Added NODE_ENV environment variable set to production.

* Refactor Dockerfile and package.json for Web3Proxy

- Removed the build step from the Dockerfile to streamline the image creation process.
- Updated the start script in package.json to include the build step, ensuring the application is built before starting the server.

* Add fastify-tsconfig as a development dependency in Dockerfile-web3proxy

* Remove fastify-tsconfig extension from tsconfig.json for Web3Proxy

* Add PrivyInitAddressResponse model for handling initialization responses

- Introduced a new class `PrivyInitAddressResponse` to encapsulate the response structure for Privy initialization, including properties for success status, USDC hash, order vault hash, and error message.

* Update

* Update

* Remove fastify-tsconfig installation from Dockerfile-web3proxy

* Add build step to Dockerfile-web3proxy

- Included `npm run build` in the Dockerfile to ensure the application is built during the image creation process.

* Update

* approvals

* Open position from front embedded wallet

* Open position from front embedded wallet

* Open position from front embedded wallet

* Fix call contracts

* Fix limit price

* Close position

* Fix close position

* Fix close position

* add pinky

* Refactor position handling logic

* Update Dockerfile-pinky to copy package.json and source code from the correct directory

* Implement password protection modal and enhance UI with new styles; remove unused audio elements and update package dependencies.

* add cancel orders

* Update callContract function to explicitly cast account address as Address type

* Update callContract function to cast transaction parameters as any type for compatibility

* Cast transaction parameters as any type in approveTokenImpl for compatibility

* Cast wallet address and transaction parameters as Address type in approveTokenImpl for type safety

* Add .env configuration file for production setup including database and server settings

* Refactor home route to update welcome message and remove unused SDK configuration code

* add referral code

* fix referral

* Add sltp

* Fix typo

* Fix typo

* setup sltp on backtend

* get orders

* get positions with slp

* fixes

* fixes close position

* fixes

* Remove MongoDB project references from Dockerfiles for managing and worker APIs

* Comment out BotManagerWorker service registration and remove MongoDB project reference from Dockerfile

* fixes
2025-04-20 22:18:27 +07:00
ead68573a5 Add cursor and privy provider 2025-03-05 22:40:24 +07:00
988cc9eb61 Add Privy type wallet 2025-03-05 10:36:54 +07:00
c4b53b402e Update front 2025-03-03 02:34:04 +07:00
963b7bbf83 Add average SLTP 2025-03-02 18:10:52 +07:00
bcf9d21b0a Add score 2025-03-01 17:24:16 +07:00
Oda
e16f0a2e5d Stc opti (#15)
* Optimize STC

* Optimize STC

* Add SuperTrendCrossEma
2025-03-01 02:59:19 +07:00
Oda
c715da8a17 Add indicators to backtest and bot (#14)
* Add indicators to backtest and bot

* Remove
2025-02-28 00:53:25 +07:00
Oda
4302bb8435 Remove timeframe from strategy (#13) 2025-02-26 17:24:59 +07:00
Oda
160fd02aac Update position worker (#11)
* Update position worker

* Update todo
2025-02-20 12:06:15 +07:00
d7731dda0e Fix bot things 2 2025-02-11 02:06:35 +07:00
898ff85eed Fix bot things 2025-02-07 16:54:42 +07:00
Oda
0987fa76cf Global fix (#9)
* Fix time for candle

* Fix out ouf range

* Fix pnl, fix custom money management

* Clean a bit
2025-02-04 14:59:39 +07:00
Oda
ff0433c349 Gmx V2 Prices (#8)
* Update prices api

* Update worker services in Program.cs
2025-02-03 16:33:41 +07:00
17114ac787 Refactor Dockerfile-web-ui-dev to include Vite build command and COPY src/Managing.WebApp/ in the Dockerfile 2025-02-03 12:00:21 +07:00
c690a226b6 Update Dockerfile-web-ui-dev to include Vite build command and COPY src/Managing.WebApp/ in the Dockerfile 2025-02-03 11:50:52 +07:00
2b2a9157fd Update Vite build configuration in vite.config.ts 2025-02-03 11:42:48 +07:00
b4309a2ea4 Update vite config 2025-02-03 11:32:38 +07:00
51b48325e8 Update front 2025-02-03 11:14:50 +07:00
47e5b2f29c Update Dockerfile-web-ui-dev to include Vite build command 2025-02-02 19:21:58 +07:00
47a4239ee7 Update package.json to include postcss, autoprefixer, @tailwindcss/typography, and tailwindcss 2025-02-02 19:04:54 +07:00
31c79e5dfb Update Dockerfile-web-ui-dev to include Tailwind CSS and plugins 2025-02-02 19:01:17 +07:00
609fdd56b3 Update Dockerfile-web-ui-dev to include src/Managing.WebApp/ in the COPY command 2025-02-02 18:57:49 +07:00
b1b7ef6a1d Update Dockerfile-web-ui-dev to include package.json in the COPY command 2025-02-02 18:43:30 +07:00
6d770469de Update Dockerfile-web-ui-dev to use Node 18.16.0 and Alpine 3.17.2 2025-02-02 18:36:23 +07:00
2ffd73a012 New webui dockerfile 2025-02-02 16:44:29 +07:00
9d3b86ecf8 Update Dockerfile-web-ui-dev to use eslint-plugin-jsdoc@39.6.4 2025-02-01 22:26:44 +07:00
6b7c45e38b Update Dockerfile-web-ui-dev to include Tailwind CSS and plugins 2025-02-01 22:19:12 +07:00
158f1bb7c4 Update Dockerfile-web-ui-dev to use eslint-plugin-jsdoc@39.6.4 2025-02-01 22:02:43 +07:00
478a6e0506 Update Dockerfile-web-ui-dev to add eslint-plugin-jsdoc@latest 2025-02-01 21:52:28 +07:00
b343880bf6 Update Dockerfile-web-ui-dev to include Tailwind CSS and plugins 2025-02-01 21:44:03 +07:00
1bc790596f Update Dockerfile-web-ui-dev to use Node 18.16.0 and Alpine 3.17.2 2025-02-01 21:36:57 +07:00
4051c530ea Add Tailwind CSS and plugins to Dockerfile-web-ui-dev 2025-02-01 21:32:56 +07:00
7b02aeb68e Update build webui 2025-02-01 17:06:36 +07:00
31f9d6ab5d CLear yarn package at build 2025-01-31 19:33:22 +07:00
7881630636 Remove max size for node space 2025-01-31 12:35:06 +07:00
324d156ee4 Increase memory for vite build 2025-01-30 23:39:42 +07:00
Oda
65bdb8e34f GMX v2 - Trading (#7)
* Move PrivateKeys.cs

* Update gitignore

* Update gitignore

* updt

* Extract GmxServiceTests.cs

* Refact

* update todo

* Update code

* Fix hashdata

* Replace static token hashed datas

* Set allowance

* Add get orders

* Add get orders tests

* Add ignore

* add close orders

* revert

* Add get gas limit

* Start increasePosition. Todo: Finish GetExecutionFee and estimateGas

* little refact

* Update gitignore

* Fix namespaces and clean repo

* Add tests samples

* Add execution fee

* Add increase position

* Handle backtest on the frontend

* Add tests

* Update increase

* Test increase

* fix increase

* Fix size

* Start get position

* Update get positions

* Fix get position

* Update rpc and trade mappers

* Finish close position

* Fix leverage
2025-01-30 23:06:22 +07:00
Oda
68aa7fff5d Gmx v2 - Funding rates (#6)
* Setup GMX v2

* Add get markets

* Map token with service

* Add get market info data

* Add get markets

* Add get market token prices

* Get markets infos multicall

* Try call datastore

* Add some tests to figure out why datastore call dont work

* Update funding rates

* clean
2024-08-17 06:50:18 +07:00
Oda
3360e48f47 Fix backup (#5) 2024-07-20 23:48:12 +07:00
13e70cbf63 Loading backup 2024-07-12 06:51:29 +07:00
fb976d231a Fix bot launch errors 2024-06-26 19:14:32 +07:00
897ff94a66 Add test wallets 2024-06-02 15:56:52 +07:00
45c71b3ddf Fix frontend backtest modal 2024-05-17 01:32:46 +07:00
cbcbc7239b Update package versions in csproj and package.json files 2024-05-16 19:28:40 +07:00
Osman Ale
ef0655c882 Update .env 2024-05-13 16:25:08 +05:00
liaquatali000
aef785735d Update Dockerfile-web-ui-dev 2024-05-11 13:19:14 +05:00
liaquatali000
a94602978b Update Dockerfile-web-ui-dev 2024-05-11 13:12:08 +05:00
liaquatali000
5a30da7f74 Update Dockerfile-web-ui-dev 2024-05-10 23:47:37 +05:00