Repository navigation
Releases: carvalab/rofex-go
Releases · carvalab/rofex-go
Release list
v0.4.0
Breaking change
Primary reports business errors (rejected orders, unknown symbols, accounts you can't access) as HTTP 200 with "status":"ERROR". Up to v0.3.4 the SDK returned those with err == nil, so if err != nil did not catch a rejected order. They now come back as *rofex.APIError:
resp, err := client.SendOrder(ctx, order)
var apiErr *rofex.APIError
if errors.As(err, &apiErr) {
log.Println("rejected:", apiErr.Message, apiErr.Description)
}If your code checks resp.Status == "ERROR", check err instead.
Fixes
MarketDataSnapshotandSubscribeMarketDatacalled withoutEntrieswere rejected by the real API. They now request BI, OF and LA by default.
Tests and CI
- New unit tests cover API errors (using bodies captured from the live API), order queries, detailed positions, instrument listings, the WebSocket lifecycle (login, reconnect, session end, slow consumers) and the rate limiter. Coverage is 84% and CI fails below 80%.
- The integration job now checks against the real API that an unknown symbol returns
*APIError.
Full Changelog: v0.3.4...v0.4.0