Trading Connector Types (trading/types.py)

Vibe-Trading · agent/src/trading/types.py · python · MIT
automation, payments, dev-tools, integration

Defines shared data structures and capability schemas for trading platform connectors. Use this to standardize communication between trading agents and various broker SDKs.

# Source: https://github.com/HKUDS/Vibe-Trading | License: MIT | Copyright 2026 Vibe-Trading Contributors
# Provided via justclaw.it.com; keep this notice with the code.
"""Shared trading connector data types."""

from __future__ import annotations

from dataclasses import asdict, dataclass, field
from typing import Any, Literal

Environment = Literal["paper", "live"]
Transport = Literal["local_tws", "remote_mcp", "broker_sdk", "local_plugin"]

READ_CAPABILITIES = (
    "account.read",
    "positions.read",
    "orders.read",
    "quotes.read",
    "history.read",
)

# Capability strings for connector-specific extended read endpoints that are
# exposed by some connectors (Futu today; could be added to others later) but
# not by the shared broker_sdk baseline. Connnectors that implement any

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key