* Various bug fixes
* Deadlink, cleanup plus bug fixes
* Various Kraken fixes
* Add convert func for decimal unix timestamps
* Convert all test times to UTC
* Kraken: Make assets a pointer to prevent excessive copying
* Docker slash fix
* Address nits plus bump ITBit last checked pairs timestamp
* Set pairs to enabled pairs when getting active orders
* Use asset translator for UpdateAccountInfo and more checks for the exchange template tool
* Address MadCozBadd's nits
* Make exchange var 2 chars
* Make program more user friendly
* Project wide comment checks and exchName check
* Fix Huobi indexing bug and use correct pair formatting
* Address nits + readme change
* Bugfix, remove non-needed code and cleanup some code
* Run go mod tidy
* Remove non-needed test and fix tautological err
* Fix Huobi interim var reference
* Added config option for SetMutexProfileFraction() to profiler increased test coverage and made tests runnable standalone
* Removed duplicate host and no longer const
* Added pprof endpoint to log
* Start Coinbene SWAP implementation
* Flesh out more API endpoints
* Code cleanup
* Add more endpoints, bug fixes and order validation checks
* More endpoints, tests and bugfixes
* Remove omitempty for enabled/available pairs
* 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
* Establishes new websocket functionality. Begins the creation of the websocket request
* Adding a wrapper over gorilla websocket connect,send,receive to handle ID messages. Doesn't work
* Successfully moved exchange_websocket into its own wshandler namespace. oof
* Sets up ZB to use a round trip WS request system
* Adds Kraken ID support to subscriptions. Renames duplicate func name UnsubscribeToChannels to RemoveSubscribedChannels. Adds some helper methods in the WebsocketConn to reduce duplicate code. Cleans up ZB implementation
* Fixes double locking which caused no websocket data to be read. Fixes requestid for kraken subscriptions
* Completes Huobi and Hadax implementation. Extends ZB error handling. Adds GZip support for reading messages
* Adds HitBTC support. Adds GetCurrencies, GetSymbols, GetTrades WS funcs. Adds super fun new parameter to GenerateMessageID for Unix and UnixNano
* Adds GateIO id support
* Adds Coinut support. Prevents nil reference error in constatus when there isnt one
* Standardises all Exchange websockets to use the wshandler websocket. Removes the wsRequestMtx as wshandler handles that now. Makes the Dialer a dialer, its not externally referenced that I can see.
* Fixes issue with coinut implementation. Updates bitmex currencies. Removes redundant log messages which are used to log messages
* Starts testing. Renames files
* Adds tests for websocket connection
* Reverts request.go change
* Linting everything
* Fixes rebase issue
* Final changes. Fixes variable names, removes log.Debug, removes lines, rearranges test types, removes order correlation websocket type
* Final final commit, fixing ZB issues.
* Adds traffic alerts where missed. Changes empty struct pointer addresses to nil instead. Removes empty lines
* Fixed string conversion
* Fixes issue with ZB not sending success codes
* Fixes issue with coinut processing due to nonce handling with subscriptions
* Fixes issue where ZB test failure was not caught. Removes unnecessary error handling from other ZB tests
* Removes unused interface
* Renames wshandler.Init() to wshandler.Run()
* Updates template file
* Capitalises cryptocurrencies in struct. Moves websocketResponseCheckTimeout and websocketResponseMaxLimit into config options. Moves connection configuration to main exchange Setup (where appropriate). Reverts currencylastupdated ticks. Improves reader close error checking
* Fixes two inconsistent websocket delay times
* Creates a default variable for websocket ResponseMaxLimit and ResponseCheckTimeout, then applies it to setdefaults and all tests
* Updates exchange template to set and use default websocket response limits
* First pass at adding new logging system
* NewLogger
* NewLogger
* WIP
* silly bug fix
* :D removed files
* removed old logging interface
* added tests
* added tests
* Started to add new lines to all f calls
* Added subsystem log types
* Logger improvements
* Further performance improvements
* changes to logger and sublogger creation
* Renamed Logging types
* removed old print statement
* changes based on feedback
* moved sublogger types to own file
* :)
* added console as output type
* added get level command
* added get/set log level via grpc command
* added check for output being empty for migration support
* first pass at log rotation
* added log rotation
* :D derp fixed
* added tests
* changes based on feedback
* changed log type
* comments
* renamed file -> fileSettings
* typo fix
* changes based on feedback
* gofmt ran on additional files
* gofmt ran on additional files
* Improves subscribing by not allowing duplicates. Adds bitmex auth support
* Adds coinbase pro support. Partial BTCC support. Adds WebsocketAuthenticatedEndpointsSupported websocket feature. Adds GateIO support
* Adds Coinut support
* Moves Coinut WS types to file. Implements Gemini's secure WS endpoint
* Adds HitBTC ws authenticated support. Fixes var names
* Adds huobi and hadax authenticated websocket support
* Adds auth to okgroup (okex, okcoin). Fixes some linting
* Adds Poloniex support
* Adds ZB support
* Adds proper bitmex support
* Improves bitfinex support, improves websocket functionality definitions
* Fixes coinbasepro auth
* Tests all endpoints
* go formatting, importing, linting run
* Adds wrapper supports
* General clean up. Data race destruction
* Improves testing on all exchanges except ZB
* Fixes ZB hashing, parsing and tests
* minor nits before someone else sees them <_<
* Fixes some nits pertaining to variable usage, comments, typos and rate limiting
* Addresses nits regarding types and test responses where applicable
* fmt import
* Fixes linting issues
* No longer returns an error on failure to authenticate, just logs. Adds new AuthenticatedWebsocketAPISupport config value to allow a user to seperate auth from REST and WS. Prevents WS auth if AuthenticatedWebsocketAPISupport is false, adds additional login check 'CanUseAuthenticatedEndpoints' for when login only occurs once (not per request). Removes unnecessary time.Sleeps from code. Moves WS auth error logic to auth function so that wrappers can get involved in all the auth fun. New-fandangled shared test package, used exclusively in testing, will be the store of all the constant boilerplate things like timeout values. Moves WS test setup function to only run once when there are multiple WS endpoint tests. Cleans up some struct types
* Increases test coverage with tests for config.areAuthenticatedCredentialsValid config.CheckExchangeConfigValues, exchange.SetAPIKeys, exchange.GetAuthenticatedAPISupport, exchange_websocket.CanUseAuthenticatedEndpoitns and exchange_websocket.SetCanUseAuthenticatedEndpoints. Adds b.Websocket.SetCanUseAuthenticatedEndpoints(false) when bitfinex fails to authenticate
Fixes a typo. gofmt and goimport
* Trim Test Typos
* Reformats various websocket types. Adds more specific error messaging to config.areAuthenticatedCredentialsValid
* Step one: Sets up connection handler for websockets to always be connected until a shutdown event is received.
Sets up a vague subscription handler to ensure subscriptions are subscribed
* Adds support for resubscriptions for bitfinex, bitstamp, bitmex and btcc. Adds subscription params for special websocket subscription requirements. Removes subscription monitor from wait group so that it can exist despite a shutdown and continuously check
* Adds channel subscription support to bitmex, btse, coibasepro, coinut, gateio, gemini, hitbtc, huobi, hadax, kraken, okgroup, poloniex and zb
* Implements unsubscribe for bitfinex, btcc, btse, coinbasepro, gateio, gitbtc, huobi, hadax
* ManageSubscriptions now called from WSConnect and made private instead of inside individual exchanges. ManageSubscriptions can now unsubscribe. exchange_websocket_types.go now contains all exchange_websocket.go types to avoid clutter
* Adds it to websocket functionality so managesubscriptions will close when not supported
* Separates functions into testable functions to ensure logic works. Adds tests. Updates websocket setup to include verbosity (inherited from exchange). Adds no connection tolerance to fatal on failed reconnects
* More exchange_websocket tests. Updating to use pointers. Creation of equals func to make comparison easier
* Fixes okex, okcoin tests. Fixes race conditions. Removes pointer usage again.
* Adds subscribe and unsubscribe to wrappers
* Fixes deadlock. Fixes ws verbosity.
* Updates all exchanges to properly support subscription/connection feature. Also reintroduces race conditions....
* Moves connection varialbes to struct from package to allow each websocket to have their own reconnection checks. Neatens up logs
* Fixes lint/critic issues. Fixes tests. Removes unused function.
* Moves websocket ratelimiter to their own const variables. Fixes more race conditions with connecting variable
* Removes redundant subscribe functions. Ensuring only the exchange_websocket.go can manage subscriptions. Fixes debug logs to be verbose wrapped
* Fixes issue with slice copying. Re-adds okgroup default channels
* Adds nolint to append
* Adds comments and adds support for gateio auth request subscriptions
* Adds new test to ensure slices dont point to the same vars
* removes fatals. gofmt goimports
* more gofmts
* Addresses PR comments, removing empty and redundant lines
* Addresses PR comments. Ensures that writing to the websocket is single-threaded by adding a mutex to exchanges. Minimises wrapper code and moves subscription loops to exchange_websocket. Privatises ChannelsToSubscribe, Connecting properties and removeChannelToSubscribe func to prevent unnecessary tampering.
* Removes unused mutex. FMTS and IMPORTS
* Fixes request lock time change
* More specific logs
* Renames ws mutex. Fixes bitmex subscriptions. Increased gateio ratelimiter to 120ms. Removes ratelimiter from bitfinex, bitmex, bitstamp, btcc, btse, coibasepro, hitbtc, huobi, hadax, poloniex and zb
* changes recieved typo due to not being well received
* Fixes parsing issue with Huobi and hadax
* Fixes data race with more locks
* removes defer locks. fixes huobi/hadax verbose output
* Fixes double JSONEncode for coinut. Fixes verbose output for coinut
* gofmt,goimport for coinut
* Fixes issue where multiple connection monitors can spawn
* Removes defer exchange.WebsocketConn.Close() in defer handledata exit as connectionmonitor handles connections instead
* gofmt and go import
* More fmts
* First pass adding DumpResponse
* WIP
* Added httpDebug flag to SendPayload
* anx -> coinbase converted
* HTTPDebug flag added to all exchanges
* Updated Alphapoint:
* reworded error message
* Corrected itbit and huobihadax sendpayload
* Removed setting of default value
* don't return body for response as we already get this in verbose mode
* body is now included based on verbose setting
* WIP
* Due to issues with DumpResponse and gzip decoding use raw response from exchange for body output Also adds gzip decoding back as bug fix for OK group exchange
* removed additional new line
* Added URL path to dumpbody display as well
* Updates nonce generation to adhere to fifo channel buffer before request executes by routine
* removed unused variables, lns etc
* Fix requested changes and added in timer that disengages lock if out of scope error occurs
* Fixed woopsy daisy issue
* Add benchmark, reduce time in force to unlock before stack insertion, add nil check for edge case
* Remove unusued waitgroup field
* use return nonce.Value and method, rm redundant nonce code, fix tests.
* Fix linter issue: unnecessary conversion
* WIP
* Added check for time out of sync
* merged upstream/master
* added tests
* Increased configuration options for NTPclient and test coverage
* removed unneeded config save at end of ntp update
* Added test for empty response to confirm it will loop
* formatting correction
* converted to pointer to allow for default allowance settings to be checked
* added readme for NTP server
* corrected some formatting
* updated configtest negativedifference value
* gofmt config_test.go for correct import order
* corrected typo value in test
* bugfix for windows newline and changes based on PR feedback
* added minus sign to output
* fixed negative number input
* Fixed spelling mistakes and removed redundant test
* reverted back to a positive number in the config instead of negative for allowednegativedifference
* restructured code for cleaner output
* Initial commit. Adds ticker, candle and trade, subscription support
* Adds support for spread and orderbooks
* Adds new currency pair delimiter ("/"), Adds dedicated websocket Connected channel handler, Updates Kraken websocket capability definition, Refines websocket tests to connect and disconnect without freezing, separates WebsocketUnsubscribeEventRequest ChannelID into its own struct WebsocketUnsubscribeByChannelIDEventRequest to prevent bad json WS requests, Adds asset type to orderbook, Kraken WS handles connection better
* Removes duplicate type, reverts config value
* Addresses error returns and changes writeToWebsocket to use byte array. Removes deferred funcs in tests. Increases test listening limit for rare cases
* Fixes verbose log. Rearranges WS Connect async ordering. Fixes DATA RACE. Fixes random okex tests. Ensures Kraken WS tests only connect once
* 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
* Add new unauthenticated forex provider and use it by default
This is in response to currencyconverterapi requiring an API key for the free version
* Fix golinter complaint
* Added additional endpoints, tests and improve config forex logic
* Updates requester package to allow unpacking of zipped files and defaults to warn if no JSON is present
* Initial addition of coinmarketcap functionality
* fix requested changes
* Fix issue with displaying false positive in request.go && reorder plan list
* Rename CurrencyProvider -> CryptocurrencyProvider
Skip seeding currency data if not enabled
Rm line in main.go
* Update test procedures and relevant json files
* Fix const issue within config.go
* Added new base logger
* updated example and test configs
* updated exchange helpers restful router & server
* logPath is now passed to the logger to remove dependency on common package
* updated everything besides exchanges to use new logger
* alphapoint to bitmex done
* updated bitmex bitstamp bittrex btcc and also performance changes to logger
* btcmarkets coinbase coinut exmo gateio wrappers updated
* gateio and gemini logger updated
* hitbtc huobi itbit & kraken updated
* All exchanges updatd
* return correct error for disabled websocket
* don't disconnect client on invalid json
* updated router internal logging
* log.Fatal to t.Error for tests
* Changed from fatal to error failure to set maxprocs
* output ANSI codes for everything but windows for now due to lack of windows support
* added error handling to logger and unit tests
* clear wording on print -> log.print
* added benchmark test
* cleaned up import sections
* Updated logger based on PR requests (added default config options on failure/setting errors)
* ah this should fix travici enc config issue
* Load entire config and clear out logging to hopefully fix travisci issue
* wording & test error handling
* fixed formatting issues based on feedback
* fixed formatting issues based on feedback
* changed CheckDir to use mkdirall instead of mkdir and other changes based on feedback
* Changes method signature for cancelling all orders (experitmental). Implements cancelAllOrders wrapper for alphapoint, anx, binance
* Implements cancel all wrapper for bitfinex, bitmex, bitstamp, bittrex, btcmarkets, coinbasepro and hilariously coinut
* Changes method signature to only use one OrderCancellation type. Adds support for Exmo, gateio, gemini, itbit, lakebtc
* Adds/updates support for hitbtc, huobi, hadax, itbit and kraken
* Adds support for liqui, localbitcoins, okcoin, poloniex, wex and yobit. Splits up open order methods for poloniex
* Adds bithumb, okex and zb support. BTCC for another PR
* Updates bitflyer, bithumb, bitmex, coinut, okex and zb cancelAllOrders method to cancel via enabled currency pairs rather than a singular currency
* Adds tests to all exchanges to test wrapper function CancelAllOrders
* Fixes OKEX and huobi, btcmarkets, kraken, okCoin cancel order implementations
* Fixes coinut, hitbtc and okex api for authenticated requests
* Fixes comment and spacing
* Changes the CancelAllOrders signature to return orderids and errors along with a generic error.
* Fixes OKEX delimiter
* Removes spacing and test verbosity
* Removes more spacing
* Removes space
* Fixes okex rebasing issue. Also makes the maps instead of assuming they just work
* Adds some constants for fee types
Adds some fee calculation in an attempt to be generic
Adds fee stuff to Bittrex
Adds fee stuff to bitstamp
* Fixes bitstamp fee calculation
* Tests
Tests all scenarios for GetFeeByType
* Adds method to wrapper
Adds err to response
Checks for err
* Adds support for Bittrex fees
* Adds maker/taker dynamic to fees
Updates tests
Adds bitmex fee support
Removes unused switch case scenarios to not waste space
* Adds bithumb support for fee calculation
* Adds Bitfinex fee support
Adds list of currencies as const strings
Sets up bitflyer
* Fixes arguments
* Greatly expands symbols
Adds Binance fee calculation support
Cleans up previous exchanges
* Fixes errors for fee calculations
* Adds ANX fee support
* Adds btcc fee support
Adds alphapoint fee wrapper support
Renames method to match "enum"
Uses symbols in tests, not inline strings
* Adds support for BTCMarkets fee calculation
Adds new method to retrieve fee amount from BTCMarkets
Adds new fee type struct: FeeBuilder
Updates ANX and BTCMarkets to use new FeeBuilder type struct
Standardises the tests to run when it comes to fee calculation
* Migrates all existing exchange fee to use new feebuilder type struct
Uses standard testing model
* Fixes unit tests
* Updates maker taker fees in test config
* Removes parallel from fee testing
* Removes more parallel from tests
* Adds coinbasepro fee support
* Adds Coinut fee support
* Adds Exmo fee support
Adds maker fee support to coinut
Introduces a type for fees and bank transfers to prevent random strings being used
* Adds partial bitflyer support
Moves bitflyer to feeBuilder struct
* Adds gateio fee support
* Adds Gemini fee support
* Adds hitbtc fee support
* Adds huobi fee support
* Adds HuobiHadax fee support
* Adds itbit fee support
* Adds partial kraken fee support with trading fees
* Finishes basic Kraken fee support
* Adds basic LakeBTC fee support
* Adds basic liqui fee support
* Adds localbitcoins fee support.......
* Adds basic okcoin fee support
* Adds simple OKEX fee support
Adds many new currency symbols
Fixes liqui's fees
* Adds poloniex fee support
* Adds fee support for Yobit
* Adds WEX fee support
* Adds ZB fee support
* Removes bad reference
* Improves accuracy of variable name
* trading fee method names are now consistent
(cherry picked from commit 21c82e8b90cae590cfd73d365d7be39e1a00e973)
* Fixes rebasing issues
* Fixes issues from rebase
Removes "IsTaker" as IsMaker bool can imply taker
Updates tests to actually work.
* Adds a zero to the test
* Fixes bitfinex api endpoints and fixes fee calculations
* Updates btcmarkets trading fee calculation
* Verifies tests with apis for all exchanges except coinbasepro, itbit and bitflyer
Removes taker fee test as taker is default
* Removes redundant all exchange wrapper error checks due to the error checks being redundant
* Addresses review comments:
- Renames variables
- Changes how functions return data
- Fixes typo
* Initial overhaul of websocket connection and feeds
* Added proxy support
* Piped to routines.go
* Added new websocket file in exchanges
Refactored orderbook handling into exchange_websocket.go
Added better error responses for binance_websocket.go
General clean for binance_websocket.go
* General fixes - bitfinex_websocket.go
Refactored orderbook cache code - bitfinex_websocket.go
Removed fatal error with unhandled type - routines.go
* Added general improvements to bitmex_websocket.go
Refactored orderbook handling to exchange_websocket.go
Added variable in Item struct in orderbook.go for looking up orders by ID
* Fix issue when routines are blocked due to Data Handler not started
Updated traffic handler
General fixes for bitstamp_websocket.go
* General fixes for coinbasepro_websocket.go
* General fixes for coinut_websocket.go
Fixed error return in exchange_websocket.go
* Removed comments in coinut_wrapper.go
Refactor orderbook logic from hitbtc_websocket.go to exchange_websocket.go
* General fixes
* Removed comments
General fixes
* Updated routines.go
* After rebase fix
* Fixed update config pairs in okcoin.go
* fixed config currency issue in okcoin.go for okcoin China
* exchange_websocket.go
*Removed unused const dec
*Removed state change routine
*Improved trafficMonitor routine
*Increased verbosity for error returns
*Removed uneeded mutex locks
exchange_websocket_test.go
*Added new tests for websocket and orderbook updating
routines.go
*Removed string cased
* Fixed race conditions on sync.waitgroup in exchanges_websocket.go
* Changes variable name in config.go
* Removes unnecessary comment
* Removes indefinite lock on error return
* Removes unnecessary comment
* Adds support for BTCC websocket
Drops support for BTCC REST
* Rewords comment in exchange_websocket.go
Moves types to poloniex_types.go
* Moves types to coinut_types.go
* Removes uneeded range for accessing array variables for coinbase_websocket.go
Removes comments in coinut_types.go
* Adds verbosity flag to GCT
Suppresses verbose output from routines.go
* Fixes setting proxy for REST and Websocket per exchange
Upgrades error handling
Drops unused *url.Url variable in exchange type
* Adds test for setting proxy
* Fixes bug that closes connection due to incorrect timeout time through a proxy connection
* Clarify verbose flag message