Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Centaur Telegram Trading Bot

Early scaffold for a TypeScript Node.js Telegram trading bot using grammY.

Features

  • TypeScript + strict config
  • Environment validation via zod
  • Logging with pino
  • Dev runner with tsx (fast ESM TS execution + watch)
  • Testing with vitest
  • Linting with ESLint + Prettier

Quick start

  1. Install dependencies:
npm install
  1. Create a .env file (see .env.example for the full list):
NODE_ENV=development
TELEGRAM_BOT_TOKEN=123456:replace_me
# Optional integrations (uncomment & fill as needed)
# TURNKEY_ENDPOINT=
# TURNKEY_PRIVATE_KEY=
# TURNKEY_PUBLIC_KEY=
# TURNKEY_ORGANIZATION_ID=
# FIREBASE_SERVICE_KEY=
# APTOS=
# APTOS_TESTING_PRIVATE_KEY=
# APTOS_GEOMI_TESTNET_INDEXER_API_KEY=
# APTOS_GEOMI_MAINNET_INDEXER_API_KEY=
# REDIS_URL=redis://localhost:6379/0
  1. Run in dev mode (auto-reload):
npm run dev
  1. Build & run production bundle:
npm run build
npm start

Turnkey maintenance scripts

Delete a sub-organization (irreversible):

Prerequisites (env vars in your .env):

TURNKEY_ENDPOINT=https://api.turnkey.com        # or custom if provided
TURNKEY_API_PRIVATE_KEY=...                     # P-256 private key (PEM without headers ok)
TURNKEY_API_PUBLIC_KEY=...                      # Corresponding public key
TURNKEY_PUBLIC_KEY=...                          # Root user api key public key used when creating sub orgs
TURNKEY_ORGANIZATION_ID=...                     # Root (parent) organization UUID

Run via npm script (preferred):

npm run delete:suborg -- <SUB_ORG_UUID>

Or with an env variable:

SUB_ORG_ID=<SUB_ORG_UUID> npm run delete:suborg

Direct execution with tsx (if installed globally or via npx):

npx tsx scripts/delete-suborg.ts <SUB_ORG_UUID>

Skip confirmation prompt:

npm run delete:suborg -- <SUB_ORG_UUID> --force
# or
FORCE=1 SUB_ORG_ID=<SUB_ORG_UUID> npm run delete:suborg

Exit codes:

  • 0 success / aborted by user
  • 1 missing id
  • 2 completed but no id returned in result
  • 3 failure submitting or polling delete

Enable verbose polling logs by setting TURNKEY_VERBOSE=1 in your environment.

Project Structure

src/
  index.ts        # entrypoint

Next Steps

  • Add trading exchange integration (e.g., CCXT) with proper rate limiting
  • Implement command modules pattern
  • Persistent storage (SQLite/Postgres)
  • Add risk management & order execution logic
  • Expand test suite

License

MIT (add a LICENSE file as needed)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages