* golangci: Enable err checking linter to expose unchecked errors.
* gct: handle errors across the board
* gct: handle errors NOTE: Found bug in FTX (WIP)
* linter: fix issues
* ftx/exchanges: fix bug where error was being returned when setting pair management variables to an already enabled state
* bitmex: fix bug where a dangly supported asset in config danglied up the place.
* linter: fix more linter issues
* linter: fix my terrible spelling.
* currency: fix test
* exchanges: fix tests
* logger: fix test
* exchanges: fix tests
* glorious: nits
* vm: revert rm variable and instigate test
* Initial codes for a trade tracker
* Moving everything in a broken fashion
* Removes tradetracker. Removes some errors for subsystems
* Cleans up some subsystems, renames stuttering types. Removes some global Bot usage
* More basic subsystem renaming and file moving
* Removes engine dependency from events,ntpserver,ordermanager,comms manager
* Exports eventManager, fixes rpcserver. puts rpcserver back for now
* Removes redundant error message, further removes engine dependencies
* experimental end of day interface usage
* adds ability to build the application
* Withdraw and event manager handling
* cleans up apiserver and communications manager
* Cleans up some start/setup processes. Though should separate
* More consistency with Setup Start Stop IsRunning funcs
* Final consistency pass before testing phase
* Fixes engine tests. Fixes stop nil issue
* api server tests
* Communications manager testing
* Connection manager tests and nilsubsystem error
* End of day currencypairsyncer tests
* Adds databaseconnection/databaseconnection_test.go
* Adds withdrawal manager tests
* Deposit address testing. Moved orderbook sync first as its more important
* Adds test for event manager
* More full eventmanager testing
* Adds testfile. Enables skipped test.
* ntp manager tests
* Adds ordermanager tests, Extracts a whole new subsystem from engine and fanangles import cycles
* Adds websocket routine manager tests
* Basic portfolio manager testing
* Fixes issue with currency pair sync startup
* Fixes issue with event manager startup
* Starts the order manager before backtester starts
* Fixes fee tests. Expands testing. Doesnt fix races
* Fixes most test races
* Resolves data races
* Fixes subsystem test issues
* currency pair syncer coverage tests
* Refactors portfolio. Fixes tests. Withdraw validation
Portfolio didn't need to exist with a portfolio manager. Now the porfolio manager
is in charge how the portfolio is handled and all portfolio functions are attached
to the base instead of just exported at the package level
Withdrawal validation occurred at the exchange level when it can just be run at the
withdrawal manager level. All withdrawal requests go through that endpoint
* lint -fix
* golang lint fixes
* lints and comments everything
* Updates GCT logo, adds documentation for some subsystems
* More documentation and more logo updates
* Fixes backtesting and apiserver errors encountered
* Fixes errors and typos from reviewing
* More minor fixes
* Changes %h verb to %w
* reverbs to %s
* Humbly begins reverting to more flat engine package
The main reasoning for this is that the subsystem split doesn't make sense
in a golang environment. The subsystems are only meant to be used with engine
and so by placing them in a non-engine area, it does not work and is
inconsistent with the rest of the application's package layout.
This will begin salvaging the changes made by reverting to a flat
engine package, but maintaining the consistent designs introduced.
Further, I will look to remove any TestMains and decrease the scope
of testing to be more local and decrease the issues that have been
caused from our style of testing.
* Manages to re-flatten things. Everything is within its own file
* mini fixes
* Fixes tests and data races and lints
* Updates docs tool for engine to create filename readmes
* os -> ioutil
* remove err
* Appveyor version increase test
* Removes tCleanup as its unsupported on appveyor
* Adds stuff that I thought was in previous merge master commit
* Removes cancel from test
* Fixes really fun test-exclusive data race
* minor nit fixes
* niterinos
* docs gen
* rm;rf test
* Remove typoline. expands startstop helper. Splits apiserver
* Removes accidental folder
* Uses update instead of replace for order upsert
* addresses nits. Renames files. Regenerates documentation.
* lint and removal of comments
* Add new test for default scenario
* Fixes typo
* regen docs
* Add initial workflows config
* Add PSQL service
* Add 32bit and frontend jobs
* Add gcc-multilib and fix typo
* Fix backtester test for linux/unix filesystem errors and npm commands
* 32-bit Add -race to purposefully throw an error to ensure envs are set correctly (will revert)
* Revert "32-bit Add -race to purposefully throw an error to ensure envs are set correctly (will revert)"
This reverts commit b97e66c49fca859f8738e01107f96f9ca4040b2e.
* Bump workers count for orderbook processing
* Remove comments to trigger 32-bit cache hit after job success
* Cancel addition plus version bump, spawn more overlords
* Update build badge to Github Actions
* Brach -> Branch
* Adds mock testing to ZB
* STEALS improved time validation code from the original STOLEN validation code :D
* Mini fixes from review
* happy fun comment stealing
* Moves the loop checker earlier to ensure no double appendages
* Fixes sneaky test
* Fixes the important part where mock tests work instead of live tests
* Skips authenticated endpoints for mock testing.
* lint
* Updates candle wrapper functions to respect design
* basic linting fix
* Reverts configtest.json, updates readme to be way better, adds coverage to validateCandlesRequest
* Tiniest grammatical fix
* Fixes more outdated code references
* Closing out a high
* Fixes spacing
* Replaces all instances of 4 spaces in tmpl files with a tab
* fixes spacing and tab related readme issues once and for all 🤞
* tidy
* indentation violation identification situation
* initial update of currency system
* WIP progress
* Finish initial currency string error returns
* fix whoopsie testing for non https insecureinos
* Current WIP for getEnabledPairs check and error return
* WIP continued
* When getting enabled pairs throw error when item is not contained in available pairs list
* More updates -WIP
* Wip continued including potential interface
* Current WIP
* pairs manager pass
* drop asset string and just use the map key, plus return some errors and create more work for myself.
* clean and fixed a bug in currency.json, will not populate correctly without coinmarketcap api keys set.
* purge logger references after merge
* go mod tidy after merge
* Pointer change WIP
* fix some issues and added error returns to a few items (WIP)
* WIP
* Clean
* Fix some linter issues
* Fix more linter issues
* even more linters
* xtda nits
* revert pointer change and rm field
* Addr madcozbadd nits
* fix linter issues: shadow declarations
* Fix linter issues: gocritic huge things
* linter issue fix
* Addr nits
* flush go mod files
* after merge woops
* fix shadow dec
* Addr thrasher nits
* addr nits
* fix some issues
* more fixes
* RM println
* Addr glorious nits
* Add helper method for setting assets
* add missing format directive
* Addr nits
* Actually process new futures contracts -_- derp
* WIP for GRPC upgrade for pair management
* update config pairs
* finished disabling and enabling asset
* linked update of tradable pairs to cli
* fix oopsies
* defer writing to file on program termination for currency storage system
* update template
* don't add disabled asset items to initial sync
* Fix enable disabling a list of pairs and added in a slice error type so we can add whats allowable without throwing an error and return a report, also addressed some other nits
* WIP on getting a channel to unsub
* Wip track down unsubscribe bug and start creating streaming interface
* purge websocket orderbook object and centralised updating routine for orderbook
* general clean before interface implementation
* stage one connection interface WIP
* WIP
* repackage wshandler WIP
* find difference of subs and change signature of subscriber functions so we can batch subscriptions and unsubscription in exchanges that support it
* design change on mange subscription routine WIP
* integrated ZB with the new webosocket updates
* WIP - okex conversion
* integrate websocket upgrades for lakebtc, kraken, huobi, hitbtc, gateio, and WIP for coinbene
* integrate another range of exchanges for websocket update
* Added subscriber and unsubscriber methods to websocket functionality
* fixed tests WIP
* amalgamate cache setup with main websocket setup
* reinstate exported fields traffic alert and shutdownC to accommodate gemini and lakebtc implementations
* added in colon
* Updated websocket auth handling as they werent getting passed through. Added a setter method for websocket URL due to the Binance generated auth key/listenKey. Fixed bug which stopped reconnection.
* Fix subscribe candle bug
Fix time conversion in candle
Fix inititial candle history to datahandler
Include funding to orderbook handling
Include funding to trades
Reduce code duplication in sub and unsub functions
Added the ability to include funding currency websocket subscriptions
validated all channels and added more items todo list (Auth items)
* RM line
* bitstamp pass
* btcmarkets pass - still needs to implement unsubscriber functionality and pairs change test.
* Batch outgoing subscriptions and fix unsubscribe bug
* BTSE - bumped time to minute to reduce pinger calling by 75 calls per day. Fix authentication bug and add authentication pass into to-do. Batch outgoing subscription calls
* fix type field and batch outgoing subs and unsubs for coinbasepro
* Batch outgoing subs and unsubs
* Fixes bug when matching return from authentication
* Fix bug where params where being sent out of order due to map ,where depth items werent being subscribed too, where trying to subscribe to too many kline items caused error, where trying to get a nano secocond ID conflicted due to speed of generation.
* Add websocket capability for currency pair change by utilizing full channel subscription list in subscribe function.
* Add error handling
* Fix public: time conversions, subscription list, stopped pushing heartbeat to data handler, aggregated list of connections.
* hitBTC pass
* returned nil instead of error due to period null bids and asks updates coming through.
* Fix auth ping capture and reply. Added in interval handling for kline data. Added correct full trade data handling. Fix subscribe and unsubscribe.
* Fix when websocket auth conn and token generation fail we don't try and auth sub. Fix bug between auth and normal connection id generation and matching. Batch outgoing payloads to increase efficiency. Updated matching functions to utilise channels instead of waitgroups and go routines.
* RM debug output
* rm func to get shutdown channel
* Add unsubscriber functionality, added wsTicker type, removed return as this will impede data flow and cause reconnection when handling and processing data
* okgroup WIP
* *Added missing fields for websocket trades
*Fix bug processing kline interval
*Added fields for websocket ticker struct
*Fix auth bug
-Updated request and response matching param to interface so we can custom signature match. Stops auth subscribing before a reply is issued.
-Updated channel inclusion of pair fo auth subs as this was missing.
*Assortment of perfomance improvements
* poloniex pass
* send all trades to data handler, validated enabled and disable pairs
* initial clean
* centralised request matching mechanism
* websocket main improvements WIP
* WIP
* Websocket management via gctcli WIP
* GRPC expansion
* Updated GCTCLI with websocket url and proxy setting functionality which flushes connection
* Fix continuous spawning of routines bug on error with reconnection
* Addr linter issues
* fix subscription bug that I caused when I changed to a switch case
* fix linter issue
* fix woopsie
* End of day WIP
* Fix order submission REST, time conversion, order type conversion, orderID bugs
* fix gateio test and unsubscribe bug
* revert comment out code
* websocketAPI changed to to true in configtest.json
* fix race in gateio test
* End of day WIP for websocket tests.
* BugFix for binance when book isn't seeded. Updated websocket tests. Deprecated subscription manager. RM wrapper funcs.
* Added string title to exchange name as they are saved as lower case in type, reinstated verbose check in websocket.go
* Added verbosity check for setting websocket URL
* fix bug where the asset had a mind of its own
* purge dodgy coding
* Fix tests, drop blocking chan in websocket Dial function
* few more changes
* race condition fix for websocket tests.
* fix intermittent test failure due to underlying hash table storage
* Address madcuzbad nit
* RM superfluous printlines
* Add quick top example with paramater fields
* First pass Glorious nits
* As per madcozbad suggestion return error when enabled pair not found in full return map. Add test.
* addr madcozbadd nits
* as per glorious suggestion rm'd loadedJSON field
* adjusted ticker, added test and RM'd code that can never be executed
* Addr nits and add in crypto rand genration for ID's
* remove global channel declaration and rescoped as this was causing a lock
* as per glorious suggestion restructured return error for websocket
* addr glorious suggestions
* fix linter issues
* purge non-existent pair from testdata
* add side field to struct and parse
* addr glorious nits
* Add verbosity to error returns and logs and fix string parsing in GCTRPC
* fix speeling mistwake
* Adds websocket functionality check before flushing websocket connection
* Addr kraken panic and setting/flush websocket url stage one.
* added websocket url check before setting with tests
* Added in edge case test if by the time we call contains on available pairs it has been changed
* remove error return for func
* Continuation of tests
* continuation of tests
* Stop potential panic within pair creation function
* Implement changes to upstream
* rm sup comment
* fix bug when subscribing and unsubscribing. Also add in boolean to determine there are currencies that need to be flushed via set pairs via gctcli
* fix test
* Fix linter issues
* Fix tests
* turn websocket off in config example
* Fix issue where you cannot enable websocket when config is set to false, also added config websocket enable state saving
* Introduced err var for same error returns
* Add err var exchange base not found
* restructure function
* drop gctscript from generic response name
* drop managesub delay const as its not being used
* correctly implement websocket rate limiting for coinut
* remove quotations
* drop pair management check
* fix spelling
* return error in function to not update currency with unset role
* amalagamted enable/disable into set function and added in pairstore fetch function
* update error description
* rm function
* moved test function to sharedtestvals and move type to types.go
* append delimiter onto currency delimiter strings
* add test coverage
* rm functions as they are set as methods in base
* remove superfluous methods
* Fix issue that would occur when a subscription errored and not appending successful subs
* fix after rebase woopsie
* fix linter issues
* fix bug streamline code
* fix linter issues
* fix linter issues
* fix case where it should not change ID if set but append new
* fix whoopsie
* fix websocket tests
* fix readme, fix wrapper issues reporting template, go mod tidy
* add test coverage
* add test coverage and verified futures pariing
* add in futures bypass as its not currently supported on BTSE until API update and implementation
* removed downside/upside profit contract type as its no longer supported. Added in check in set config pairs to warn user of potential conflict and to manually remove or update.
* If asset enabled add pair and increase code coverage
* remove strings.title, set and fetch with strings.Lower but keep struct field exchangename unchanged. Streamline ticker and orderbook code.
* Add code coverage
* log error if setting default currency fails, add code coverage
* address glorious nits
* Addr xtda nits
* fix linter issues
* addr glorious nits
* xtda nits
* Addr glorious nits
* add subscription protection and removed a superfluous wait call
* fix test
* fix whoopsie
* addr xtda nits
* addr glorious nits
* Added asset types to subscriptions structs, also added in error handling for resubscription errors
* consolidated rpc returned type and added in sucessful strings
* dropped stream timing down to 100ms
* DOC changes
* proxy and url usage string additions
* WIP
* go mod tidy rides again
* Addr nits
* Addr nits, fix tests
* fix wording
* add in test case for currency matching
* Add byte length check on outbound websocket payload subscriptions
* addr thrasher nits
* Addr madcozbadd nits
* addr linter issues
* Addr glorious nits by amalgamating function into one mega amazing function.
* fix futures account subscription bug
* addr glorious nits and reinstated wg.Wait() checks
* changed string to currency delimiter string and setconnected by function
* Add exchange manager to engine
* Several improvements for engine and friends
1) New file.Exists func
2) gRPC TLS cert expiration date check and regeneration
3) New donation var for use across the codebase
4) Use Go log package until the logger is initialised
* Add cert tests and create dir tree if it doesn't exist for file.Write
* Link up donation address to documentation tool plus minor adjustments
* Fix remaining donation addrs
* Move non-needed reload exchange funcs
* Revert accidental config_example.json changes 🕯️
* Use go logger for logging until the logger has initiliased, otherwise no output will be seen
* Link up portfolio delay val and other fixes
* Run go mod tidy after dependabot PR
* Address nitterinos
* Add directories to exclusion list && change default repo string
* Add in .idea folder to directory exclusion list
* cleaned
* Added support for calling the tool outside of its file
* fix formatting
* changed strings
* Attempts to update orderbook so it doesn't need to sort
* Reverts the ws ob stuff. Gets rid of sorting because it happens later. Adds some exchange features
* update existing feature lists. Expands list definition to match my emotions
* Adds bithumb bitmex and bitstamp. adds a couple more types
* Features for you, features for me, features for bittrex, btcmarkets, btse, coinbasepro, coinut, exmo, gateio and gemini
* Features for hitbtc, huobi, itbit, kraken, lakebtc, lbank, localbitcoins, okcoin, okex, poloniex, yobit, zb
* Who can forget good old alphapoint?
* Adds btcmarksets websocket :glitch_crab: fixes alphapoint features
* Adds extra data not in the documentation :/
* Replaces websocket features by using protocol features. However, it breaks it due to import cycles. I'm not sure what I'll do just yet
* Removes import cycle via duplicate structs.
* Increases coverage of config with `TestCheckCurrencyConfigValues`. Moves all currency pair package types into their own files or places it at the bottom of files if necessary
* Increase coverage in code.go
* One way of determining a test has failed, is when to it fails. Removed redundant explanation
* Increases code coverage of conversion
* Lint fixes
* Fixes orderbook tests
* Re-adds sorting because its important to still have the internal pre-processed orderbook to be representative of a real orderbook
* Secret lints that did not show up via Windows linting
* Adds protocol package to contain exchange features
* Fixes protocol implementation
* Fixes ws tests
* Addresses the following: Removes st-st-stutters in config types, changes GetAvailableForexProviders -> GetSupportedForexProviders, removes errors from tests where error is nil, removes orderbook setup when not necessary, removes import newlines, removes false bools from declaration, changes should of to should have
* imports and casing
* Fixes two more nil error checks
* Initial currency overhaul before service system implementation
* Remove redundant currency string in orderbook.Base
Unexport lastupdated field in orderbook.Base as it was being instantiated multiple times
Add error handling for process orderbook
* Remove redundant currency string in ticker.Price
Unexport lastupdated field in ticker.Price
Add error handling for process ticker function and fix tests
* Phase Two Update
* Update translations to use map type - thankyou to kempeng for spotting this
* Change pair method name from Display -> Format for better readability
* Fixes misspelling and tests
* Implement requested changes from GloriousCode
* Remove reduntant function and streamlined return in currency_translation.go
* Revert pair method naming conventions
* Change currency naming conventions
* Changed code type to exported Item type with underlying string to reduce complexity
* Added interim orderbook process method to orderbook.Base type
* Changed feebuilder struct field to currency.Pair
* Adds fall over system for backup fx providers
* deprecate function and children and fix linter issue with btcmarkets
* Fixed requested changes
* Fix bug and move mtx for rates
* Fixed after rebase oopsies
* Fix linter issues
* Fixes race conditions in testing functions
* Final phase coinmarketcap update
* fix linter issues
* Implement requested changes
* Adds configuration variables to increase/decrease time durations between updating currency file and fetching new currency rates
* Add a collection of tests to improve codecov
* After rebase oopsy fixes for btse
* Fix requested changes
* fix after rebase oopsies and add more efficient comparison checks within currency pair
* Fix linter issues
* Updated documentation tool
Added templates
Updated documentation using tool
* Fixed incorrect version in web README
* Added new templates to tool.
Updated documents in templates across the code base.
Used tool to regenerate documentation.
Added period to documentation templates sentences.
Added logic to documentation.go to fix broken links for godoc in sub-packages.
Fix coding style to conform to golang idiomatic practice.
Applied fix to access main godocs in tools and test data.
Generated new documents using tools.