Skip to content

Conversation

@stoyanov-kaloyan
Copy link
Contributor

Discovered this issue while validating against the OrderResponse type.

When submitting an array of three orders with the normalTpsl grouping [market order, tp, sl] the Hyperliquid API returns a response of this format

{
    "status": "ok",
    "response": {
        "type": "order",
        "data": {
            "statuses": [
                {
                    "filled": {
                        "totalSz": "0.00022",
                        "avgPx": "87102.0",
                        "oid": 272900270573
                    }
                },
                "waitingForTrigger",
                "waitingForTrigger"
            ]
        }
    }
}

Notice that sometimes a status can be just a string

Fix: Adding a v.string() in the union type of the statuses array fixes this issue

@nktkas nktkas merged commit 367db84 into nktkas:main Jan 1, 2026
1 check passed
@nktkas
Copy link
Owner

nktkas commented Jan 1, 2026

Thanks for your contribution!

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