How hummingbot/gateway works
Project type and purpose
• This is a backend-focused API/CLI service (“Gateway”) written in TypeScript.
• Purpose: expose standardized REST endpoints (and equivalent CLI commands) to interact with blockchain networks (Ethereum, Solana) and DEX protocols (Jupiter, Meteora, Raydium, etc.).
• Key features: modular “connectors” for each DEX, “chain” modules per blockchain, centralized config management, and unified schemas for request validation.
File structure
Top-level:
• src/index.ts & src/app.ts – application & HTTP/CLI entry points
• src/commands/… – CLI command implementations (balance, start, build)
• src/https.ts – HTTPS server setup
• src/paths.ts, src/schemas/… – global path & schema definitions
• src/services/… – core services: config managers, connection manager, local storage, schema validators, logger, error handler
• src/config/… – configuration-related routes & validators
• src/chains/… – per-blockchain modules
• src/connectors/… – per-DEX modules
• src/wallet/… – wallet endpoints
• src/templates & /conf & /postman – scaffolding, configuration files, and API test tooling
Tests mirror src structure under test/.
README for additional insights
• Confirms Gateway provides both HTTP(S) server and CLI.
• Mentions Swagger auto-documentation.
• Describes new modular refactor:
• connectors follow Meteora reference implementation
• core interfaces in services/clmm-interface.ts