* 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
* Bybit: Subscription configuration for spot
* Bybit: Enable candles ws sub by default
* Orderbook: Use a RW mutex for depth
* Orderbook: Fix race on depth.VerifyOrderbook
Despite being protected by an ob level mutex, this needed to privatise
and protect the option var.
* CI/build: Update Go version, linters and fix minor issues
* linters: Add intrange, copyloopvar, additional go vet linters to match gopls and fix issues
* Add in extra field for colocation monitoring
* rm tags
* populate through gateio orderbooks
* populate through incremental updates
* Add insert at field for orderbook depth
* I AM A BAD SPELLLLLLA
* add it in
* c change
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* initial purge and benchmarks proof before rn overhaul
* rn LinkedList -> Tranche(s) and purge references
* roll out acrost exchanges
* linterino
* rn silly billy label
* linter strikes AAAAAGAIN!
* fix some things
* rm comment
* Add actual comparison from master to branch benchmark for sorting algorithms
* lower case via git mv YAAY!
* drop code
* convert type name
* glorious: nits
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* Orderbook: Fix test failures on different arch
Fixes floating point inaccuracies on different architectures
Moves the depth tests over to table driven tests
* Kline: Fix test failures on different arch
* orderbook: Check assignment of time values and reject if not set.
* linter: fix
* buffer: additional linter winter fixter
* Implement through pending exchanges
* finished push
* linty: minty
* gomod: tidy
* thrasher: nits
* glorious: nits
* orderbook: purge type now in favour of external call allocation
* orderbook: push last param
* orderbook: only 1 unlock call is needed
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* kraken: fix websocket orderbook processing
* kraken: clean
* glorious: nits also add todo
* more: add required checksum to TODO for future, move variable to top
* glorious: get mad
* orderbook: fix retrieve issue
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* orderbook/buffer: data integrity and resubscription pass
* btcmarkets: REMOVE THAT LIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIINE!!!!!!!!!!!!!!!!!
* buffer: reinstate publish, refaactor, invalidate more and comments
* buffer/orderbook: improve update and snapshot performance. Move Update type to orderbook package to util. pointer through entire function calls. (cleanup). Change action string to uint8 for easier comparison. Add parsing helper. Update current test benchmark comments.
* dispatch: change publish func to variadic id param
* dispatch: remove sender receiver wait time as this adds overhead and complexity. update tests.
* dispatch: don't create pointers for every job container
* rpcserver: fix assertion issues with data publishing change
* linter: fixes
* glorious: nits addr
* depth: change validation handling to incorporate and store err
* linter: fix more issues
* dispatch: fix race
* travis: update before fetching
* depth: wrap and return wrapped error in invalidate call and fix tests
* btcmarkets: fix commenting
* workflow: check
* workflow: check
* orderbook: check error
* buffer/depth: return invalidation error and fix tests
* gctcli: display errors on orderbook streams
* buffer: remove unused types
* orderbook/bitmex: shift function to bitmex
* orderbook: Add specific comments to unexported functions that don't have locking require locking.
* orderbook: restrict published data functionality to orderbook.Outbound interface
* common: add assertion failure helper for error
* dispatch: remove atomics, add mutex protection, remove add/remove worker, redo main tests
* dispatch: export function
* engine: revert and change sub logger to manager
* engine: remove old test
* dispatch: add common variable ;)
* btcmarket: don't overflow int in tests on 32bit systems
* ci: force 1.17.7 usage for go
* Revert "ci: force 1.17.7 usage for go"
This reverts commit af2f95563bf218cf2b9f36a9fcf3258e2c6a2d91.
* golangci: bump version add and remove linter items
* Revert "golangci: bump version add and remove linter items"
This reverts commit 3c98bffc9d030e39faca0387ea40c151df2ab06b.
* dispatch: remove unsused mutex from mux
* order: slight optimizations
* nits: glorious
* dispatch: fix regression on uuid generation and input inline with master
* linter: fix
* linter: fix
* glorious: nit - rm slice segration
* account: fix test after merge
* coinbasepro: revert change
* account: close channel instead of needing a receiver, push alert in routine to prepare for waiter.
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* Bump CI versions
* Specifically set go version as 1.17.x bumps it to 1.18
* Another
* Adjust AppVeyor
* Part 1 of linter issues
* Part 2
* Fix various linters and improvements
* Part 3
* Finishing touches
* Tests and EqualFold
* Fix nitterinos plus bonus requester jobs bump for exchanges with large number of tests
* Fix nitterinos and bump golangci-lint timeout for AppVeyor
* Address nits, ensure all books are returned on err due to syncer regression
* Fix the wiggins
* Fix duplication
* Fix nitterinos
* btcmarkets: add websocket checksum, fetch different book via REST
* Update exchanges/btcmarkets/btcmarkets_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* buffer: add explicit type for buffer related variables and comments, do all checks buffer side and load in setup as per glorious recom.
* buffer: fix tests add error
* buffer: test re-add code cov
* depth/stream/ws: fix tests, change field name to be more specific.
* buffer: rm unused field and small comment fixes
* btcm: remove redundant field
* glorious: nits
* buffer: fix commenting
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* [FIX] Enable ws orderbook sync recovery by:
- Testing if books have been cleared
- Assigning options when loading snapshot
* orderbooks: remove setlastupdate method and on select depth method that updates linked list, this reduced lock contention across code base and fixes buffer bug on applying buffered updates
* WS - Introduce signaling for the need to fetch the orderbook
* Address nits
* Update error messages to include exchange name
Co-authored-by: shazbert <oharareid.ryan@gmail.com>
* Exchanges: Initial implementation after rebase of depth (WIP)
* orderbook/buffer: convert and couple orderbook interaction functionality from buffer to orderbook linked list - Use single point reference for orderbook depth
* buffer/orderbook: conversion continued (WIP)
* exchange: buffer/linkedlist handover (WIP)
* Added some tests for yesterday
* linkedList: added more testing and trying to figure out broken things
* Started tying everything in
* continuous integration and testing
* orderbook: expanded tests
* go mod tidy
* Add in different synchornisation levels for protocols
Add in timer for the streaming system to reduce updates to datahandler
Add in more test code as I integrate more exchanges
* Depth: Add tests, add length check to call linked list updating, add in constructor.
Linked List: Improve tests, add in checks for zero liquidity on books.
Node: Added in cleaner POC, add in contructor.
Buffer: Fixed tests, checked benchmarks.
* orderbook: reinstate dispatch calls
* Addr glorious & madcozbad nits
* fix functionality and add tests
* Address linterinos
* remove label
* expanded comment
* fix races and and bitmex test
* reinstate go routine for alerting changes
* rm line :D
* fix more tests
* Addr glorious nits
* rm glorious field
* depth: defer unlock to stop deadlock
* orderbook: remove unused vars
* buffer: fix test to what it should be
* nits: madcosbad addr
* nits: glorious nits
* linkedlist: remove unused params
* orderbook: shift time call to outside of push to inline, add in case for update inster price for zero liquidity, nits
* orderbook: nits addressed
* engine: change stream -> websocket convention and remove unused function
* nits: glorious nits
* Websocket Buffer: Add verbosity switch
* linked list: Add comment
* linked list: fix spelling
* nits: glorious nits
* orderbook: Adds in test and explicit time type with constructor, fix nits
* linter
* spelling: removed the dere fence
* depth: Update alerting mechanism to a more battle tested state
* depth: spelling
* nits: glorious nits
* linked list: match cases
* buffer: fix linter issue
* golangci: increase timeout by 30 seconds
* nodes: update atomic checks
* spelling: fix
* node: add in commentary
* exchanges/syncer: add function to switch over to REST when websocket functionality is not available for a specific asset type
* linter: exchange linter issues
* syncer: Add in warning
* nits: glorious nits
* AssetWebsocketSupport: unexport map
* Nits: Adrr
* rm letter
* exchanges: Orderbook verification change for naming, deprecate checksum bypass as it has the potential to obfuscate errors that are at the tail end of the book, add in verification for websocket stream updates
* general: fix spelling remove breakpoint
* nits: fix more glorious nits until more are found
* orderbook: fix tests
* orderbook: fix wait tests and add in more checks
* nits: addr
* orderbook: remove dispatch reference
* linkedlist: consolidate bid/ask functions
* linked lisdt: remove words
* fix spelling