https://github.com/jozefrudy/trading-rule-parser
Trading DSL with real-time TypeScript validation and AST parsing
https://github.com/jozefrudy/trading-rule-parser
angular ast-parser codemirror6 f-sharp fparsec strategy-validation trading-dsl trading-strategies typescript
Last synced: 3 months ago
JSON representation
Trading DSL with real-time TypeScript validation and AST parsing
- Host: GitHub
- URL: https://github.com/jozefrudy/trading-rule-parser
- Owner: jozefRudy
- Created: 2025-02-28T16:40:52.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-01T23:01:57.000Z (3 months ago)
- Last Synced: 2025-03-01T23:26:06.699Z (3 months ago)
- Topics: angular, ast-parser, codemirror6, f-sharp, fparsec, strategy-validation, trading-dsl, trading-strategies, typescript
- Language: TypeScript
- Homepage: https://cryptoquant.dev
- Size: 247 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Code parser example used by [cryptoquant](https://cryptoquant.dev) in v1.
It consists of `angular` frontend app with `codemirror6` code editor with live `typescript` intellisense served on frontend.
Trading DSL is a subset of typescript. Only valid typescript after validating on frontend is sent to backend.Backend contains AST and AST parser in `f#` that validates strategy received from frontend.
There is an indication below code editor on frontend showing if strategy is valid (it is valid only if it's valid typescript and was validated by backend as well).To run this, you need both `pnpm` and `dotnet 9`. Ports are pre-configured in both services `3000` for frontend and `3001` for backend.
```bash frontend
cd frontent-angular
pnpm start
``````bash backend
cd backend-parser/api
dotnet run
```
Editor expects these variables to be defined: `entry`, `exit`, `universe`, `name`, `start`, `mode`.
For development I recommend opening both projects in the same editor, jetbrains rider works well for this.