mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
tsconfig compiled docs/ (vendored ccxt samples) and @types/react was missing,
so 269 tsc errors buried the real ones. Scoping the project and adding the
missing type packages left 42 genuine errors in src/, which exposed two bugs:
- lighter: assertSpotBalance's buy branch and createOrder's spot-sell guard
compared the {available, wallet} object against a number, so both guards
were dead. Introduce SpotAssetBalance with a precomputed 'effective' field
(Extract Class) and route all three call sites through it.
- offset-maker: the below-min-sell branch logged 'skip sell' but pushed the
SELL order anyway, and pushed a possibly-null price. Both branches now
match their working sibling.
Also: widen LighterOrder's is_ask/reduce_only to BooleanFlag (the wire format
flags.ts already parses), extract sellableBase (Extract Function, 3 copies),
delete two scripts importing a module that does not exist, add a typecheck
script. tsc --noEmit: 269 -> 0 errors; 218 tests still pass.
57 lines
2.0 KiB
JSON
57 lines
2.0 KiB
JSON
{
|
|
"name": "ritmex-bot",
|
|
"version": "0.1.0",
|
|
"module": "index.ts",
|
|
"type": "module",
|
|
"private": false,
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/discountry/ritmex-bot.git"
|
|
},
|
|
"bin": {
|
|
"ritmex-bot": "./bin/ritmex-bot"
|
|
},
|
|
"scripts": {
|
|
"dev": "bun run index.ts",
|
|
"start": "bun run index.ts",
|
|
"lint": "oxlint",
|
|
"lint:fix": "oxlint --fix",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "bun x vitest run",
|
|
"test:exchange-contract": "bun x vitest run tests/exchange-contract-suite.test.ts tests/exchange-factory.test.ts tests/config.test.ts",
|
|
"test:watch": "bun x vitest",
|
|
"start:trend:silent": "bun run index.ts --strategy trend --silent",
|
|
"start:maker:silent": "bun run index.ts --strategy maker --silent",
|
|
"start:offset:silent": "bun run index.ts --strategy offset-maker --silent",
|
|
"pm2:start:trend": "pm2 start bun --name ritmex-trend --cwd . --restart-delay 5000 -- run index.ts --strategy trend --silent",
|
|
"pm2:start:maker": "pm2 start bun --name ritmex-maker --cwd . --restart-delay 5000 -- run index.ts --strategy maker --silent",
|
|
"pm2:start:offset": "pm2 start bun --name ritmex-offset --cwd . --restart-delay 5000 -- run index.ts --strategy offset-maker --silent",
|
|
"pm2:start:maker-points": "pm2 start bun --name ritmex-maker-points --cwd . --restart-delay 5000 -- run index.ts --strategy maker-points --exchange standx --silent"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bun": "^1.3.9",
|
|
"@types/react": "^19",
|
|
"@types/ws": "^8.18.1",
|
|
"oxlint": "^1.54.0",
|
|
"vitest": "^4.0.18"
|
|
},
|
|
"peerDependencies": {
|
|
"typescript": "^5.9.3"
|
|
},
|
|
"dependencies": {
|
|
"@grvt/client": "^1.6.27",
|
|
"@nadohq/client": "^0.1.0-alpha.51",
|
|
"@noble/ed25519": "^3.0.0",
|
|
"axios": "^1.13.6",
|
|
"bignumber.js": "^10.0.2",
|
|
"ccxt": "^4.5.40",
|
|
"dotenv": "^17.3.1",
|
|
"ethereum-cryptography": "^3.2.0",
|
|
"ink": "^6.8.0",
|
|
"react": "^19.2.4",
|
|
"trading-signals": "^7.4.3",
|
|
"viem": "^2.46.3",
|
|
"ws": "^8.19.0"
|
|
}
|
|
}
|