* 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
* 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
* 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
* Subscribe/Unsubscribe methods added
* migration to v3
* removed orderbook from rest
* WsUpdateOrderbook updated to reflect changes to v2
* Added comment for exported func
* removed logging
* unexported structs that are not used globally moved seed to own function
* unexported functions not used outside package
* Support reconnection message from bitstamp
* moved from range key/val
* using ticket.Spot instead of string
* Seperated out WsReadData & WsHandleData to allow for better testing of websocket messages
* ah should continue to next iteration and not break execution on json decode
* code formatting clean up
* reworded connection message
* return out of method instead of just breaking loop
* formatting changes and replaced SPOT with ticket.Spot type
* Fixes issue where first if statement always gets hit
* fmtimport
* Slightly more granular checks for keys, secret keys and clientids
* Moves log warn and removes extra checks
* fix balance responce
* Fixed OrderHistory unmarshalling on the GateIo
* fix int convertation in the GetOrderHistory function
* fix issue on order submit : Binance exchange raw response: {"code":-1102,"msg":"Mandatory parameter 'timeInForce' was not sent, was empty/null, or malformed."}
* Okgroup: fix issue on empty notional GetSpotOrderResponse
* Okgroup: fix issue with empty order status. order start is required for orderHistory request
* HUOBU: fix order currency mapping in GetActiveOrders method
* OKGroup: fix currency name on GetAccountInfo
* ZB: fixed wrong error code on order send method
* OKGroup: add missing fields to GetActiveOrders mapping
* huobi: add missing fields to GetActiveOrders/GetOrderHistory response mapping
* gateio: add order status field to GetActiveOrders response
* gateio: fix orderId on SubmitOrder response
* - poloniex: fix 422 on private API call
- poloniex: fix empty order history
* - poloniex: fix 422 on private API call (revert)
* GateIo: Fix unmarshalling issue
* Huobi: removing redundant breaks
* Huobi: fix rangeValCopy in GetActiveOrders/GetOrderHistory methods
* - poloniex: fix 422 on private API call
* Revert "- poloniex: fix 422 on private API call"
This reverts commit 4748227a
Took 39 minutes
* Replace nonce increment with mutex to atomic incrementation
Took 20 minutes
* Fix ZB order unmarshaling
Took 6 minutes
* Fix CancelSpotOrderResponse unmarshaling on OKGroup
Took 2 minutes
* fix OrderDate on huobi
Took 3 minutes
* fix OrderDate on binance
Took 1 minute
* fix OrderDate on huobihadax
Took 24 minutes
* Improves okgroup and kraken websocket tests so there is less overhead required
* Fixes declaration shadowing
* Fixes duplication
* Switches error to fatal for wsconnection problems in test.
* 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