* Updating wrapper template, updating documentation, regenerating documentation
* Renaming "streaming api" to "websocket"
* Context is now t
* Update docs/ADD_NEW_EXCHANGE.md
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update cmd/documentation/root_templates/root_readme.tmpl
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Fixes an improper example and regenerates documentation
* Corrects typos
* Makes a table label consistent across files
---------
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Bybit: Fix race in TestUpdateAccountInfo and TestWSHandleData
* DriveBy rename TestWSHandleData
* This doesn't address running with -race=2+ due to the singleton
* Accounts: Add account.GetService()
* exchange: Assertify TestSetupDefaults
* Exchanges: Add account.Service override for testing
* Exchanges: Remove duplicate IsWebsocketEnabled test from TestSetupDefaults
* Dispatch: Replace nil checks with NilGuard
* Engine: Remove deprecated printAccountHoldingsChangeSummary
* Dispatcher: Add EnsureRunning method
* Accounts: Move singleton accounts service to exchange Accounts
* Move singleton accounts service to exchange Accounts
This maintains the concept of a global store, whilst allowing exchanges
to override it when needed, particularly for testing.
APIServer:
* Remove getAllActiveAccounts from apiserver
Deprecated apiserver only thing using this, so remove it instead of
updating it
* Update comment for UpdateAccountBalances everywhere
* Docs: Add punctuation to function comments
* Bybit: Coverage for wsProcessWalletPushData Save
* codebase: Remove web frontend and related services
* refactor: Update StartPPROF to accept context and adjust related tests
* refactor: Simplify SetIfZero functions and update related tests
* config: Clarify DowngradeConfig method documentation regarding permanent removal of deprecated fields
* refactor: Rename setIfZeroAndWarn to setDefaultIfZeroWarn for clarity and update related calls
* refactor: Update error handling in DataHistoryManager and remove redundant error variable
* set limiter to first level mock data list and updated unit tests
* address nested slices length limit
* minor fix recording file and update unit tests
* minor updates on unit tests
* re-record mock files and minor fix on the unit tests ti adapt the mock data change
* improve http recording limit value and fix issues with mock data in binance
* added MockDataSliceLimit in request items and resolve minor unit test issues
* resolve missed conflict
* rename mock variables, resolve unit test issues, and other updates
* minor fix to CheckJSON and update unit tests
* minor unit test fix
* further optimization on mock CheckJSON method, unit tests, and re-record poloniex
* common and recording unit tests fix
* minor linter issues fix
* unit tests format fix
* fix miscellaneous error
* unit tests fix and minor docs update
* re-record and reduce mock file size
* indentation fix
* minor assertion test fix
* reverted log.Printf line in live testing
* rename variables
* update NewVCRServer unit test
* replace string comparison with *net.OpError check
* restructur net error test
* exchanges/mock: Remove redundant error assertion message in TestNewVCRServer
---------
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* docs: Create new CODING_GUIDELINES doc
Rids excess contribution instructions from other packages
Adds AGENTS.md file for the AI overlords
Rids unused templates
Updates ADD_NEW_EXCHANGE.md with minor fixes
* docs: Fix linter issues and minor adjustments based on Copilot feedback
* docs: Update coding guidelines for API parameters and testing practices
* docs: Remove redundant GoDoc references
Adds copilot-instructions.md
* docs: Update CODING_GUIDELINES with export recommendations and test commentary
* docs: Fix formatting inconsistencies in ADD_NEW_EXCHANGE.md links
* docs: Update struct naming conventions for request and response types
* docs: Improve clarity and consistency in ADD_NEW_EXCHANGE.md and CODING_GUIDELINES.md
* refactor: Simplify error handling in QueryOrder method
* Added TimeInForce type and updated related files
* Linter issue fix and minor coinbasepro type update
* Bitrex consts update
* added unit test and minor changes in bittrex
* Unit tests update
* Fix minor linter issues
* Update TestStringToTimeInForce unit test
* Exchange test template change
* A different approach
* fix conflict with gateio timeInForce
* minor exchange template update
* Minor fix to test_files template
* Update order tests
* Complete updating the order unit tests
* Updating exchange wrapper and test template files
* update kucoin and deribit wrapper to match the time in force change
* minor comment update
* fix time-in-force related test errors
* linter issue fix
* ADD_NEW_EXCHANGE documentation update
* time in force constants, functions and unit tests update
* shift tif policies to TimeInForce
* Update time-in-force, related functions, and unit tests
* fix linter issue and time-in-force processing
* added a good till crossing tif value
* order type fix and fix related tim-in-force entries
* update time-in-force unmarshaling and unit test
* consistency guideline added
* fix time-in-force error in gateio
* linter issue fix
* update based on review comments
* add unit test and fix missing issues
* minor fix and added benchmark unit test
* change GTT to GTC for limit
* fix linter issue
* added time-in-force value to place order param
* fix minor issues based on review comment and move tif code to separate files
* update on exchanges linked to time-in-force
* resolve missing review comments
* minor linter issues fix
* added time-in-force handler and update timeInForce parametered endpoint
* minor fixes based on review
* nits fix
* update based on review
* linter fix
* rm getTimeInForce func and minor change to time-in-force
* minor change
* update based on review comments
* wrappers and time-in-force calling approach
* minor change
* update gateio string to timeInForce conversion and unit test
* update exchange template
* update wrapper template file
* policy comments, and template files update
* rename all exchange types name to Exchange
* update on template files and template generation
* templates and generation code and other updates
* linter issue fix
* added subscriptions and websocket templates
* update ADD_NEW_EXCHANGE.md with recent binance functions and implementations
* rename template files and update unit tests
* minor template and unit test fix
* rename templates and fix on unit tests
* update on template files and documentation
* removed unnecessary tag fix and update templates
* fix Add_NEW_EXCHANGE.md doc file
* formatting, comments, and error checks update on template files
* rename exchange receivers to e and ex for consistency
* rename unit test exchange receiver and minor updates
* linter issues fix
* fix deribit issue and minor style update
* fix test issues caused by receiver change
* raname local variables exchange declaration variables
* update templates comments
* update templates and related comments
* renamed ex to e
* update template comments
* toggle WS to false to improve coverage
* template comments update
* added test coverage to Ws enabled and minor changes
---------
Co-authored-by: Samuel Reid <43227667+cranktakular@users.noreply.github.com>
* 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
* exchanges: Improve TestMain usage
* exchanges: Further cleanups
* exchanges/kucoin: update TestProcessOrderbook to use test context
* refactor: rename SetRunning to SetRunningURL for clarity across exchanges
* codebase: Rid base64/hex to string common funcs
* codebase: Rid local scope variable usage and other improvements
* codebase: Refactor currency pair usage across multiple exchanges
- Updated HitBTC tests to use the new currency pair format.
- Modified Kraken futures types to use currency.Pair instead of string for Symbol.
- Adjusted Kraken wrapper methods to handle currency pairs correctly.
- Refined OKX tests and types to utilize currency.Pair for instrument IDs.
- Enhanced Poloniex tests to consistently use predefined currency pairs.
- Streamlined order and orderbook tests to replace string pairs with currency.NewBTCUSD().
- Improved Yobit tests to utilize a standardized currency pair format.
- Updated validator wrapper to use currency pairs directly instead of string conversions.
* codebase: Use types.Number where possible
* refactor: update PayoutFee type to types.Number for consistency
* Refactor: Remove crypto functions to use standard library and other minor changes
- Removed custom crypto functions for SHA256, SHA512, and MD5 from the common/crypto package.
- Replaced usages of removed functions with standard library implementations in various files including:
- cmd/websocket_client/main.go
- engine/apiserver.go
- exchanges/kraken/kraken.go
- exchanges/lbank/lbank.go
- exchanges/okx/okx_business_websocket.go
- exchanges/kucoin/kucoin_websocket.go
- gctscript/vm/vm.go
- Updated tests to reflect changes in the crypto functions.
- Renamed several functions for clarity, particularly in the context of order book updates across multiple exchanges.
* refactor: replace assert with require for consistency in test assertions
* refactor: Improve Binance futures candlestick test, standardise orderbook update function names and improve test parallelism
* refactor: Replace require.Len with require.Equal for better output in TestGetFuturesKlineData
* LBank: Fix TestGetWithdrawConfig, assertify tests and other minor changes
* refactor: Update pair var and other tweaks
* refactor: Increase test coverage for crypto funcs and minor adjustments
* refactor: Replace assert with require for error checks in TestCreateOrder
* Update exchanges/lbank/lbank.go
Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com>
* refactor: Correct spelling of HighestPrice in KlineResponse and increase test coverage
* refactor: Update error handling in CreateOrder and improve GetTrades comment
---------
Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com>
* golangci-lint: Enable usetesting and unused linters
* tests: Improve assertions in various test cases for clarity and accuracy
* tests: Enhance error assertions in TestExecuteStrategyFromFile for improved clarity
* tests: Update assertions for improved clarity and accuracy
* tests: Replace assert with require for task count checks
* config/versions/v7: Replace context.Background() with t.Context()
* Bithumb: Centralise and consoliate testPair, relax UpdateTickers check
with some glorious Doom Eternal music
* Bithumb: Use UpdatePairsOnce and update remaining pair string
* Bithumb: Add UpdatePairsOnce to TestUpdateTickers
* Websocket: Rename stream package
* Websocket: Rename Websocket to Manager
* Websocket: Replace explicit errs with common.NilGuard
* Websocket: Move websocket_types.go to types.go
* Websocket: Minor field comment and alignment in types
* Webosocket: Rename WebsocketConnection to Connection
* Alphapoint: Make gorilla ws import explicit
Just to avoid confusion with our own packages.
* Websocket: Move stream_match to match
* Websocket: Move websocket_connection to connection
* Websocket: Move websocket.go to manager.go
* Websocket: Break out all subscription methods into subscriptions.go
* Websocket: Move connection type into its file
* Websocket: Remove PositionUpdated
Type is not used anywhere
* Kraken: Use local constant for pong
Was the only use of websocket.Pong and doesn't really feel right to
represent kraken's api resp in one of our packages
* Websocket: Move connection sub-types to connection package
* Websocket: Move manager types into manager
* Websocket: Move ConnectionWrapper into manager
* Websocket: Move websocket_test to manager_test
* Websocket: Privatise connectionWrapper
* Websocket: Remaining types into types.go
These really belong somewhere else mostly, but this will do for now
* Websocket: Tidy up connection method vars
* Gofumpt: Moving package imports around
* Websocket: Rename errDuplicateConnectionSetup
* Websocket: Fix duplicate import of gws
* Websocket: Fix gofumpt -extra
* Websocket: Standardise import of gws across other pkgs
* Kraken: Remove unused sub conf consts
These were replaced by the generic Levels and Depth fields on all subs
* Websocket: Privitise ConnectioWrapper fields
* Websocket: inline single use var WebsocketNotAuthenticatedUsingRest
* Websocket: Move documentation to template
* Bithumb: Assertify TestWsHandleData
* modernise: Run new gopls modernise tool against codebase
* Address shazbert's nits
* apichecker, gctcli: Simplify HTML scraping functions and improve depth limit handling
* refactor: Create minSyncInterval const and update order book limit handling for binance and binanceUS
* refactor: Various slice usage improvements and rename TODO
* tranches: Revert deleteByID changes due to performance decrease
Shazbert was a F1 driver in a past lifetime 🏎️
* tranches: Simply retrieve copy
Thanks to shazbert
* documentation: Sort contributors list by contributions
* tranches: Remove deadcode in deleteByID
* 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>
* 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 initial handling for quote/base currency deployment requirements
* include client order ID checking
* glorious: suggestions
* spell and fix
* linter/context/test
* rework tests and order side specific requirements
* linter
* mend panic at the disco
* mending more panics at the disco
* anudda fix brudda
* glorious: NITTTTTT BOOOOOMB
* leftover things and stuff
* whoops
* tie in gateio
* glorious: nit fixes life and everything.
* thrasher: nits
---------
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>
* Shift wrapper function GetDefaultConfig to exchange.Base method definition, to ensure set defaults doesn't get called twice and to reduce code
* rm alphapoint bootstrap method as is defined as exchange.Base method
* add tests
* glorious: make it a function and make it IBOTEXCHANGE
---------
Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
* Exchanges: Remove Pair upgrade handling
Now redundant behind #1401. These paths should never be met.
Several legacy coin upgrade paths being deprecated as well: ZUSD and CNY
Expecting any users with bad config from 3+ years ago would have to
reset anyway.
Also: At the time the intention of this was to upgrade the config
format.
However now, instead, it'd mostly serve to reset enabled pairs if
there's a config mistake, which doesn't feel right.
* Kraken: Fix typo in Kraken type struct
* Exchanges: Abstract exchange Start() and Run()
* Exchanges: Add test for abstracted Start
* Exchanges: Move Start to Bootstrap
* Simplify waitgroup usage
* Add call to exchange.Bootstrap to allow overide or supplementation
* Exchanges: Concurrent common bootstap actions
* Gateio: Remove incorrect Run in test
* GateIO: Fix pair dependencies in tests
This ensures that the pairs are initialised no more than needed and
kind-of just-in-time.
Better pattern might be to use a function to get these pairs when we
need them.
* Exchanges: Complete UpdatePairs before ExecLims
If we're going to update pairs, it needs to complete before we check for
limits to avoid errors on old pairs
* Exchanges: Remove Start and Run from tmpl
Since they're replaced by bootstrap now and shouldn't need customisation
normally
* Alphapoint: Move Start to Bootstrap
* GateIO: Fix linter shadow var
* cmd/exchange_template: Add wrapper function
* exchanges: force UpdateOrderExecutionLimits to wrappers as this is important for order deployment
* kucoin: Add spot order execution limits
* linter: fix
* glorious: nits
* kucoin: change from name to symbol for correct fee fetching and order deployment
* WHAAAAAAAT says Vitalik
* kucoin: Add futures limit support, fix insertion of non margin tradable pairs, update naming and add comments.
* kucoin: implement master branch changes
* Update exchanges/kucoin/kucoin_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* kucoin/test: update commentary
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* adds funding rate implementations and improvements
* merge fixes x1
* lint
* kucoin funding rates func make
* migrate sync-manager to keys
* some kucoin work
* adds some kucoin wrapper funcs
* ehhh, todo
* kucoin position
* start of orders
* adds the kucoin tests yay
* multiplier
* nits, EWS includes order limits
* NotYetImplemented, IsPerp improvements, cleaning
* lint, test fix, huobi time
* fixes issues, improves testing
* fixes linters I WRECKED
* local lint but remote lint, lint, lint, lint
* fixes err
* skip CI
* lint
* Supported rates, binance endpoints
* fixes weird mocktest problems
* no, CZ is invalid
* fixes some new EWS test errors
* all in a days work
* cleanup
* cleanup for real, also stop it binance.json
* minor coverage
* adds gateio to the slurry
* cleanup of types
* verbose verbose verbose verbose verbose verbose
* fixes huobi parsing issue
* fix bybit contract identification
* cleanup
* merge fixes
* addresses many big problems raised by SHAZ
* tracking errors and fixes
* funding rate if avail, fixes currency formatting
* Addresses nits and sneaks in extra fixes
* lint
* minor fixes after rebase
* better contract splitter for currencies like T-USDT
* forgot to add the exchange name like a fool
* merge fixes x1
* kucoin, direction, contract size
* rn direction, fix kucoin time
* WHOOPS
* Update exchanges/kucoin/kucoin_wrapper.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* misdirection
---------
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* exchanges: Add function to get standard config
* exchanges: add tests (cherry-pick here and above)
* after pick stuff
* cleanup
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* SubmitOrder- order.Buy replaced with IsLong
Progresses #1270
* Btcmarkets: order.Buy and order.Sell changed to order.Bid and order.Ask
* Bithumb: SubmitOrder- order.Buy replaced with IsLong
Progresses #1270
* Binanceus: SubmitOrder- order.Buy replaced with IsLong
Progresses #1720
* Bistamp: SubmitOrder- order.Buy replaced with IsLong
Progresses #1270
* Bitfinex: Changed order Side to IsLong
* Binance:switch added to SubmitOrder
* Binance: Replaced Buy and Sell in SubmitOrder with IsLong and IsShort
* Binance:SubmitOrder if statement for order side simplified
* initial concept of a nice validation tester for exchanges
* adds some datahandler design
* expand testing
* more tests and fixes
* minor end of day fix for bithumb
* fixes implementation issues
* more test coverage and improvements, but not sure if i should continue
* fix more wrapper implementations
* adds error type, more fixes
* changes signature, fixes implementations
* fixes more wrapper implementations
* one more bit
* more cleanup
* WOW things work?
* lintle 1/1337
* mini bump
* fixes all linting
* neaten
* GetOrderInfo+ asset pair fixes+improvements
* adds new websocket test
* expand ws testing
* fix bug, expand tests, improve implementation
* code coverage of a lot of new codes
* fixes everything
* reverts accidental changes
* minor fixes from reviewing code
* removes Bitfinex cancelBatchOrder implementation
* fixes dumb baby typo for babies
* mini nit fixes
* so many nits to address
* addresses all the nits
* Titlecase
* switcheroo
* removes websocket testing for now
* fix appveyor, minor test fix
* fixes typo, re-kindles killed kode
* skip binance wrapper tests when running CI
* expired context, huobi okx fixes
* kodespull
* fix ordering
* time fix because why not
* fix exmo, others
* hopefully this fixes all of my life's problems
* last thing today
* huobi, more like hypotrophy
* golangci-lint, more like mypooroldknee-splint
* fix huobi times by removing them
* should fix okx currency issues
* blocks the application
* adds last little contingency for pairs
* addresses most nits and new problems
* lovely fixed before seeing why okx sucks
* fixes issues with okx websocket
* the classic receieieivaier
* lintle
* adds test and fixes existing tests
* expands error handling messages during setup
* fixes dumb okx bugs introduced
* quick fix for lint and exmo
* fixes nixes
* fix exmo deposit issue
* lint
* fixes issue with extra asset runs missing
* fix surprise race
* all the lint and merge fixes
* fixes surprise bugs in OKx
* fixes issues with times and chains
* fixing all the merge stuff
* merge fix
* rm logs and a panic potential
* lovely lint lament
* an easy demonstration of scenario, but not of initial purpose
* put it in the bin
* Revert "put it in the bin"
This reverts commit 15c6490f713233d43f10957367fcbf18e3818bdd.
* re-add after immediate error popup
* fix mini poor test design
* okx okay
* merge fixes
* fixes issues discovered in lovely test
* I FORGOT TO COMMIT THIS
* nit fixaroonaboo
* forgoetten test fix
* revert old okx asset intrument work
* fixes
* revert problems I didnt understand. update bybit
* fix merge bugs
* test cleanup
* further improvements
* reshuffle and lint
* rm redundant CI_TEST by rm the CI_TEST field that is redundant
* path fix
* move to its own section, dont run on 32 bit + appveyor
* lint
* fix lbank
* address nits
* let it rip
* fix failing test time range
* niteroo boogaloo
* mod tidy, use common.SimpleTimeFormat
* exchanges/sharedtestvalues: implement new functions to handle test skipping and announcements for standardising.
* exchanges: fin test impl.
* linter: fixes
* exchange_template: fix test
* allocate so it doesn't make a panic at the disco
* glorious: nits
* glorious: nits
* Update exchanges/sharedtestvalues/sharedtestvalues.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/sharedtestvalues/sharedtestvalues.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* linter: fix
* linter: shhhh
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* exchanges: add setTimeWindow boolean to GetKlineRequest params to differentiate between a set time period return from endpoint.
* glorious: nits
* exchange: conjugation
* Update exchanges/exchange.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits and an assortment of differences
* exchanges: remove some comments
* glorious: nits
* cleanup
* tests: fix
* Update exchanges/hitbtc/hitbtc_wrapper.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/kline/kline.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/kline/kline_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* kline: fix test
* rm unused variables
* almost: nits
* glorious: nits
* linter: fix
* rm unused variable
* Refactored comment in the okex tests to ensure that it accurately reflects the variable name and the issue related to the time window, as requested by GloriousCode. The previous comment did not align with the identifier assigned to the property, which could cause confusion and misunderstanding among other programmers or stakeholders. The updated comment will improve the clarity and readability of the codebase and make it easier to understand the intended purpose of the associated variables. The change was made with the aim of improving the overall quality and maintainability of the code.
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* wrapper_coverage/exchanges: cancel context to not send rest requests/ populate context through functions that do rest requests
* linter: fix
* exchange_template: fix test
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* add backtester support
* Prevent live data custom candles, prevent nanosecond candles
* test coverage
* a more interesting rsi strategy result
* actual custom candle and proper strat date
* add test to old funk
* typos 🌞🌞
* this was definitely worth failing linting for
* Adds stricter processing and adapts to it
* now compat with partial and absent candles
* test fixes, zb fixes
* fix more introduced bugeroos
* fix more introduced bugeroosx2
* linting for one space is so annoying
* addresseroos niteroos
* Update backtester/engine/setup.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* kline: Add builder and testing
* Ideas
* kline: deploy builder functionality across GCT
* exchanges: implement across gct
* exchanges: Add tests and fix implementations before kline package testing and veri.
* kline: Add tests and start to fix ConvertToNewInterval
* kline: fix ConvertToNewInterval add tests
* kline: complete overarching tests now on to exchanges
* kline: finish exchange tests and implement limits
* exchanges: more fixes
* linter: fix
* engine: fix tests
* kraken: fix recent trades and other fixes
* zb: fix tests
* bithumb: fix empty insertion
* kline: refactor/optimize CreateKline function
* kline: remove the mooos!
* kline: prealloc CalculateCandleDateRanges
* linter: fix
* exchanges: prealloc extended
* fix whoopsie
* reverse fix because this is a whoopsie
* okx: fix risidual issues
* linter: fix
* kline: initial nits from @gloriouscode
* kline: rename builder -> request and cascade change
* linter: fix + test
* kline: update forced alignment on start and end times when CreateKlineRequest is called.
* nits: more more more
* NITS: Addressed
* tests: fix race issue
* Update exchanges/kline/request.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* kline: add method AddPadding() to automatically fill in holes in kline.Request functionality and reject if missing data when converting
* kline: Add params start and end to addPadding() to insert blanks in between block
* kline: remove test comment code as it's not needed anymore
* kline: fix lint and test
* kline: sort slice without extra bool check every iteration
* okx: fix issues with timeing and candles and such from niterinos & address typo
* Update exchanges/kline/kline.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: niterinos
* Update exchanges/poloniex/poloniex_wrapper.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits now onto conflicts YAYA!!!
* Update exchanges/exchange_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits again
* thrasher: nitters
* thrasher: niterinos - adds partial flag for incomplete recent candles and fetching.
* kline: rm fmtizzle packageizzle
* glorious: nitters
* glorious: more niterinos
* fix last niterinos
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* 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>