* tests: Replace !errors.Is(err, target) with testify equivalents
* codebase: Manual !errors.Is(err, target) replacements
* typo: Replace errMisMatchedEvent with errMismatchedEvent
* tests: Enhance error messages for better output
* tests: Refactor error assertions in various test cases to use require and improve clarity
* misc linter: Fix assert should wording
* tests: Simplify assertions in TestCreateSignals for clarity and conciseness
* tests: Enhance assertion message in TestCreateSignals
* 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
* add updatedAt for account balance
Signed-off-by: Ye Sijun <junnplus@gmail.com>
* add nil pointer test for load
Signed-off-by: Ye Sijun <junnplus@gmail.com>
* account: set default updatedAt to balance for Update
Signed-off-by: Ye Sijun <junnplus@gmail.com>
* engine: add UpdatedAt for account info
Signed-off-by: Ye Sijun <junnplus@gmail.com>
* account: force updatedAt for load balance
Signed-off-by: Ye Sijun <junnplus@gmail.com>
* minor change for test
Signed-off-by: Ye Sijun <junnplus@gmail.com>
---------
Signed-off-by: Ye Sijun <junnplus@gmail.com>
* CI/build: Update Go version, linters and fix minor issues
* linters: Add intrange, copyloopvar, additional go vet linters to match gopls and fix issues
* moves everything to use single map keys, also breaks
* full rollout
* tests
* fix a little bug
* minor test fixups
* Fix Key use
* rm 🔑 from 🔑 struct name
* Add test for dispatch channel reuse
* Dispatcher - make chans bidirectional
* No need to to keep the type assertion separate from the Get()
* Unexport Pipe's channel and add getter
* Modifications for a smoother live run
* Fixes data appending
* Successfully allows multi-currency live trading. Adds multiple currencies to live DCA strategy
* Attempting to get cash and carry working
* Poor attempts at sorting out data and appending it properly with USD in mind
* =designs new live data handler
* Updates cash and carry strat to work
* adds test coverage. begins closeallpositions function
* Updates cash and carry to work live
* New kline.Event type. Cancels orders on close. Rn types
* =Fixes USD funding issue
* =fixes tests
* fixes tests AGAIN
* adds coverage to close all orders
* crummy tests, should override
* more tests
* more tests
* more coverage
* removes scourge of currency.Pair maps. More tests
* missed currency stuff
* Fixes USD data issue & collateral issue. Needs to close ALL orders
* Now triggers updates on the very first data entry
* All my problems are solved now????
* fixes tests, extends coverage
* there is some really funky candle stuff going on
* my brain is melting
* better shutdown management, fixes freezing bug
* fixes data duplication issues, adds retries to requests
* reduces logging, adds verbose options
* expands coverage over all new functionality
* fixes fun bug from curr == curr to curr.Equal(curr)
* fixes setup issues and tests
* starts adding external wallet amounts for funding
* more setup for assets
* setup live fund calcs and placing orders
* successfully performs automated cash and carry
* merge fixes
* funding properly set at all times
* fixes some bugs, need to address currencystatistics still
* adds 'appeneded' trait, attempts to fix some stats
* fixes stat bugs, adds cool new fetchfees feature
* fixes terrible processing bugs
* tightens realorder stats, sadly loses some live stats
* this actually sets everything correctly for bothcd ..cd ..cd ..cd ..cd ..!
* fix tests
* coverage
* beautiful new test coverage
* docs
* adds new fee getter delayer
* commits from the correct directory
* Lint
* adds verbose to fund manager
* Fix bug in t2b2 strat. Update dca live config. Docs
* go mod tidy
* update buf
* buf + test improvement
* Post merge fixes
* fixes surprise offset bug
* fix sizing restrictions for cash and carry
* fix server lints
* merge fixes
* test fixesss
* lintle fixles
* slowloris
* rn run to task, bug fixes, close all on close
* rpc lint and fixes
* bugfix: order manager not processing orders properly
* somewhat addresses nits
* absolutely broken end of day commit
* absolutely massive knockon effects from nits
* massive knockon effects continue
* fixes things
* address remaining nits
* jk now fixes things
* addresses the easier nits
* more nit fixers
* more niterinos addressederinos
* refactors holdings and does some nits
* so buf
* addresses some nits, fixes holdings bugs
* cleanup
* attempts to fix alert chans to prevent many chans waiting?
* terrible code, will revert
* to be reviewed in detail tomorrow
* Fixes up channel system
* smashes those nits
* fixes extra candles, fixes collateral bug, tests
* fixes data races, introduces reflection
* more checks n tests
* Fixes cash and carry issues. Fixes more cool bugs
* fixes ~typer~ typo
* replace spot strats from ftx to binance
* fixes all the tests I just destroyed
* removes example path, rm verbose
* 1) what 2) removes FTX references from the Backtester
* renamed, non-working strategies
* Removes FTX references almost as fast as sbf removes funds
* regen docs, add contrib names,sort contrib names
* fixes merge renamings
* Addresses nits. Fixes setting API credentials. Fixes Binance limit retrieval
* Fixes live order bugs with real orders and without
* Apply suggestions from code review
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update backtester/engine/live.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update backtester/engine/live.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update backtester/config/strategyconfigbuilder/main.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* updates docs
* even better docs
Co-authored-by: Adrian Gallagher <adrian.gallagher@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>
* implements futures functions and GRPC functions on new branch
* lint and test fixes
* Fix uneven split pnl. Adds collateral weight test. docs. New clear func
* Test protection if someone has zero collateral
* Uses string instead of double for accuracy
* Fixes old code panic
* context, match, docs
* Addresses Shazniterinos, var names, expanded tests
* Returns subaccount name, provides USD values when offlinecalc
* Fixes oopsie
* Fixes cool bug which allowed made up subaccount results
* Subaccount override on FTX, subaccount results for collateral
* Strenghten collateral account info checks. Improve FTX test
* English is my first language
* Fixes oopsies
* Fixes for unrealised PNL & collateral rendering
* Fixes lint and tests
* Shaznit fixes
* Secret Shaznit
* Updates account information across wrappers to include more fields
* Updates online collateral calculations. Updates RPC data
* Accurately calculates collateral offline and online minus testing
* Tests and lint chocolate
* Simplifies accountinfo results
* Fixes shaznits
* Adds new func
* Increases collateral accuracy again again again x 200
* Increases accuracy of collateral rendering
* Fixes minor merge/test issues
* Linterino
* Fixes ws test. Improves collateral calculations and rendering
* Make it prettier
* Removes the lock I put on 👀
* Adds `additional_collateral_used` field, renders orig currency
* Fixes unrelated test
* Fix test
* Correctly calculate spot margin borrow collateral
* Address fun lint surprise
See https://github.com/golangci/golangci-lint/issues/741#issuecomment-1017014331
* Strange lint fixing x2
* Continued lint journey
* Nolint the nolint to not lint the lint
* Adds two new fields to response
* More linting issues arising
* fIX3s_c4s|NG
* Fixes command flags' incorrect numbering
* FairMarket = Won
* add account.Balance.Available() method that returns the amount of an asset not locked/held
* account: comment Balance.Available()
* account: test Balance.Available()
* FTX: Add REST API subaccount support
* Add API key check to GetSubaccounts
* Fix missing comment and expand to rest of the codebase
* Address glorious nits
* Address various nits
* Fix ZB typo
https://www.zb.com/api#hsptccieyyqomlp
* Initial rework of rework of requester - WIP
* Implementing and checking rate limits - WIP
* implemented coinbene rate limiting shenanigans
* add in remaining WIP
* fixy
* use authenticated rate limit
* drop ceiling as this can be done with a counter later
* add functionality to struct
* purge config options for rate limiting so as to keep things minimal
* prepare futures and swap rate limiting for implementation
* Address linter issues
* Addressed nits, fixed race
* fix linter issue
* remove global var as this was only setting when newrequester was called
* moved rate limit functionality into its own file
* Update Bitfinex with correct rate limit and test endpoints (WIP)
* finish off bitfinex adjustments
* fixes
* fix linter issues
* slowed rate for coinbasepro
* drop rate limit for huobi as the doc times have intermittent 429 issues.
* Set MACOSX_DEPLOYMENT_TARGET to remove linking warning
* Addr Thrasher nits
* Addr glorious nits
* unexport do request function
* fixed nitorinos
* Fixed something I missed
* move disabled rate limiter into loadexchange and use interface functionality
* Add temp quick fix
* expose auth validator functionality for wrapper
* Add REST validation after keys set, package account types for future syncing
* Add transient error checking for initial creddemtial validation
* fix command types
* Addressed nits from glorious person
* Amalgamate body within error when not between 2xx status, added btcmarket specific auth error check
* nit fix for glorious person
* Format fix
* removed unused code
* check transient first then validate if its an exchange specific authentication error, all others will be disregarded
* Addressed glorious nits
* Addressed glorious nits
* Moved account processing to updateaccountinfo func and added in fetch account info
* Add GRPC Account streaming (NOTE: could not complete until sync item added)
* RM exchange check
* Address xtda nits
* RM comment code
* Fix linter issues
* used most recent protoc version
* lbank linter issues fixed
* Addressed nits and changed len check to range in for loops
* Fixed timeout issue
* thrasher nits addressed
* add string holdings