Skip to content

(feat) add rate oracle management operations and request model#70

Open
isreallee82 wants to merge 1 commit into
hummingbot:mainfrom
isreallee82:feat/mcp-enhancement
Open

(feat) add rate oracle management operations and request model#70
isreallee82 wants to merge 1 commit into
hummingbot:mainfrom
isreallee82:feat/mcp-enhancement

Conversation

@isreallee82
Copy link
Copy Markdown

This pull request introduces a new set of tools and schemas for managing the Hummingbot rate oracle configuration via the API. The main focus is to enable listing, viewing, and updating the rate oracle source and global token directly from the API, without requiring endpoint discovery. The changes add a new schema for requests, a new tool module for handling the logic, and expose a new management tool in the API server.

New Rate Oracle Management Functionality

  • Added a new API tool manage_rate_oracle to allow listing sources, viewing configuration, and updating the rate oracle source or global token through the API server. This includes input validation and user-friendly error messages.

Schemas and Validation

  • Introduced the ManageRateOracleRequest schema in schemas.py with detailed field validation for operations, source names, and global token details. This ensures all inputs are normalized and validated before processing.

Tool Implementation

  • Created a new module tools/rate_oracle.py that implements the logic for interacting with the rate oracle endpoints, including HTTP session handling, error extraction, and formatting of API responses for end users.
  • The module provides helpers for listing sources, updating configuration, and formatting results, as well as robust error handling for various API response scenarios.

API Server Integration

  • Registered the new schema and imported the tool in the API server, ensuring the new functionality is available and properly wired up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant