Skip to content

Conversation

@vnrogoza
Copy link
Collaborator

@vnrogoza vnrogoza commented Dec 23, 2025

Сделал реализацию работы сервиса заявок/ордеров согласно описанию финамовского АПИ

@@ -1 +1,16 @@
from finam_trade_api.order.order import OrderClient
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

линтер ругается здесь. Надо from finam_trade_api.order.order import OrderClient поместить ниже следующего импорта

class Side(str, Enum):
"""Сторона заявки"""
#LONG = "long"
#SHORT = "short"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

это тоже можно удалить

FinamTradeApiError: Если запрос завершился с ошибкой.
"""
# Используем model_dump с mode='json' для корректной сериализации enum'ов
payload = order.model_dump(mode='json', exclude_none=True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

кавычки двойные mode="json"

@DBoyara DBoyara merged commit 33185bd into DBoyara:master Dec 23, 2025
1 of 7 checks passed
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.

2 participants