user_data_stream bug? why cant catch the UserDataStreamEventsResponse model,actual_instance is None?
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Bắt đầu với subscription user_data_stream đã được tái hiện và kiểm tra websocket_streams/models/user_data_stream_events_response.py, nơi UserDataStreamEventsResponse được định nghĩa. Kích hoạt một sự kiện create-order hoặc cancel-order và so sánh model nhận được với các one-of schemas của nó. Hoàn thành khi sự kiện tương ứng được biểu diễn bằng một actual_instance đã được điền thay vì None.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
def on_user_data_stream_um(self,data):
print(f"data type: {type(data)},{data}")
async def subscribe_user_data_stream_um(self):
connection = await self.get_um_connection()
try:
resp = await connection.start_user_data_stream()
listen_key = resp.data().result.listen_key
if not listen_key:
raise ValueError("无法获取 listenKey: " + str(resp))
print("listenKey:", listen_key)
ws = self.um_client.websocket_streams
connection = await ws.create_connection()
stream = await ws.user_data(listen_key)
stream.on("message", lambda data: self.on_user_data_stream_um(data))
await asyncio.sleep(1000)
await stream.unsubscribe()
except Exception as e:
logging.error(f"subscribe_user_data_stream_um() error: {e}")
the code above when create or cancel order , it dones catch the UserDataStreamEventsResponse model,actual_instance still None
this is the output:
data type: <class 'binance_sdk_derivatives_trading_usds_futures.websocket_streams.models.user_data_stream_events_response.UserDataStreamEventsResponse'>,oneof_schema_1_validator=None oneof_schema_2_validator=None oneof_schema_3_validator=None oneof_schema_4_validator=None oneof_schema_5_validator=None oneof_schema_6_validator=None oneof_schema_7_validator=None oneof_schema_8_validator=None oneof_schema_9_validator=None actual_instance=None one_of_schemas={'AccountUpdate', 'AccountConfigUpdate', 'GridUpdate', 'ConditionalOrderTriggerReject', 'OrderTradeUpdate', 'Listenkeyexpired', 'MarginCall', 'TradeLite', 'StrategyUpdate'} discriminator_value_class_map={}
- Ngôn ngữ chính
- Python
- Star
- 2.9k
- Fork
- 708
- Merge trung bình
- 2 giờ 17 phút
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của binance/binance-connector-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
binance/binance-connector-python#514 · 1 bình luận ·
-
[Bug] WebSocket API: session re-logon after reconnect is sent without apiKey and signatureCó thể đã có người làm @Amadeus-22 đã nhận 4 ngày trước. Đang mở
Độ khó 3/5 1-3 giờ Mức phù hợp với người mới 74/100
-
[Bug] Response models declare numeric fields as strict `str`, causing silent fallback of `.data()` to raw dict (simple-earn & staking)Có thể đã có người làm @Tyagiquamar đã nhận 26 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
binance/binance-connector-python#553 · 2 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
Tất cả issue của binance/binance-connector-python
Issue tương tự
-
good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
btclib-org/btclib-node#1955 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation v0.9.2
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 72/100
khuisman/mcp-gee-sweet#1033 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ossf/cve-bin-tool#5966 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 2 ngày
-
write_iceberg ignores the table's write.parquet.compression-codec propertyCó thể đã có người làm @YuangGao đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Eventual-Inc/Daft#7606 ·
Maintainer thường phản hồi trong vòng 1 ngày