-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Description
Serde Json Serialization Error:
the function info_client.historical_orders sometimes fails to serialize with the error
JsonParse("invalid type: null, expected a string at line 1 column 640")Looks like some Orders have the field tif as null which is incompatible with the current definition of BasicOrderInfo
pub struct BasicOrderInfo {
pub coin: String,
// ...
//
pub tif: String
// ...
}actual json response
{
"order": {
"coin": "HYPE",
"side": "A",
"limitPx": "34.207",
"sz": "3.07",
"oid": 103970286169,
"timestamp": 1750316991250,
"triggerCondition": "Price below 37.182",
"isTrigger": true,
"triggerPx": "37.182",
"children": [],
"isPositionTpsl": false,
"reduceOnly": true,
"orderType": "Stop Market",
"origSz": "3.07",
"tif": null,
"cloid": null
},
"status": "canceled",
"statusTimestamp": 1750317630330
}A simple change to the below would fix it
pub tif: Option<String>Metadata
Metadata
Assignees
Labels
No labels