Skip to content

Conversation

terwey
Copy link
Contributor

@terwey terwey commented Aug 14, 2025

fix(exchange/cancel)!: correct cancelByCloid wire format; make cloid nullable; tighten error handling

Use asset (not a) and cloid for CancelByCloidWire, matching the HL Python SDK. Rename CancelByCloidWire.OrderID → ClientID.
Change OrderStatusResting.ClientID to *string to reflect nullable cloid. Guard nil results in BulkOrders and surface errors properly in BulkCancelByCloids (FirstError, Ok/Status checks). Add CancelByCloid tests (+ cassette) and update existing tests to use pointer ClientID. BREAKING CHANGE: OrderStatusResting.ClientID type is now *string; CancelByCloidWire field renamed to ClientID and uses JSON/Msgpack tag asset. Update callers accordingly.

…nullable; tighten error handling

Use asset (not a) and cloid for CancelByCloidWire, matching the HL Python SDK.
Rename CancelByCloidWire.OrderID → ClientID.
Change OrderStatusResting.ClientID to *string to reflect nullable cloid.
Guard nil results in BulkOrders and surface errors properly in BulkCancelByCloids (FirstError, Ok/Status checks).
Add CancelByCloid tests (+ cassette) and update existing tests to use pointer ClientID.
BREAKING CHANGE: OrderStatusResting.ClientID type is now *string; CancelByCloidWire field renamed to ClientID and uses JSON/Msgpack tag asset. Update callers accordingly.
require.NoError(tt, err)
tt.Logf("cancel response: %+v", resp)

// // Optional second cancel to test error path
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here.

@sonirico sonirico merged commit 0d1a189 into sonirico:master Aug 14, 2025
4 checks passed
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