* Greatly increases efficiency of web socket orderbook processing by minimising multiple map lookups. Changes buffer to use pointers. Ensures orderbook benchmarks are on equal footing and set correctly. Removes data race by not setting waitgroup adds inside go routine causing wait and add to happen simultaneously. Updates ticker and orderbook service to use a pointer var instead of map lookups when setting data.
* Removes misguided comment
* Removes waitgroups and goroutines for updating bids and asks for non-id orderbook updates via websocket. Updates benchmarks to be consistent
Since Go 1.5, Go will use the total number of logical processers that the
system has available. Caveats to this are if someone has set the
GOMAXPROCS env var set or wish to limit usage of the number of logical processers
between a range from 1 to NumCPUs
* Added dispatch service
* Added orderbook streaming capabilities
* Assigned correct orderbook.base exchange name
* Fixed Requested niterinos
Add in cli orderbook QA tool to gctcli
Add exchange orderbook streaming
* Add ticker streaming support through dispatch package
* Added in some more info on error returns for orderbook.go
* fix linter issues
* Fix some issues
* Update
* Fix requested
* move dispatch out of exchanges folder to its own independant folder
* Fix requested
* change orderbook string to tickers
* Limit orderbooks to 50 and made dispatch system more stateless in operation
* lower cases for update/retrieve/sub exchange name
* Adds in asset validation and lower case conversion on cli
* Remove comment
* Moved timer to a higher scope so its not constantly initialised just reset per instance and removed returning unused channel on error
* Rm unused release function in dispatch.go
Reset timer and bleed buffered timer chan if needed in dispatch.go
Added in ticker.Stop() and timer.Stop() functions for worker routine return in dispatch.go
Index aggregated bid and ask functions for orderbook.go
Added in dummy slice for wsorderbook_test.go
* Moved drain to above Reset so potential race would not occur in dispatch.go
Fix various linter issues dispatch.go
* Fix some issues
* change to start/stop service, added in service state change via cli, updated logger
* fix requested
* Add worker amount init spawning
* fix linter issues
* Fix more linter issues
* More fixes
* Fix race issue on releasing pipe channel on a close after shutting down dispatcher system
* Moved all types to dispatch_types.go && remove panic
* Moved types into serperate file && improve test coverage
* RM unnecessary select case for draining channel && fixed error string
* Added orderbook_types file and improved code coverage
* gofmt file
* reinstated select cases on drain because I am silly
* Remove error for drop worker
* Added more test cases
* not checking error issue fix
* remove func causing race in test, this has required protection via an exported function
* set Gemini websocket orderbook exchange name
* Initial commit tearing down the websocket connection management. The purpose is to remove the traffic monitoring and dropping as syncer.go is a better manager
* Adds a readwrite mutex and helper functions to minimise inline lock/unlocks and prevent races
* Creates new WebsocketType struct to contain all parameters required. Deletes WebsocketReset. Utilises ReadMessageErrors channel for all websocket readmessages to analyse when an error returned is due to a disconnect
* Fixes issue with syncer trying to connect while connecting
* Simplifies initialisation function for websocket. Reconnects and resubscribes after disconnection
* Adds WebsocketTimeout config value to dictate when the websocket traffic monitor should die. Default to two minutes of no traffic activity. Increases test coverage and updates existing tests to work with new technologic. RE-ADDS TESTS I ACCIDENTALLY DELETED FROM PREVIOUS PR
* Removes snapshot override as its always necessary when considering reconnections. Increases test coverage. Re-adds tests that were ACCIDENTALLY DELETED. Removes unused websocket channels. Bug fix for traffic monitor to shutdown via goroutine instead of killing itself
* Fixes gateio bug for authentication errors when null. Adds little entry to syncer for when websocket is switched to rest and then back, you get a log notifying of the return. Fixes okgroup bug where ws message is sent on a disconnected ws, causing panic. Renames setConnectionStatus to setConnectedStatus. Puts connection monitor log behind verbose bool
* Fixes lingering races. Fixes bug where websocket was enabled whether you liked it or not. Removes demonstration test
* Fixes log message, renames unc, removes comments
* Fixes data race
* Removes verbosity, ensures shutdown sets connection status appropriately
* Removes go routine causing CPU spike. Stops timers properly and resets timers properly
* Renames `WsEnabled` to `Enabled`. Increases test coverage. Fixes typos. Handles unhandled errors
* The forgotten lint
* With using RWlocks, removes the channel nil check and relies on !w.IsConnected() to prevent a shutdown from recurring
* Removes extra closure step in the defer as it causes all the issues
* Prevents timer channel hangups. Minimises use of websocket Connect(). Expands disconnection error definition. Removes routine disconnection error handling. Ensures only one traffic monitor can ever be run. Renames subscriptionLock to subscriptionMutext for consistency
* Extends timeout to 30 seconds to cover for non-popular exchanges and non-popular currencies
* Updates test from rebase to use new websocket setup function
* Fixes test to ensure it tests what it says it does
* Fix bug where on parsing an alternate new config it will overwrite main config.json in gct dir
* Stop movement of config.json file from root dir when a new config is parsed in
* Stop overiding config.json at gct dir with new config.json from root directory
* RM LN :D
* Fix bug where promptforconfig in config_encryption.go overwrites default config
Ensure periphery command packages do not interact or save over configuration
Ensure tests to not save over or change current testdata/config
* Initial commit which runs through all wrapper funcs for one of each currency pair for each asset type for each exchange and then outputs it all into a JSON file
* Fixes up data holding responses to allow for good json output after completion
* Starting work for reading credentials from a config. Some variable names are more appropriate
* Keys can now be read from keys.json and applied to exchanges. Fixes naming bug for console output
* Cleans up implementation. Uses templating to output some pretty html report
* Changes config to include a bank account to customise for withdrawals. Updates template for warnings for not implemented. Updates template to include jsonified parameters that are sent to the wrapper. Jsonifies the response so you actually understand whats returned.
* Adds bank for withdrawals. Adds wallet address for crypto withdrawals
* Adds ordersubmission configuration to config. Sets command line overrides. Adds lbank to config. Adds okgroup clientid to config.
* Adds missing comma
* Adds config to gitignore
* Removes because thats not how it works...
* Revert go mod changes
* Formatting for prettiness
* Adds asset type override
* Adds verbose, exchangesToExclude, filename CL flags. Removes wg redeclaration. Creates func to check to load exchange before its loaded. Removes double variables and uses flag.Stringvar instead
* Prettifies the JSON output
* Stringifies the []byteified jsonified wrapper response in the template
* Puts types in their own EXCLUSIVE types.go. LOWERCASES COMMAND LINE ARGUMENTS. Wraps vars in var so theres less vars to look at.
* Generates wrapperconfig.json on the fly if not present. Adds missing config fields and exchanges when not present. Saves config file on finish. Fixes some formatting on output when its just a number
* micro format update
* Changes printfs to printlns. Handles config error. Comments on types. Fixes lint issue with shadow err declaration
* Fixes linting issue, removes returns after fatals, evaluates assetType, formats template
* Stringifies byte output when console output is selected. Verbose mode now includes wrapper responses in console output
1) Although gRPC does server side validation currently, validate basic things
on gctcli before relaying the request to the gRPC server
2) Make pair format consistent for the exchange sycner
3) Fix OKEX ticker failure due to thinking futures info is authenticated
4) Start filling out config tests
5) Extend timeout for golangci config so that AppVeyor has time to
complete (Travis is fine)
6) Add IsSupported exchange func for easy lookup
* Ensures that futures, index and swap currencies are properly set on OKEX startup with an existing engine config that hasn't been updated yet
* Removes package/variable CLASH
* Adds extra properties to Websocket ticker. Adds new properties to binance and bitfinex, but doesn't test anything yet. Changes names and properties of ticker package to make more streamlined
* Adds support for coinbasepro, coinut, gateio, gitbtc, huobi, hadax, kraken, okex, okcoin. Adds quoteVolume
* Adds poloniex and ZB ticker datas
* Updates ANX, Binance, Bitfinex, Bistamp, Bittrex, BTCMarkets, BTSE, CoinbasePRo, Coinut, Exmo tickers. It looks like a whole bunch of stuff is wrong in how tickers are done though :/
* Updates tickers everywhere. Will revert batch ones
* Re-Preseves ticker batching
* Minor fixes to ticks and removal of comment
* Logging errors instead of returning mid loop. Adds bitfinex batch ticker processing. Fixes unrelated okgroup wallet bug
* Removes bad code I wrote preventing function from running if feature not enabled
* Fixes issue with bitmex and rebase issues
* Fixes bitmex iterator error, splits hitbtc ticker requests
* Fixes okgroup currency pair formatting. Updates okgroup to use ticker batching. Fixes okgroup ticker issues due to assetTypes. Fixes okgroup ws pinging. Fixes Kraken's currency pairs formatting. Reverts ANXs auto parsing back to strings because ANX json makes me cry. Minor property improvements for coinut, coinbasepro, btse, exmo. Protects wshandler manageSubscriptions() from running and returning an error when feature not supported
* Updates config example to reflect the underscore dash situation
* Fixes a config delimiter oopsie. Simplifies ANX wrapper ticker parsing. Fixes bittrex date parsing. Simplifies okcoin switch to if.
* Fixes super fun issue where kraken has updated their currency pair format and must add new delimiter support. Fixes super fun issue where okex has updated their currency pair format and must add new delimiter support. Fixes super fun issue where okcoin has updated their currency pair format and must add new delimiter support.
* Updates config example for kraken
* Adds lbank batch ticker support. Adds details to errors
* Updates FetchTradablePairs to use the config delimiter to prevent issues if the delimiter ever changes
* Fixes nil reference bug. Uses NAme not GetNAme
* Fixes hardcoded delimiter in Binance. Expands bitfinex websocket ticker fields. Updates Bitstamp rate limits. Expands BTSE ticker data fields. Fixes typo in coibasepro. Expands Coinut ticker data. Renames currency to curr as it conflicts with package name. Expands GateIO websocket ticker data. Fixes ticker data implementation for huobi and huobi hadax. Reverts ticker map to string instead of assetType. Fixes real stupid bug I introduced which preveted subscriptions from running :glitch_crab: Adds Price ATH to ws ticker type. Adds quotevolume to yobit ticker. Uses delimiter in ZB rather than hardcoded field.
* Fixes bug in syncer where if the websocket is already connected, then UsingWebsocket is not set
* Updates broken tests
* Simplifies poloniex frozen check
* Updates configtest.json with new delimiters
* Renames shorthand properties of structs. Fixes delimiter referencing
* Fixes some bugs and nits around variable declaration, currency pairs and config upscaling
* Adds config upgrade path for okcoin and okex. Reverts configtest.json.
* Fixes okex futures currency formatting by no longer using global currency format. updates Run code to adapt. Removes BTSE value
* Adds ":" as a delimiter for when a delimiter only shows up SOMETIMES
* Adds support for optional delimiter
* Fix issue for ANX live testing, incorrect format directive
* Used cpy of Balances as param for Bitstamp function, added space for ANX fatal error.
* Fix linter issue
* Drop struct field for balance and localised a variable in each individual getfee call as needed
* added audit manager
* Basic database DOA setup
* Added base config file
* added sqlite support and creation of schema
* added basic tests and config entry
* corrected issues of database is disabled
* fixed path for test
* WIP
* Added tests fixed config checking
* reverted files back to upstream
* reverted go.mod files
* no more test test test
* removed local testing details for psql
* hello
* added comments
* increased ping to 30 seconds
* renamed database table and added additional condition around test
* removed database test details
* goimport ran on all files
* WIP
* first attempt at migration
* fixes for migration system
* Migration system logger interface implemented
* fixes to print functions
* added write pooling pass
* gofmt :D
* formatted imports correctly
* removed old code
* added creation of migration
* gofmt
* :D Hello
* ❌🏎️
* maybe one day i will remember to revert go mod files
* checked err return condition correctly
* first changes for PR feedback
* code clean up
* protect Connected with RWmutex & event with mutex
* : D
* we can just pretend like it never happened
* MOved migrations back to source directory and added README
* readme formatting update
* Addd command line override for datadir
* use correct var when creating a migration and confirm folder is created
* Check if database version is newer than latest migration and also you know make migrations work.....
* uses filepath instead of manual path to use correct path seperator
* Add connection message and lower timeout
* Added support for sslmode for psql
* no longer force Close of database instead allow driver to maage
* Added closer func to test output
* sslmode added to example config
* Initial commit setting up a map orderbook system with a buffer. It will write to the buffer, sort apply to main orderbook and then process.
* Moves namespaces again
* Updates orderbook to use a sweet new WebsocketOrderbookUpdate type to handle all updates whether its using ID or not. So good. Adds many tests
* Starting to implement orderbook update handling per exchange. Updates namespaces again. Hopefuylly will find a way to update via ID not timestamp, too many endpoints dont provide update timestamps
* Changes orderbookbuffer to use BufferUpdate type instead of orderbook.Base to achieve more functionality and no need for type conversion functions. Updates tests
* Updates all instances of ws.orderbook.Update. Simplifies some orderbook logic
* Introduces toggleable buffer. Renames orderbooks. Completes implementation for everywhere but OKGroup due to hash calculation
* Implements orderbook update for okgroup, but forgets about the orderbook hash checking
* Fixes okgroup checksum calculation. Fixes linting issue. Removes redundant Kraken tests.
* Introduces sorting toggle and separates from buffer toggle. Uses benchmarks to highlight performance gains
* Fixes Gemini rate limit and parsing. Removes comments and fixes typos
* Fixes bitfinex orderbook processing
* Inbuilt sorting, minor fixes for websocket implementations. Improves test coverage
* Adds surprise LakeBTC websocket support
* Fixes data race
* Fixes rebasing issues due to namespace movements
* Addresses PR nits: moves folder namespace from ws to websocket. Removes line spaces in imports. Fixes lakebtc websocket returns and defer fucntions. Fixes comments
* Adds poloniex orderook sorting support
* Enables bitstamp and hitbtc orderbook sorting. Fixes poloniex's sorting
* Renames namespaces and combines monitor and connection into wshandler. Removes unused SPOT const. Changes how orderbook stuff is loaded. It is done in startup with a setup. Removes exchange name from loadsnapshot as well
* Removes the connection.go from rebasing issues. Removes error response from functions used in goroutines
* Fixes test with exchange name output change
* Fixes issues where copy and paste and replace all were used poorly