Core functions

This code is part of the Minos SDK class, which enables developers to interact with MINOS AI’s trading platform, including:

Executing trades with agents like ARIADNE (token scanning), DEUCALION (copy trading), and ANDROGEUS (rule-based trading).

Creating and managing investable vaults for sharing trading strategies. The __init__ method sets up the SDK for authenticated API access, while _make_request handles the underlying HTTP communication, making it easy for developers to call specific endpoints.

def __init__(self, api_key: str, base_url: str = "https://api.minosai.net/v1"):
    """Initialize SDK with API key and base URL."""
    self.api_key = api_key
    self.base_url = base_url
    self.headers = {"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"}
def _make_request(self, endpoint: str, method: str = "GET", data: Optional[Dict] = None) -> Dict:
    """Helper method for API requests."""
    url = f"{self.base_url}/{endpoint}"
    try:
        if method == "POST":
            response = requests.post(url, headers=self.headers, json=data)
        else:
            response = requests.get(url, headers=self.headers)
        response.raise_for_status()
        return response.json()
    except requests.RequestException as e:
        raise Exception(f"API request failed: {str(e)}")

Last updated