-
Notifications
You must be signed in to change notification settings - Fork 50
Description
Hello Gate.io team
First of all, thank you for maintaining the Go SDK. I’ve noticed a type mismatch that leads to unmarshalling errors when consuming WebSocket data.
Problem
According to the [official WSS documentation], the field stp_id is returned as a string:
"stp_id": "0"
However, in the Go SDK it is defined as an int64:
StpId int64 json:"stp_id,omitempty"
This causes the following error when parsing WebSocket messages:
json: cannot unmarshal string into Go struct field FuturesOrder.stp_id of type int64
Suggested resolution
To align with the documented API response and ensure correct unmarshalling, the stp_id field should be defined as:
StpId string json:"stp_id,omitempty"
Environment
SDK: gateio/gatews
Channel: futures.orders (WebSocket)
Error: json: cannot unmarshal string into Go struct field FuturesOrder.stp_id of type int64
Request
Would you please consider updating the field type to match the documented API response?
Thank you for your time and for providing this SDK.
Best regards