* build(deps): bump github.com/bytedance/sonic from 1.13.2 to 1.14.0
Bumps [github.com/bytedance/sonic](https://github.com/bytedance/sonic) from 1.13.2 to 1.14.0.
- [Release notes](https://github.com/bytedance/sonic/releases)
- [Commits](https://github.com/bytedance/sonic/compare/v1.13.2...v1.14.0)
---
updated-dependencies:
- dependency-name: github.com/bytedance/sonic
dependency-version: 1.14.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* test: Enhance error handling in TestDateTimeUnmarshalJSON for unmarshal errors
* test: Make comparison string more specific since there's no exported type we can use
* test: Improve error handling in TestDateTimeUnmarshalJSON for sonic implementation
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* exchanges: Refactor time handling and other minor improvements
- Updated Kraken wrapper to utilise new time handling methods.
- Simplified Kucoin types by removing unnecessary structures and using direct JSON unmarshalling.
- Improved websocket handling in Kucoin to directly parse candlestick data.
- Modified Lbank types to use the new time representation.
- Adjusted Poloniex wrapper and types to utilise the new time handling.
- Updated Yobit types and wrapper to reflect changes in time representation.
- Introduced DateTime type for better handling of specific time formats.
- Added tests for DateTime unmarshalling to ensure correctness.
- Rid UTC().Unix and UTC().UnixMilli as it's not needed
- Correct Huobi timestamp usage for some endpoints.
- Rid RFC3339 time parsing since Go does that automatically.
* exchanges: Refactor JSON unmarshalling for various types and improve test coverage
* linter: Update error message in TestGetKlines
* refactor: Simplify JSON unmarshalling in MovementHistory and improve test assertions in GetKlines
* refactor: Improve JSON unmarshalling for channel name and clarify comment in wsProcessOpenOrders
* refactor: Update time handling in Huobi types to use types.Time for createdAt fields and relax GetLiquidationOrders test
* refactor: Move wsTicker, wsSpread, wsTrades, and wsCandle types to kraken_types.go for better organistion
* refactor: Add validation for underlying parameter in GetExpirationTime and update tests
* types/time, exchanges/kraken: Refactor spot/futures time types
- Updated WSFuturesTickerData, WsFuturesTradeData, and other related structs to replace int64 timestamps with the new types.Time.
- Adjusted related test cases to accommodate changes in timestamp handling.
- Modified functions in kraken_wrapper and kraken_websocket to utilise the new Time type for better time management.
- Enhanced JSON unmarshalling in the Time type to handle various timestamp formats, including "0" and "0.0".
* refactor: Update JSON field name/types and improve perf
* types/time: revert to more precise check, just check for 'n'
* refactor: Ryan the F1 driver is so back 🏎️
* refactor: Enhance UnmarshalJSON error handling and simplify test cases
* ocd: Fix trigger
* GHA, tests: Add additional checks for common issues
These checks include:
- Ensuring that all testify funcs use their formatted variants (e.g., `assert.Equalf(t, expected, actual)` instead of `assert.Equal(t, expected, actual)`).
- Replacing `%s` with %q
- Enforcing consistent usage of should/must wording for testify assert/require messages
* Add support for checking backticked string format specifiers and fix issues
* tests: Fix error comparisons
* tests: Replace errors.Is(err, nil) usage with testify and automate check
* refactor: Rename ExtractPort to ExtractPortOrDefault
* tests: Replace assert with require for error handling in multiple test files
* tests: Replace assert with require for error handling and improve assertions in data tests
* tests: Fix typo in assertion message for StreamVol test
* OKX: Fix GetOpenInterestAndVolumeStrike test with instrument selection and improved assertions
* OKX: Revert intentional error check
* Improve error message for expiry time check in GetOpenInterestAndVolumeStrike test
* build/ci: Update Go to v1.24, golangci-lint to v1.64.5 and fix issues
* Address shazbert's nitters
* linter/config: Fix new linter issue and use versionSize const
* Address gk's nitters and fix additional linter issue after rebase
* Address glorious nits
* staticcheck: Fix additional linter issues after upgrading to Go 1.24.1 and golangci-lint v1.64.6
Also addresses nits
* Improve testing, assertify usage and use common.ErrParsingWSField
* TestCreateNewStrategy: Replace must > should wording
* tag optional sonic and allow full library conversion
* Add workflow and disallow arm and darwin usage
* Add basic hotswap benchmark
* linter: fix
* use bash
* linter: fix?
* Fix whoopsie, add to make file, also add mention in features list.
* test enforcement
* actually read documentation see if this works
* linter: fix
* linter: fix
* sonic: bump tagged version
* encoding/json: drop build tag arch and os filters
* encoding/json: consolidate tests
* encoding/json: log build tag usage
* rm superfluous builds
* glorious/nits: add template change and regen docs
* glorious/nits: update commentary on nolint directive
* glorious/nits: rm init func and log results in main.go
* Test to actually pull flag in
* linter: fix
* thrasher: nits
* gk: nits 4 goflags goooooooooo!
* gk: nits rn
* make sonic default json implementation
* screen 386
* linter: fix
* Add commentary
* glorious: nits Makefile not working
* gk: nits
* gk: nits whoops
* whoopsirino
* mention 32bit systems won't be sonic
* gk: super-duper nit of extremes
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* types/time: strict usage of time type for usage with unix timestamps
* Update types/time_test.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* @cranktakular: nits
* glorious: nits
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* consolidate type to types package and share across code base
* rm convert type and convert codebase
* rm irrelavant test cases
* Fix tests
* glorious nits
* Update exchanges/gateio/gateio_types.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* thrasher: nits
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Types: Add Number type
* Types: Switch StringToFloat64 for Number
This change mostly just renames the type.
convert package and StringToFloat64 represent actions, not types,
and make it misleading to use outside of the API context,
especially when using it for a Float64ToString operation.
* Common: Remove StringToFloat64
Replaced by types.Number
* fixup! Types: Switch StringToFloat64 for Number
Second pass at Okx
* Spellcheck: Fix whitespace handling for okx line