* drop common uuid v4 func and imported package as needed
* removed common functions regarding json marshal and unmarshal and used the json package directly. WRT unmarshal it was calling reflect and converted to string which is also checked in the JSON package so it was doing a double up, this will be a tiny gain as it was directly used in the requester package for all our outbound requests.
* add in string
* explicitly throw away return error value
* atleast return the error that websocket initialise returns
* return error when not connected
* fix comment
* Adds comments
* move package declarations
* drop append whenever we call supported
* remove unused import
* Change incorrect spelling
* fix tests
* fix go import issue
* Add 32bit build matrix test
* Adjust travis/Makefile
* Set dist back to xenial
* export CGO_ENABLED=1
* Add gcc-multilib
* Sudo installerino
* make check -> make test
* 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
* Adds new file.Move func to address a bug with Golang/Docker volumes when using os.Rename
Also uses TempDir for tests instead of live directories and increases test coverage for file.Write
* Goimport the imports
* Make usage of file package name consistent so it no longer clashes with vars
* Remove outputFile if io.Copy fails
* 1) Update Dockerfile/docker-compose.yml
2) Remove inline strings for buy/sell/test pairs
3) Remove dangerous order submission values
4) Fix consistency with audit_events (all other spec files use
CamelCase)
5) Update web websocket endpoint
6) Fix main param set (and induce dryrun mode on specific command line
params)
* Engine QA
Link up exchange syncer to cmd params, disarm market selling bombs and fix OKEX endpoints
* Fix linter issue after merge
* Engine QA changes
Template updates
Wrapper code cleanup
Disarmed order bombs
Documentation updates
* Daily engine QA
Bitstamp improvements
Spelling mistakes
Add Coinbene exchange to support list
Protect API authenticated calls for Coinbene/LBank
* Engine QA changes
Fix exchange_wrapper_coverage tool
Add SupportsAsset to exchange interface
Fix inline string usage and add BCH withdrawal support
* Engine QA
Fix Bitstamp types
Inform user of errors when parsing time accross the codebase
Change time parsing warnings to errors (as they are)
Update markdown docs [with linter fixes]
* Engine QA changes
1) Add test for dryrunParamInteraction
2) Disarm OKCoin/OKEX bombs if someone accidently sets canManipulateRealOrders to true and runs all package tests
3) Actually check exchange setup errors for BTSE and Coinbene, plus address this in the wrapper template
4) Hardcode missing/non-retrievable contributors and bump the contributors
5) Convert numbers/strings to meaningful types in Bitstamp and OKEX
6) If WS is supported for the exchange wrapper template, preset authWebsocketSupport var
* Fix the shadow people
* Link the SyncContinuously paramerino
* Also show SyncContinuously in engine.PrintSettings
* Address nitterinos and use correct filepath for logs
* Bitstamp: Extract ALL THE APM
* Fix additional nitterinos
* Fix time parsing error for Bittrex
* Improved error message when no config is set on startup
* Change inccorect error wording
* bump Bitfinex websocket orderbook return length to max
* temporary fix of incorrect orderbook updates, limit to bid and ask len of 100, will be extended later if needed
* Fixed issue in binance websocket that appended 0 volume bid/ask items
* Fix panic when unmarshalling an empty pair from config
* Add get pair asset method for exchange base
Fix Bitmex orderbook stream
Unbuffer Bitmex orderbook stream
* force syncer to update ticker instead of fetch, which allows a stream
* Fix websocket last price for coinbasepro
* fix websocket ticker for coinut
* Fix websocket orderbook stream Huobi
* increase orderbook depth REST for Huobi
* Fix websocket support and ensure data integrity
* Fix time parsing issue after error checks
* check error, only process enabled currency pairs, signal websocket data processing
* expanded websocket functionality for okgroup
* Add logic to not process zero length slice for orderbooks
* fix websocket ticker only updating enabled and individual book updates
* ZB fixes to order submission/retrieval/cancellation w/ general fixes
* Quiet unnecessary warning
* updated config entry values for REST and websocket (initial hack until I come up with a better solution for asset types)
* Ch GetName function to field access modifyer & rm useless code
* Add in error I missed
* Nits addressed
* some more fixes
* Turned kraken default websocket to true and some small changes
* fixes linter issues
* Ensured okgroup books and sent update through to datahandler. Zb update as well.
* Add test case to get asset type from pair
* Add test for pairs unmarshal
* Add testing and addressed nits
* FIX linter issue
* Addressed Gees nits
* Thanks glorious spotter
* more nitorinos
* Addres even more nits
* Add stringerino 4000
* Fix for panic cause by sort slice out of range, also nits addressed
* fix linter issues
* Changed from function to field access
* Changed from function to field access
* fix for orderbook update panic, removes quick fix - caused by sync item fetching through same protocol
* Add new test and update random generator
* pass in invalid string to future ob fetching, due to futures contract expire and a http 400 error is returned
* Removes lock unlock timer and instead sets unlocks between getting a nonce and sending a payload. Increases dispatch channel buffer to deal with len(enabledCurrencies) > ~100
* Adds additional comments to help explain the situation
* Fixes bug that could unlock mutex too early
* Fixes LIES where Gemini gets a nonce and then proceeds to declare it doesn't get a nonce causing an unrecoverable lock
* Fun new concept! The creation of a tested timed mutex. Unlocking an unlocked mutex cannot occur and response can be checked to verify whether the mutex was unlocked from timeout or command.
* Adds new cmd parameter "dispatchjobbuffer"
* Expands comments and renames benchmark. Makes `Timer` property private
* Happy little linters
* Renames jobBuffer and all related instances to jobs limit
* Tiny error message update
* Grammatical fix and setting dispatch.Start to use defaults
* 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
* Migrated to goose & sqlboiler
* create tests with sqlboiler
* code clean up
* Added gct -> sqlboiler config gen
* dropped pgx support
* dropped pgx support because who needs connection pools
* reenable sqlite audit tests
* first pass of migration changes
* stuff is broken :D
* sqlboiler :D
* end of date commit
* Added comments code clean up
* revert go module files back to upstream
* bug fix
* pushed go.mod update to use correc goose version
* renamed sqlite to sqlite3 for consistency across codebase and PR feedback changes
* makefile updates
* things are broken end of day commit
* added postgresql test
* use correct database name
* travis fixes for env vars
* travis fixes for env vars
* test fixes
* run migration on test setup
* test adding postgres support to appveyor
* Skip tests on appveyor due to issues with missing binaries
* oh yeah i have to support windows don't i
* bumped goose version up
* add postgres to osx
* fix travis config as osx does not support services move spin up to before_script
* added PGDATA path fix
* pass PG_DATA to pg_ctl
* added initdb to before install
* fixes to wording and bumps up goose version
* who needs ssl anyway
* moved ssl to correct section :D
* bumped goose version up
* unbreak travis
* unbreak travis
* fix if database is disabled in config
* move strings to consts
* converted more strings to const
* improvements to sqlboiler mmodel gen
* Added contrib\sqlboiler file
* sqlboiler windows contrib fixes
* bumped goose version up
* :D whoops
* further fixes to sql models
* further fixes to sql models
* database type fix for config gen
* README update
* go.mod clean up
* added config details for appveyor
* appveyor ordering fix
* force psql9.6
* appveyor config changes
* all the environmen vars
* model changes for psql
* model changes for psql
* sqlite model fixes
* attempt at osx fix
* added error check for migration
* typos and check against goose error instead of string :D
* updated sqlboiler commit id
* bump sqlboiler version again
* set decimal package to @0bb1631
* readme and makefile updates
* bump goose version update readme and add override flag to config gen
* README typo fix and lowered inserts in test down to 20 as we are only testing that inserts work running 200 was unnecessary
* added gctcli command for audit event
* Added debug output toggle to config added both postgres & sqlite support to gctcli command
* Wording changes on errors
* set sqlite to 1 connection to stop locke database issues
* Usage update for order
* README updates with config examples
* go.mod/sum tidy
* removed lines in import second
* removed lines in imports
* convert local time to utc for database and display output
* go mod clean up and error checking to time
* renamed all packages to sqlite3
* added windows command output for sql model gen
* time conversion fix
* time conversion on gctcli
* 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