This CLI tool provides a unified interface for the Gemini exchange. It manages account state and executes trade logic across multiple asset classes for trading operations and execution engineering.
The software performs the following operations:
- Weighted Indexing: The script allocates USD across a predefined list of assets. It distinguishes between yield-bearing symbols and standard symbols by applying a user-defined weight multiplier.
- Geometric Order Distribution: The execution engine uses
numpy.geomspaceto calculate price levels for limit orders. This ensures density near current market rates while maintaining coverage across a wide price range. - Pre-Trade Validation: The system compares all orders against a local cache of exchange constraints. It validates tick sizes and minimum order increments before transmission to ensure fintech compliance.
- Portfolio Liquidation: The console includes a bulk sell routine. It references a configuration file to protect specific assets from automated liquidation during portfolio rebalancing.
- Account Monitoring: A dedicated thread tracks specific currency balances. It triggers system-level auditory alerts when a balance crosses a specified threshold.
- Metadata Persistence: The script fetches and stores exchange requirements in a local JSON file. This reduces API latency and prevents rate-limit violations during routine operations.
The system utilizes a synchronous execution model to ensure state consistency. This approach requires each order to be confirmed by the exchange before the next instruction is sent. Auditory feedback provides real-time status updates for trading support and real-time monitoring.
The tool targets specific functions in execution and quantitative support:
- Trading Operations: Automates routine account management and bulk order entry.
- Execution Engineering: Implements algorithmic scaling and liquidity-aware order placement.
- Fintech Automation: Integrates API-level constraints into a local execution workflow.
- Algorithmic Support: Provides a testing ground for geometric entry strategies and portfolio weighting.
The implementation requires the following components:
gemini-pythonnumpybeepytqdmpython-dotenv
The config.json file contains the logic for asset categorization. Users define the earnable_symbols list and the excluded_from_all_sell list within this file. The .env file stores the API credentials.