order_get
Retrieve detailed information about a specific trading order from the Finam platform using its unique order ID.
Instructions
Получение информации о конкретном ордере
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes |
Implementation Reference
- src/servers/order.py:17-20 (handler)MCP tool handler for 'order_get': retrieves specific order details by ID via Finam client.@order_mcp.tool(tags={"order"}) async def get(order_id: str) -> OrderState: """Получение информации о конкретном ордере""" return await get_finam_client().get_order(order_id)
- src/tradeapi/order/models.py:110-119 (schema)Pydantic model for OrderState, defining the output structure of the order_get tool.class OrderState(BaseModel): """Состояние заявки""" order_id: str = Field(..., description="Идентификатор заявки") exec_id: str | None = Field(None, description="Идентификатор исполнения") status: OrderStatus = Field(..., description="Статус заявки") order: Order = Field(..., description="Заявка") transact_at: datetime | None = Field(None, description="Дата и время выставления заявки") accept_at: datetime | None = Field(None, description="Дата и время принятия заявки") withdraw_at: datetime | None = Field(None, description="Дата и время отмены заявки")
- src/main.py:15-15 (registration)Registers the order_mcp tools under 'order_' prefix, naming the 'get' tool as 'order_get'.finam_mcp.mount(order_mcp, prefix="order")
- src/servers/utils.py:6-8 (helper)Utility function to retrieve the FinamClient instance from MCP context, used by the handler.def get_finam_client() -> FinamClient: return get_context().get_state("finam_client")
- src/servers/order.py:14-20 (helper)No, wrong. Wait, actually for get_order it's line 20.return await get_finam_client().get_orders() @order_mcp.tool(tags={"order"}) async def get(order_id: str) -> OrderState: """Получение информации о конкретном ордере""" return await get_finam_client().get_order(order_id)