While using the Rust SDK, I noticed inconsistencies between expected API response types and actual runtime behavior, particularly when handling websocket and asset context data.
For example, in some cases the API may return a different channel type than requested (e.g. activeAssetCtx returning activeSpotAssetCtx), which the SDK currently does not handle gracefully.
Problems:
- SDK assumes strict response types but API responses may vary dynamically
- Websocket subscriptions can return unexpected channel variants
- Deserialization fails or requires manual handling by the user
- Lack of fallback handling or enum coverage for variant responses
Expected behavior:
- SDK should handle all documented and undocumented API response variants safely
- Enums should include all possible channel types
- Unknown or unexpected variants should not break deserialization
While using the Rust SDK, I noticed inconsistencies between expected API response types and actual runtime behavior, particularly when handling websocket and asset context data.
For example, in some cases the API may return a different channel type than requested (e.g. activeAssetCtx returning activeSpotAssetCtx), which the SDK currently does not handle gracefully.
Problems:
Expected behavior: