@tradepilotlabs/ats 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -0
- package/dist/index.js +1 -1
- package/package.json +20 -21
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# TradePilot ATS
|
|
2
|
+
|
|
3
|
+
Automated options trading server. Receives webhook signals from strategies, manages broker connections (TastyTrade), executes trades, and exposes admin/billing/backtest APIs.
|
|
4
|
+
|
|
5
|
+
## Stack
|
|
6
|
+
|
|
7
|
+
- **Runtime:** Node.js 18 (Express)
|
|
8
|
+
- **Storage:** PostgreSQL (`pg`), Redis (`ioredis`)
|
|
9
|
+
- **Auth:** JWT, bcryptjs
|
|
10
|
+
- **Scheduling:** `cron`
|
|
11
|
+
- **Build:** esbuild + javascript-obfuscator
|
|
12
|
+
|
|
13
|
+
## Layout
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
src/
|
|
17
|
+
index.js # Express bootstrap
|
|
18
|
+
routes/ # auth, api, webhook, strategyWebhook, admin,
|
|
19
|
+
# marketCondition, brokers, billing, stripe, backtest
|
|
20
|
+
services/ # business logic
|
|
21
|
+
jobs/ # scheduled jobs
|
|
22
|
+
data/ # db + redis connectors
|
|
23
|
+
middleware/
|
|
24
|
+
migrations/ # SQL migrations
|
|
25
|
+
scripts/ # build, migrate, backfill utilities
|
|
26
|
+
pinescripts/ # TradingView strategy sources
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Scripts
|
|
30
|
+
|
|
31
|
+
| Command | Purpose |
|
|
32
|
+
| --- | --- |
|
|
33
|
+
| `npm start` | Run server (`node src/index.js`) |
|
|
34
|
+
| `npm run dev` | Run with nodemon |
|
|
35
|
+
| `npm run build` | Bundle + obfuscate to `dist/` |
|
|
36
|
+
| `npm run db:migrate` | Run base migrations |
|
|
37
|
+
| `npm run db:migrate3` | Run phase-3 migrations |
|
|
38
|
+
| `npm run db:migrate:all` | Run all migrations |
|
|
39
|
+
|
|
40
|
+
## Endpoints
|
|
41
|
+
|
|
42
|
+
- `POST /auth/*` — login / signup
|
|
43
|
+
- `GET /auth/tastytrade/*` — broker OAuth
|
|
44
|
+
- `/api/*` — authenticated app API
|
|
45
|
+
- `POST /webhook/strategy/:slug` — strategy signal ingest
|
|
46
|
+
- `POST /webhook/*` — generic webhook ingest
|
|
47
|
+
- `/admin/*` — admin panel API
|
|
48
|
+
- `/api/market-condition/*` — morning-mode / market state
|
|
49
|
+
- `/brokers/*`, `/billing/*`, `/stripe/webhook` — broker + billing
|
|
50
|
+
- `/backtest/*` — backtest runner
|
|
51
|
+
- `GET /health` — liveness probe
|
|
52
|
+
|
|
53
|
+
## Configuration
|
|
54
|
+
|
|
55
|
+
Reads from `.env` via `dotenv`. Key vars: `DASHBOARD_URL`, database/Redis connection strings, broker + Stripe credentials.
|
|
56
|
+
|
|
57
|
+
## Deploy
|
|
58
|
+
|
|
59
|
+
`Procfile` declares a single `web` dyno: `node src/index.js`.
|