* fix whoops
* const trafficCheckInterval; rm testmain
* y
* fix lint
* bump time check window
* stream: fix intermittant test failures while testing routines and remove code that is not needed.
* spells
* cant do what I did
* protect race due to routine.
* update testURL
* use mock websocket connection instead of test URL's
* linter: fix
* remove url because its throwing errors on CI builds
* connections drop all the time, don't need to worry about not being able to echo back ws data as it can be easily reviewed _test file side.
* remove another superfluous url thats not really set up for this
* spawn overwatch routine when there is no errors, inline checker instead of waiting for a time period, add sleep inline with echo handler as this is really quick and wanted to ensure that latency is handing correctly
* linter: fixerino uperino
* fix ID bug, why I do this, I don't know.
* glorious: panix
* linter: things
* whoops
* dont need to make consecutive Unix() calls
* websocket: fix potential panic on error and no responses and adding waitForResponses
* bybit: enable multiconnection handling across websocket endpoints
* rm debug lines
* bybit: Add websocket trading functionality across all assets
* rm json parser and handle in json package instead
* in favour of json package unmarshalling
* Add bool ConnectionDoesNotRequireSubscriptions so that we don't need to handle dummy sub
* handle pong response
* spelling
* linter: fix
* fix processing issues with tickers
* fix processing issues with tickers
* linter: fix
* linter: fix again
* * change field name OutboundRequestSignature to WrapperDefinedConnectionSignature for agnostic inbound and outbound connections.
* change method name GetOutboundConnection to GetConnection for agnostic inbound and outbound connections.
* drop outbound field map for improved performance just using a range and field check (less complex as well)
* change field name connections to connectionToWrapper for better clarity
* spells and magic and wands
* merge: fixup
* linter: fix
* spelling: fix
* glorious: nits
* comparable check for signature
* mv err var
* rm comment as it does not
* update time fields for orderbook latency
* fix time conversion
* Add func MatchReturnResponses
* glorious: nits and stuff
* lint: fix
* attempt to fix race
* linter: fix
* fix tests
* types/time: strict usage of time type for usage with unix timestamps
* fix tests etc
* Allow match back with order details
* Add time in force values for different order types + extra return information on websocket trading
* glorious: nits
* gk: nits; engine log cleanup
* gk: nits; OCD
* gk: nits; move function change file names
* gk: nits; 🚀
* gk: nits; convert variadic function and message inspection to interface and include a specific function for that handling so as to not need nil on every call
* gk: nits; continued
* gk: engine nits; rm loaded exchange
* gk: nits; drop WebsocketLoginResponse
* stream: Add match method EnsureMatchWithData
* gk: nits; rn Inspect to IsFinal
* gk: nits; rn to MessageFilter
* linter: fix
* gateio: update rate limit definitions (cherry-pick)
* Add test and missing
* Shared REST rate limit definitions with Websocket service, set lookup item to nil for systems that do not require rate limiting; add glorious nit
* integrate rate limits for websocket trading spot
* bybit: split public and private processing to dedicated handler add supporting function and tests
* use correct handler for private inbound connection
* bybit/websocket: allow a shared ID between outbound payloads for inbound matching
* conform to match upstream changes
* standardise names to upstream style
* fix wrapper standards test when sending a auth request through a websocket connection
* whoops
* Update exchanges/gateio/gateio_types.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* linter: fix
* linter: overload
* whoops
* spelling fixes on recent merge
* glorious: nits
* linter: fix?
* glorious: nits
* gk: assert errors touched
* gk: unexport derive functions
* gk: nitssssssss
* fix test
* gk: nitters v1
* gk: http status
* gk/nits: Add getAssetFromFuturesPair
* gk: nits single response when submitting
* gk: new pair with delimiter in tests
* gk: param update slice to slice of pointers
* gk: add asset type in params, includes t.Context() for tests
* linter: fix
* linter: fix
* fix merge whoopsie
* glorious: nits
* gk: nit
* linter: fix
* glorious: nits
* linter/misc: fix and remove meows
* linter: fix
* misc/linter: fix
* change function names
* okx: update requestID gen func without func wrapping
* RM: functions not needed
* Update docs/ADD_NEW_EXCHANGE.md
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* gk: nitsssssss
* linter: fix
* Update exchanges/bybit/bybit_test.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* Update exchanges/bybit/bybit_test.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* gk: nit words
* cranktakular: nits
* websocket: skip connections with subscriptions not required during channel flush
* websocket: simplify error handling in FlushChannels using if short
* linter: fix
* cranktakular: nits and expand coverage
* linter: fix?
* misc fix
* cranktakular: missing nit which I thumbed up but did not do. Sillllllly billlyyyy nilllyyy
* fix comments
* bybit: fix merge regression on websocket message filter
* cranktakular: nits
* bybit: Add global rate limits for websocket
* ai: nits
* linter: fix
* cranktakular: purge DCP ref/handling and add another TODO
* Update exchanges/bybit/bybit_websocket.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* fix test
* fix alignment issue and rm println
* Update exchanges/bybit/bybit_websocket.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/bybit/bybit_websocket.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: fix
* Update exchanges/bybit/bybit_websocket.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* bybit: use connection method for segregated match on multi-connection
* cleanup after master merge
* fix test and config whoops
* cranktakular: nits
* exchange: add missing tests for base method websocket order funcs
* cranktakular: nits and refresh + tests
* cranktakular: pedantic nits
* linter: fixes
* t.Parallel tests
* glorious nit
* Update exchange/websocket/connection.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* gk: nits
* boss king: nits
* canktakular: nits
* Update exchanges/bybit/bybit_websocket.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* Update exchanges/bybit/bybit_websocket_requests.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* Update exchanges/bybit/bybit_websocket_requests.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* Update exchanges/bybit/bybit_websocket_requests.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* Update exchanges/bybit/bybit_websocket_requests.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* gk: nits
* linter: fix
* Update exchanges/bybit/bybit.go
Co-authored-by: Samuael A. <39623015+samuael@users.noreply.github.com>
* Update exchanges/bybit/bybit.go
Co-authored-by: Samuael A. <39623015+samuael@users.noreply.github.com>
* bossking: nits
* gk: much nicer design
* gk: revised naming for consideration
* gk: nits
* gk: nits restrict in configtest.json and not worry about many pairs enabled
* rm log
* linter: fix
* codex: nit
* cranktakular: nits
* Update exchanges/bybit/bybit_websocket_requests.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/bybit/bybit_websocket_requests.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/bybit/bybit_wrapper.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits!
* thrasher: nits
---------
Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
Co-authored-by: Samuael A. <39623015+samuael@users.noreply.github.com>
* Deribit: Switch to string IDs
Switch from int to string IDs so we can use UUID.v7 instead of (the only) local high precision message id implementation
* Deribit: Dedup wsResponse / wsResponse
* Deribit: Use uuid v7 for IDs
This moves away from centralising message ids.
There's no real benefit to moving them to a central generator, since we
can one-line it, and reduce our testing plane and complexity.
And it's more concise for exchanges to say "I'm using this UUID".
* Deribit: Handle errors from StartHeartbeat
* Deribit: Simplify WS ID matching
* Exchanges: Add MessageID function to base
* gateio: Add multi asset websocket support WIP.
* meow
* Add tests and shenanigans
* integrate flushing and for enabling/disabling pairs from rpc shenanigans
* some changes
* linter: fixes strikes again.
* Change name ConnectionAssociation -> ConnectionCandidate for better clarity on purpose. Change connections map to point to candidate to track subscriptions for future dynamic connections holder and drop struct ConnectionDetails.
* Add subscription tests (state functional)
* glorious:nits + proxy handling
* Spelling
* linter: fixerino
* instead of nil, dont do nil.
* clean up nils
* cya nils
* don't need to set URL or check if its running
* stream match update
* update tests
* linter: fix
* glorious: nits + handle context cancellations
* stop ping handler routine leak
* * Fix bug where reader routine on error that is not a disconnection error but websocket frame error or anything really makes the reader routine return and then connection never cycles and the buffer gets filled.
* Handle reconnection via an errors.Is check which is simpler and in that scope allow for quick disconnect reconnect without waiting for connection cycle.
* Dial now uses code from DialContext but just calls context.Background()
* Don't allow reader to return on parse binary response error. Just output error and return a non nil response
* Allow rollback on connect on any error across all connections
* fix shadow jutsu
* glorious/gk: nitters - adds in ws mock server
* linter: fix
* fix deadlock on connection as the previous channel had no reader and would hang connection reader for eternity.
* glorious: whooops
* gk: nits
* Leak issue and edge case
* Websocket: Add SendMessageReturnResponses
* whooooooopsie
* gk: nitssssss
* Update exchanges/stream/stream_match.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* Update exchanges/stream/stream_match_test.go
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
* linter: appease the linter gods
* gk: nits
* gk: drain brain
* started
* more changes before merge match pr
* gateio: still building out
* gateio: finish spot
* fix up tests in gateio
* Add tests for stream package
* rm unused field
* glorious: nits
* rn files, specifically set function names to asset and offload routing to websocket type.
* linter: fix
* Add futures websocket request support
* gateio: integrate with IBOTExchange (cherry pick my nose)
* linter: fix
* glorious: nits
* add counter and update gateio
* fix collision issue
* Update exchanges/stream/websocket.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* add tests
* linter: fix
* After merge
* Add error connection info
* upgrade to upstream merge
* Fix edge case where it does not reconnect made by an already closed connection
* stream coverage
* glorious: nits
* glorious: nits removed asset error handling in stream package
* linter: fix
* rm block
* Add basic readme
* fix asset enabled flush cycle for multi connection
* spella: fix
* linter: fix
* Add glorious suggestions, fix some race thing
* reinstate name before any routine gets spawned
* stop on error in mock tests
* glorious: nits
* Set correct price
* glorious: nits found in CI build
* Add test for drain, bumped wait times as there seems to be something happening on macos CI builds, used context.WithTimeout because its instant.
* mutex across shutdown and connect for protection
* lint: fix
* test time withoffset, reinstate stop
* fix whoops
* const trafficCheckInterval; rm testmain
* y
* fix lint
* bump time check window
* stream: fix intermittant test failures while testing routines and remove code that is not needed.
* spells
* cant do what I did
* protect race due to routine.
* update testURL
* use mock websocket connection instead of test URL's
* linter: fix
* remove url because its throwing errors on CI builds
* connections drop all the time, don't need to worry about not being able to echo back ws data as it can be easily reviewed _test file side.
* remove another superfluous url thats not really set up for this
* spawn overwatch routine when there is no errors, inline checker instead of waiting for a time period, add sleep inline with echo handler as this is really quick and wanted to ensure that latency is handing correctly
* linter: fixerino uperino
* fix ID bug, why I do this, I don't know.
* glorious: panix
* linter: things
* whoops
* dont need to make consecutive Unix() calls
* websocket: fix potential panic on error and no responses and adding waitForResponses
* rm json parser and handle in json package instead
* in favour of json package unmarshalling
* linter: fix
* linter: fix again
* * change field name OutboundRequestSignature to WrapperDefinedConnectionSignature for agnostic inbound and outbound connections.
* change method name GetOutboundConnection to GetConnection for agnostic inbound and outbound connections.
* drop outbound field map for improved performance just using a range and field check (less complex as well)
* change field name connections to connectionToWrapper for better clarity
* spells and magic and wands
* glorious: nits
* comparable check for signature
* mv err var
* glorious: nits and stuff
* attempt to fix race
* glorious: nits
* gk: nits; engine log cleanup
* gk: nits; OCD
* gk: nits; move function change file names
* gk: nits; 🚀
* gk: nits; convert variadic function and message inspection to interface and include a specific function for that handling so as to not need nil on every call
* gk: nits; continued
* gk: engine nits; rm loaded exchange
* gk: nits; drop WebsocketLoginResponse
* stream: Add match method EnsureMatchWithData
* gk: nits; rn Inspect to IsFinal
* gk: nits; rn to MessageFilter
* linter: fix
* gateio: update rate limit definitions (cherry-pick)
* Add test and missing
* Shared REST rate limit definitions with Websocket service, set lookup item to nil for systems that do not require rate limiting; add glorious nit
* integrate rate limits for websocket trading spot
* conform to match upstream changes
* standardise names to upstream style
* fix wrapper standards test when sending a auth request through a websocket connection
* whoops
* Update exchanges/gateio/gateio_types.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* linter: fix
* linter: overload
* whoops
* spelling fixes on recent merge
* glorious: nits
* linter: fix?
* glorious: nits
* gk: assert errors touched
* gk: unexport derive functions
* gk: nitssssssss
* fix test
* gk: nitters v1
* gk: http status
* gk/nits: Add getAssetFromFuturesPair
* gk: nits single response when submitting
* gk: new pair with delimiter in tests
* gk: param update slice to slice of pointers
* gk: add asset type in params, includes t.Context() for tests
* linter: fix
* linter: fix
* fix merge whoopsie
* glorious: nits
* gk: nit
* shift over to websocket package error
* internal/exchange/websocket -> exchange/websocket
* PEAK OCD!
* appease the OCD gods
* thrasher: nits
---------
Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
Co-authored-by: Gareth Kirwan <gbjkirwan@gmail.com>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Websocket: Rename stream package
* Websocket: Rename Websocket to Manager
* Websocket: Replace explicit errs with common.NilGuard
* Websocket: Move websocket_types.go to types.go
* Websocket: Minor field comment and alignment in types
* Webosocket: Rename WebsocketConnection to Connection
* Alphapoint: Make gorilla ws import explicit
Just to avoid confusion with our own packages.
* Websocket: Move stream_match to match
* Websocket: Move websocket_connection to connection
* Websocket: Move websocket.go to manager.go
* Websocket: Break out all subscription methods into subscriptions.go
* Websocket: Move connection type into its file
* Websocket: Remove PositionUpdated
Type is not used anywhere
* Kraken: Use local constant for pong
Was the only use of websocket.Pong and doesn't really feel right to
represent kraken's api resp in one of our packages
* Websocket: Move connection sub-types to connection package
* Websocket: Move manager types into manager
* Websocket: Move ConnectionWrapper into manager
* Websocket: Move websocket_test to manager_test
* Websocket: Privatise connectionWrapper
* Websocket: Remaining types into types.go
These really belong somewhere else mostly, but this will do for now
* Websocket: Tidy up connection method vars
* Gofumpt: Moving package imports around
* Websocket: Rename errDuplicateConnectionSetup
* Websocket: Fix duplicate import of gws
* Websocket: Fix gofumpt -extra
* Websocket: Standardise import of gws across other pkgs
* Kraken: Remove unused sub conf consts
These were replaced by the generic Levels and Depth fields on all subs
* Websocket: Privitise ConnectioWrapper fields
* Websocket: inline single use var WebsocketNotAuthenticatedUsingRest
* Websocket: Move documentation to template
* Bithumb: Assertify TestWsHandleData
Thusfar ExpandTemplates had only been called internally.
All methods consumers might want to get, in this case GetPairFormat,
need to be in the interface we're passing out, otherwise users can't
call them (or things that use them, like ExpandTemplates)
* Subscriptions: Add List.AssetPairs
* Subscriptions: Add Template and QualifiedChannel
These fields separate the concept of what the channel is from the
qualified resource name
* Subscriptions: Add List.SetStates()
* Subscriptions: Add List.QualifiedChannels
* Subscriptions: Rename testsubs.EqualLists
* Binance: Switch to ExpandTemplates
* Binance: Update ConfigTest format
* Subscriptions: Test Coverage improvements
* Subscriptions: Reenterant List.ExpandTemplates
* Subscriptions: Move templates from subscriptions to exchanges
* Binance: Inline subscription template and improvements
* Add in initial handling for quote/base currency deployment requirements
* include client order ID checking
* glorious: suggestions
* spell and fix
* linter/context/test
* rework tests and order side specific requirements
* linter
* mend panic at the disco
* mending more panics at the disco
* anudda fix brudda
* glorious: NITTTTTT BOOOOOMB
* leftover things and stuff
* whoops
* tie in gateio
* glorious: nit fixes life and everything.
* thrasher: nits
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* Websocket: Use ErrSubscribedAlready
instead of errChannelAlreadySubscribed
* Subscriptions: Replace Pair with Pairs
Given that some subscriptions have multiple pairs, support that as the
standard.
* Docs: Update subscriptions in add new exch
* RPC: Update Subscription Pairs
* Linter: Disable testifylint.Len
We deliberately use Equal over Len to avoid spamming the contents of large Slices
* Websocket: Add suffix to state consts
* Binance: Subscription Pairs support
* Bitfinex: Subscription Pairs support
* Bithumb: Subscription Pairs support
* Bitmex: Subscription Pairs support
* Bitstamp: Subscription Pairs support
* BTCMarkets: Subscription Pairs support
* BTSE: Subscription Pairs support
* Coinbase: Subscription Pairs support
* Coinut: Subscription Pairs support
* GateIO: Subscription Pairs support
* Gemini: Subscription Pairs support and improvement
* Hitbtc: Subscription Pairs support
* Huboi: Subscription Pairs support
* Kucoin: Subscription Pairs support
* Okcoin: Subscription Pairs support
* Poloniex: Subscription Pairs support
* Kraken: Add subscription Pairs support
Note: This is a naieve implementation because we want to rebase the
kraken websocket rewrite on top of this
* Bybit: Subscription Pairs support
* Okx: Subscription Pairs support
* Bitmex: Subsription configuration
* Fixes unauthenticated websocket left as CanUseAuth
* Fixes auth subs happening privately
* CoinbasePro: Subscription Configuration
* Consolidate ProductIDs when all subscriptions are for the same list
* Websocket: Log actual sent message when Verbose
* Subscriptions: Improve clarity of which key is which in Match
* Subscriptions: Lint fix for HugeParam
* Subscriptions: Add AddPairs and move keys from test
* Subscriptions: Simplify subscription keys and add key types
* Subscriptions: Add List.GroupPairs Rename sub.AddPairs
* Subscription: Fix ExactKey not matching 0 pairs
* Subscriptions: Remove unused IdentityKey and HasPairKey
* Subscriptions: Fix GetKey test
* Subscriptions: Test coverage improvements
* Websocket: Change State on Add/Remove
* Subscriptions: Improve error context
* Subscriptions: Fix Enable: false subs not ignored
* Bitfinex: Fix WsAuth test failing on DataHandler
DataHandler is eaten by dataMonitor now, so we need to use ToRoutine
* Deribit: Subscription Pairs support
* Websocket: Accept nil lists for checkSubscriptions
If the user passes in a nil (implicitly empty) list, we would not panic.
Therefore the burden of correctness about that data lies with them.
The list of subscriptions is empty, and that's okay, and possibly
convenient
* Websocket: Add context to NilPointer errors
* Subscriptions: Add context to nil errors
* Exchange: Fix error expectations in UnsubToWSChans
* Shift wrapper function GetDefaultConfig to exchange.Base method definition, to ensure set defaults doesn't get called twice and to reduce code
* rm alphapoint bootstrap method as is defined as exchange.Base method
* add tests
* glorious: make it a function and make it IBOTEXCHANGE
---------
Co-authored-by: shazbert <ryan.oharareid@thrasher.io>
* Exchanges: Remove Pair upgrade handling
Now redundant behind #1401. These paths should never be met.
Several legacy coin upgrade paths being deprecated as well: ZUSD and CNY
Expecting any users with bad config from 3+ years ago would have to
reset anyway.
Also: At the time the intention of this was to upgrade the config
format.
However now, instead, it'd mostly serve to reset enabled pairs if
there's a config mistake, which doesn't feel right.
* Kraken: Fix typo in Kraken type struct
* Exchanges: Abstract exchange Start() and Run()
* Exchanges: Add test for abstracted Start
* Exchanges: Move Start to Bootstrap
* Simplify waitgroup usage
* Add call to exchange.Bootstrap to allow overide or supplementation
* Exchanges: Concurrent common bootstap actions
* Gateio: Remove incorrect Run in test
* GateIO: Fix pair dependencies in tests
This ensures that the pairs are initialised no more than needed and
kind-of just-in-time.
Better pattern might be to use a function to get these pairs when we
need them.
* Exchanges: Complete UpdatePairs before ExecLims
If we're going to update pairs, it needs to complete before we check for
limits to avoid errors on old pairs
* Exchanges: Remove Start and Run from tmpl
Since they're replaced by bootstrap now and shouldn't need customisation
normally
* Alphapoint: Move Start to Bootstrap
* GateIO: Fix linter shadow var
* Websockets: Move Subscription to its own package
This allows the small type to be imported from both `config` and from
`stream` without an import cycle, so we don't have to repeat ourselves
* Subs: Renamed Currency to Pair
This was being mis-used through much of the code, and since we're
already touching everything, we might as well fix it
* Websockets: Add Subscription configuration
* Binance: Add subscription configuration
* Kucoin: Subscription configuration
* Simplify GenerateDefaultSubs
* Improve TestGenSubs coverage
* Test Candle Sub generation
* Support Candle intervals
* Full responsibility for formatting Channel name on GenerateDefaultSubs
OR consumer of Subscribe
* Simplify generatePayloads as a result
* Fix test coverage of asset types in processMarketSnapshot
* Exchanges: Abstract ParallelChanOp
* Tests: Generic ws mock instances
* Kucoin: Fix intermittent conflict in test currs
Use isolated test instance for `TestGetOpenInterest`.
`TestGetOpenInterest` would occassionally change pairs before
GenerateDefault Subs.
* adds open interest to exchanges
* ADDS TESTING YEAH
* New endpoints, BTSE, RPCS, cached
* slight design change, begin gateio
You will need to get cached for
each exchange that supports it
* gateio, huobi, rpc
* fix up kraken, cache retrieval
* okx, gateio
* finalising all implementations and tests
* definitely my final ever commit on this
* Well, well, well
* final v2
* quick fix of bug
* test coverage, assert notempty, test helper
Added a new testhelper for currency
management because its very annoying
in a parallel test setting which wastes
so much space otherwise
* minimises REST requests for Open Interest
* types.Number merge misses
* Minimises Kraken REST calls
* len change, value -> pointer receiver
* further fixup
* fixes gateio, batch calculates open interest
* single gateio, lint const fixes
* rejig and more thorough oi for huobi
* formatting expansion
* minor fix for handling expiring contracts
* rm unused Binance strings
* add bybit support, fix bybit issues
* oopsie doopsie, dont look at my whoopsie
* Fix issue, remove feature
* move an irrelevant function for the pr
* mini bybit upgrades
* fixes cli request bug
* adds funding rate implementations and improvements
* merge fixes x1
* lint
* kucoin funding rates func make
* migrate sync-manager to keys
* some kucoin work
* adds some kucoin wrapper funcs
* ehhh, todo
* kucoin position
* start of orders
* adds the kucoin tests yay
* multiplier
* nits, EWS includes order limits
* NotYetImplemented, IsPerp improvements, cleaning
* lint, test fix, huobi time
* fixes issues, improves testing
* fixes linters I WRECKED
* local lint but remote lint, lint, lint, lint
* fixes err
* skip CI
* lint
* Supported rates, binance endpoints
* fixes weird mocktest problems
* no, CZ is invalid
* fixes some new EWS test errors
* all in a days work
* cleanup
* cleanup for real, also stop it binance.json
* minor coverage
* adds gateio to the slurry
* cleanup of types
* verbose verbose verbose verbose verbose verbose
* fixes huobi parsing issue
* fix bybit contract identification
* cleanup
* merge fixes
* addresses many big problems raised by SHAZ
* tracking errors and fixes
* funding rate if avail, fixes currency formatting
* Addresses nits and sneaks in extra fixes
* lint
* minor fixes after rebase
* better contract splitter for currencies like T-USDT
* forgot to add the exchange name like a fool
* merge fixes x1
* kucoin, direction, contract size
* rn direction, fix kucoin time
* WHOOPS
* Update exchanges/kucoin/kucoin_wrapper.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* misdirection
---------
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* init
* surprise train commit
* basic distinctions
* the terms of binance are confusing
* renames and introduction of allocatedMargin
* add new margin funcs
* pulling out wires
* implement proper getposition stuff
* bad coding day
* investigate order manager next
* a broken mess, but a progressing one
* finally completes some usdtmargined stuff
* coinMfutures eludes me
* expand to okx
* imports fix
* completes okx wrapper implementations
* cleans and polishes before rpc implementations
* rpc setup, order manager features, exch features
* more rpc, collateral and margin things
* mini test
* looking at rpc response, expansion of features
* reorganising before the storm
* changing how futures requests work
* cleanup and tests of cli usage
* remove silly client side logic
* cleanup
* collateral package, typo fix, margin err, rpc derive
* uses convert.StringToFloat ONLY ON STRUCTS FROM THIS PR
* fix binance order history bug
* niteroos
* adds new funcs to exchange standards testing
* more post merge fixes
* fix binance
* replace simepletimeformat
* fix for merge
* merge fixes
* micro fixes
* order side now required for leverage
* fix up the rest
* global -> portfolio collateral
* Update exchanges/collateral/collateral_test.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* adds fields and todos
* rm field redundancy
* lint fix oopsie daisy
* fixes panic, expands error and cli explanations (sorry shaz)
* ensures casing is appropriate for underlying
* Adds a shiny TODO
---------
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* initial concept of a nice validation tester for exchanges
* adds some datahandler design
* expand testing
* more tests and fixes
* minor end of day fix for bithumb
* fixes implementation issues
* more test coverage and improvements, but not sure if i should continue
* fix more wrapper implementations
* adds error type, more fixes
* changes signature, fixes implementations
* fixes more wrapper implementations
* one more bit
* more cleanup
* WOW things work?
* lintle 1/1337
* mini bump
* fixes all linting
* neaten
* GetOrderInfo+ asset pair fixes+improvements
* adds new websocket test
* expand ws testing
* fix bug, expand tests, improve implementation
* code coverage of a lot of new codes
* fixes everything
* reverts accidental changes
* minor fixes from reviewing code
* removes Bitfinex cancelBatchOrder implementation
* fixes dumb baby typo for babies
* mini nit fixes
* so many nits to address
* addresses all the nits
* Titlecase
* switcheroo
* removes websocket testing for now
* fix appveyor, minor test fix
* fixes typo, re-kindles killed kode
* skip binance wrapper tests when running CI
* expired context, huobi okx fixes
* kodespull
* fix ordering
* time fix because why not
* fix exmo, others
* hopefully this fixes all of my life's problems
* last thing today
* huobi, more like hypotrophy
* golangci-lint, more like mypooroldknee-splint
* fix huobi times by removing them
* should fix okx currency issues
* blocks the application
* adds last little contingency for pairs
* addresses most nits and new problems
* lovely fixed before seeing why okx sucks
* fixes issues with okx websocket
* the classic receieieivaier
* lintle
* adds test and fixes existing tests
* expands error handling messages during setup
* fixes dumb okx bugs introduced
* quick fix for lint and exmo
* fixes nixes
* fix exmo deposit issue
* lint
* fixes issue with extra asset runs missing
* fix surprise race
* all the lint and merge fixes
* fixes surprise bugs in OKx
* fixes issues with times and chains
* fixing all the merge stuff
* merge fix
* rm logs and a panic potential
* lovely lint lament
* an easy demonstration of scenario, but not of initial purpose
* put it in the bin
* Revert "put it in the bin"
This reverts commit 15c6490f713233d43f10957367fcbf18e3818bdd.
* re-add after immediate error popup
* fix mini poor test design
* okx okay
* merge fixes
* fixes issues discovered in lovely test
* I FORGOT TO COMMIT THIS
* nit fixaroonaboo
* forgoetten test fix
* revert old okx asset intrument work
* fixes
* revert problems I didnt understand. update bybit
* fix merge bugs
* test cleanup
* further improvements
* reshuffle and lint
* rm redundant CI_TEST by rm the CI_TEST field that is redundant
* path fix
* move to its own section, dont run on 32 bit + appveyor
* lint
* fix lbank
* address nits
* let it rip
* fix failing test time range
* niteroo boogaloo
* mod tidy, use common.SimpleTimeFormat
* exchanges/sharedtestvalues: implement new functions to handle test skipping and announcements for standardising.
* exchanges: fin test impl.
* linter: fixes
* exchange_template: fix test
* allocate so it doesn't make a panic at the disco
* glorious: nits
* glorious: nits
* Update exchanges/sharedtestvalues/sharedtestvalues.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/sharedtestvalues/sharedtestvalues.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* linter: fix
* linter: shhhh
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* engine: shutdown and unload exchange when engine is stopped
* linter: fixes
* engine/exchMan: add nil check
* engine/exchanges: add shutdown method to exchanges, rm len check lock not needed, expanded code coverage, address some nits
* exchMan: report all failed shutdowns across exchanges, implement timer and monitoring routines.
* exchMan: improve shutdown sequence and aloc.
* further improvement
* exchman: log from warn to error
* websockconnection: Suppress error return when closure is caused by library
* linter: fix
* fix racies
* add note on why not parallel tests
* glorious: nits
* spelling kween
* thrasher: nits
* engine: change print of setting using reflection, I keep forgetting to implement this so program around forgetfulness
* engine/exchange_management: remove wait group and just rely on intermediary lock
* glorious: nits
* Update common/common.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update main.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* wrapper_coverage/exchanges: cancel context to not send rest requests/ populate context through functions that do rest requests
* linter: fix
* exchange_template: fix test
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* kline: Add builder and testing
* Ideas
* kline: deploy builder functionality across GCT
* exchanges: implement across gct
* exchanges: Add tests and fix implementations before kline package testing and veri.
* kline: Add tests and start to fix ConvertToNewInterval
* kline: fix ConvertToNewInterval add tests
* kline: complete overarching tests now on to exchanges
* kline: finish exchange tests and implement limits
* exchanges: more fixes
* linter: fix
* engine: fix tests
* kraken: fix recent trades and other fixes
* zb: fix tests
* bithumb: fix empty insertion
* kline: refactor/optimize CreateKline function
* kline: remove the mooos!
* kline: prealloc CalculateCandleDateRanges
* linter: fix
* exchanges: prealloc extended
* fix whoopsie
* reverse fix because this is a whoopsie
* okx: fix risidual issues
* linter: fix
* kline: initial nits from @gloriouscode
* kline: rename builder -> request and cascade change
* linter: fix + test
* kline: update forced alignment on start and end times when CreateKlineRequest is called.
* nits: more more more
* NITS: Addressed
* tests: fix race issue
* Update exchanges/kline/request.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* kline: add method AddPadding() to automatically fill in holes in kline.Request functionality and reject if missing data when converting
* kline: Add params start and end to addPadding() to insert blanks in between block
* kline: remove test comment code as it's not needed anymore
* kline: fix lint and test
* kline: sort slice without extra bool check every iteration
* okx: fix issues with timeing and candles and such from niterinos & address typo
* Update exchanges/kline/kline.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: niterinos
* Update exchanges/poloniex/poloniex_wrapper.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits now onto conflicts YAYA!!!
* Update exchanges/exchange_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits again
* thrasher: nitters
* thrasher: niterinos - adds partial flag for incomplete recent candles and fetching.
* kline: rm fmtizzle packageizzle
* glorious: nitters
* glorious: more niterinos
* fix last niterinos
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Adds basic PoC for calculating/retrieving position data
* A very unfortunate day of miscalculations
* Adds position summary and funding rate details to RPC
* Offline funding rate calculations
* More helpers, more stats, refining data, automated retrieval
* Adds new rpc server commands and attempts some organisation
* lower string, lower stress
* Adds ordermanager config. Fleshes outcli. Tracks positions automatically
* Adds new separation for funding payments/rates
* Combines funding rates and payments
* Fun test coverage
* ALL THE TESTS... I hope
* Fixes
* polishes ftx tests. improves perp check. Loops rates
* Final touches before nit attax
* buff 💪
* Stops NotYetImplemented spam with one simple trick!
* Some lovely little niteroos
* linteroo
* Clarifies a couple of errors to help narrow likely end user problems
* Fixes asset type bug, fixes closed position order return, fixes unset status bug
* Fixes order manager handling when no rates are available yet
* Continues on no funding rates instead. Removes err
* Don't show predicted rate if the time is zero
* Addresses scenario with no funding rate payments
* Bug fixes and commentary before updating maps to use *currency.Item
* Adds a pair key type
* Polishes pKey, fixes map order bug
* key is not a property in the event someone changes the base/quote
* Adds improvements to order processing...Breaks it all
* Shakes up the design of things by removing a function
* Fixes issues with order manager positions. Limits update range
* Fixes build issues. Identification of bad tests.
* Merges and fixes features from master and this branch
* buff linter 💪
* re-gen
* proto regen
* Addresses some nits. But not all of them.
* Fixes issue where funding rates weren't returned 🎉
* completes transition futures tracking to map[*currency.Item]map[*currency.Item]
* who did that? not me
* removes redundant check on account of being redundant and unnecessary
* so buf
* addresses nits: duplications, startTime, loops, go tidy, typos
* fixes minor mistakes
* fixes 🍣🐻 changes to int64
* few fixes and add ratelimiter
* adds test
* revert configtest.json changes
* configtest updated
* WIP: adds public endpoint support
* WIP: adds public endpoint support
* adds public endpoint support
* WIP: adds auth. endpoint support
* adds test for auth. endpoint
* fixes
* adds auth. endpoint support
* WIP: ws support
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* WIP
* Testing
* Complete WS spot testing
* adds support for ws events
* minor change
* WIP: adds REST support for CoinMarginedFutures
* Fixes
* WIP: adds REST support for CoinMarginedFutures
* Fixes
* improvement in SPOT REST
* Typo fix
* WIP: add REST support for CMF Account API
* minor fixes
* WIP: add support for CMF conditional orders and few minor fixes
* complete support for CMF conditional orders
* adds support for public CMF endpoint
* adds support for CMF position API
* Complete REST CMF support
* WIP
* Testing REST CMF support
* Testing REST CMF support
* Testing REST CMF support completed
* WIP: add support for UMF
* completed non-auth UMF
* WIP: add support for REST Auth. UMF
* WIP: add support for REST Auth. UMF and some improvements
* WIP
* WIP
* WIP
* completed REST UMF
* renaming
* adds REST support for futures
* add testcases for UMF and some optimizations
* add testcases for futures
* Testing UMF, futures and its changes
* Fixes
* Fixes after testing
* WIP
* WIP
* WIP
* completed ws USDT futures support
* WIP: ws support for futures
* fixes in WS futures
* fixes in WS support
* roll back changes made for WS CMF, USDT and Futures
* fixes
* WIP
* WIP
* fixes
* Steps for new PR
* WIP
* WIP
* WIP
* WIP
* complete PR setup
* fixes for successfully running tests
* update in symbol for futures pair in test file
* WIP
* Fixes in test file and other minor fix
* fix testdata/configtest.json
* reset CONTRIBUTORS file
* review changes
* remove unwanted file
* remove redundant code
* improvisation
* adds comment for exported functions
* remove unwanted TODO and commented code
* fix
* improvisation
* fix
* defined errors
* improvisation
* improvisation
* improvisation
* updates test
* adds comment for exported types
* review changes
* review changes
* fix
* fixes
* Changes for making BYBIT compatible with existing code base
* Test file changes
* Changes for making BYBIT compatible with existing code base
* Changes for making BYBIT compatible with existing code base
* fix lint issues
* fix
* review changes
* review changes
* review changes
* review changes
* review changes
* review changes
* review changes
* review changes
* review changes
* review changes
* WIP
* add test cases for new API's
* minor improvements
* add missing API and their tests
* minor fixes
* add bybitTime
* add bybitTimeSec, bybitTimeMilliSec, bybitTimeNanoSec and necessary support
* fix GetTradeHistory function
* error handling
* test fixes
* add GetServerTime API
* adds GetHistoricCandlesExtended and review changes
* test fixes
* minor fix
* integrating CMF Bybit recent change log
* minor fixes
* adds extractCurrencyPair
* minor fixes
* minor fix
* review changes
* adds variable declaration of error
* review commit
* adds embeddable type in API response for all API and integrate it
* fixes
* adds authentication WS connection
* review changes
* review changes
* compatible changes
* adds asset to GetWithdrawalsHistory
* adds asset_type in rpc.proto
* adds asset argument in gctcli withdrawal request command
* improve error handling in exchange API error
* web socket fix
* review changes
* improvements
* improvements
* minor fix
* review changes
* fixing wrapper issues
* fixes
* fixes
* review changes
* add test cases
* fix for GetActiveOrders
* lint fixes
* fixes in websocket
* adds wrapper testcases
* adds wrapper testcases
* adds wrapper testcases
* fixes
* fix issue with GetHistoricCandlesExtended
* fix merge issues
* improving error reporting
* adds wrapper testcases and a minor fix
* gctrpc changes
* adds test cases
fixes in websocket
* review changes for ws
* review changes in WS
* fix gctrpc
* merge fixes
* review changes
* WIP
* updates pair in configs
* adds new asset USDCMarginedFutures
* adds URL const for USDCMarginedFutures
* adds API support
* minor fixes
* adds kline API
* minor fix
* adds API
* adds API
* adds API
* WIP
* WIP
* WIP
* adds support for USDC auth requests to SendAuthHTTPRequest
* adds SendUSDCAuthHTTPRequest
* run test and fix them
* rollback support added for Auth. USDC request inside SendAuthHTTPRequest
* adds API and test cases
* adds API and test cases
* adds APIs and test cases
* adds APIs
* adds rate limit for USDC
* adds USDCMarginedFutures to wrapper
* adds USDC testcases in wrapper and fix few issues
* minor test fixes
* minor test fixes
* fix lint issues
* WIP
* Merge changes
* minor fixes
* remove "else" and optimize
* review changes
* review changes
* review changes
* fix lint issue
* merge fix
* fix test
* fix templates and run them
* changes after merge
* review changes and improvements
* code improvement
* fixes with respect to changes in API response in documentation
* fixed review change in test
* adds check in CancelExistingOrder
* update exchange template
* review changes
* adds GetDepositAddress API
* WIP: adds GetOrderHistory
* complete GetOrderHistory
* fixes
* adds test case
* fixes and add WithdrawFund API
* WIP
* WIP
* updating all SendAuthHTTPRequest call
* adds WithdrawCryptocurrencyFunds
* update test cases
* fix lint issues
* fixes after merge
* adds GetAvailableTransferChains and few fixes
* minor fix in GetDepositAddress
* minor fix with WS ping/pong handling
* add ping handler for WS Auth.
* fix typo mistake
* update doc
* Adds lending rates/borrows to FTX and the command
* Movements, renames, rpc test
* Fleshing out rpc response
* Allows rpcserver to calculate offline (but not gctcli). Expands tests
* rn structs. add exchange_wrapper_issues support
* Adds a nice yearly rate
* Surprise yearly borrow rate!
* Rn+Mv to margin package. Fixes some serious whoopsies
* Adds average lend/borrow rates instead of sum
* rm oopsie whoopsie
* This is what the linter was having an issue with
* re-gen
* lintl
* niteroos
* orders: deprecate SubmitResponse return and change to *order.Detail construct detail from order.Submit struct
* orders: add coverage, fix tests
* coinut: rm test for checking
* orders: revert change for return and change field ID to a more explicit name OrderID
* orders: Add method to see if the order was placed
* order: change field name in Cancel type to be more explicit
* orders: standardize field -> OrderID
* backtester: populate change
* orders: add test
* gctscript: fix field name
* linter: fix issues
* linter: more fixes
* linter: forever
* exchanges_tests: populate order.Submit field exchange name
* Update exchanges/order/order_types.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/order/orders.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* glorious: nits
* thrasher: nits
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* orders: Add derive modify struct method to order.Detail and then subsequent method to derive and standardize response details
* exchanges: call modify method in wrappers
* linter: fixes
* engine/wsroutineman: remove print summary
* glorious: nits, removed modifyOrder functionality for Bithumb. There are not docs to support this.
* Update exchanges/order/orders.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* orders: add method to Limit to retrieve order execution limit snapshots
* currency/btcmarkets: add error and update field name to standard
* linter: fix
* limts: don't return pointer
* limit: Add notes
* glorious: nits
* linter: fix
* limit: reinstate nil check
* exchanges: change field names to be more consistent (@thrasher-) suggestion
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* exchange/wrapper: expose GetCredentials func to IBotInterface
* exchanges: split up GetAuthenticatedAPISupport into specific function calls, organize IBotExchange functionality getter functions
* interface: change name - RPCSercer: rm GetBase func call.
* glorious: nits (fix panic)
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* implements futures functions and GRPC functions on new branch
* lint and test fixes
* Fix uneven split pnl. Adds collateral weight test. docs. New clear func
* Test protection if someone has zero collateral
* Uses string instead of double for accuracy
* Fixes old code panic
* context, match, docs
* Addresses Shazniterinos, var names, expanded tests
* Returns subaccount name, provides USD values when offlinecalc
* Fixes oopsie
* Fixes cool bug which allowed made up subaccount results
* Subaccount override on FTX, subaccount results for collateral
* Strenghten collateral account info checks. Improve FTX test
* English is my first language
* Fixes oopsies
* Fixes for unrealised PNL & collateral rendering
* Fixes lint and tests
* Shaznit fixes
* Secret Shaznit
* Updates account information across wrappers to include more fields
* Updates online collateral calculations. Updates RPC data
* Accurately calculates collateral offline and online minus testing
* Tests and lint chocolate
* Simplifies accountinfo results
* Fixes shaznits
* Adds new func
* Increases collateral accuracy again again again x 200
* Increases accuracy of collateral rendering
* Fixes minor merge/test issues
* Linterino
* Fixes ws test. Improves collateral calculations and rendering
* Make it prettier
* Removes the lock I put on 👀
* Adds `additional_collateral_used` field, renders orig currency
* Fixes unrelated test
* Fix test
* Correctly calculate spot margin borrow collateral
* Address fun lint surprise
See https://github.com/golangci/golangci-lint/issues/741#issuecomment-1017014331
* Strange lint fixing x2
* Continued lint journey
* Nolint the nolint to not lint the lint
* Adds two new fields to response
* More linting issues arising
* fIX3s_c4s|NG
* Fixes command flags' incorrect numbering
* FairMarket = Won
* backtester/request: trying to fix panic (WIP)
* request: fix race for transport layer
* request: linter issue fix
* request: more linter issues
* requester: Add function to remove the tracking of underlying http client and add to engine unload exchange.
* request: add more context to error return
* request: Fix after cherry pick issues
* request: fix niterinos
* exchanges: change return to package variable
* request: changed named
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* cmd/tools/exchange: fix regression and implement reflection so as this can dynamically scale to our interface
* exchanges: add comment and fix whoopsie
* exchanges: fix linter issues
* wrapper_cov_tool: add actual full interface method count to get a better perceived deployment
* exchanges/tool: addr glorious nits
* kraken: remove string in test
* exchange_template_tool: fix tmpl issue
* gct: phase one context awareness pass
* exchanges: context propagation pass
* common/requester: force context requirement
* gctcli/exchanges: linter fix
* rpcserver: fix test using dummy rpc server
* backtester: fix comments
* grpc: add correct cancel and timeout for commands
* rpcserver_test: add comment on dummy server
* common: deprecated SendHTTPGetRequest
* linter: fix
* linter: turn on no context check
* apichecker: fix context linter issue
* binance: use param context
* common: remove checks as this gets executed before main
* common: change mutex to RW as clients can be used by multiple go routines.
* common: remove init and JIT default client. Unexport global variables and add protection.
* common: Add comments
* bithumb: after dinner mints fix
* exchanges: add an UpdateTickers method to the main exchange interface
This method will fetch all currency pair tickers of a given asset type
and update them internally, does nothing for now.
* exchanges: refactor UpdateTicker on all exchanges
Keep the exact previous behaviour but implement the UpdateTickers
method and refactor UpdateTicker by using it where applicable.
* sync_manager: update all tickers when batching is enabled
* binance: UpdateTicker to fetch single ticker symbol
* ftx: UpdateTicker to fetch single ticker symbol
* gctcli: modifyorder stubs
* gctcli: add ModifyOrderRequest and ModifyOrderResponse in rpc.proto
* gctcli: regenerate rpc.pb.go after the addition of ModifyOrder structs
* gctrpc: add ModifyOrder() and regenerate dependent files
* gctcli: modifyorder command now uses newly generated ModifyOrder() RPC
* exchanges/order/orders.go: use time.Time.Equal() instead of ==
* gctrpc: update ModifyOrderRequest and ModifyResponse and regenerate gRPC
* gctcli/commands: rework modifyorder
* engine: implement RPCServer.ModifyOrder
* engine: commit an initial version OrderManager.Modify(), still does not update state of managed orders
* engine: OrderManager.Modify now updates the inner state of managed orders, but introduces race conditions, needs fixes
* engine/order_manager.go: comply with golangci-lint
* gctcli: fix getOrderCommand.ArgsUsage
* gctcli: fix getModifyOrderCommand args and ArgsUsage
* engine: OrderManager.Modify() now correctly updates price of modified order
* engine: RPCServer.ModifyOrder now uses checkParams() as advised
* exchanges: (1) IBotExchange.ModifyOrder now returns a Modify struct, (2) all exchanges are updated to comply with that change
* exchanges/order: Detail.UpdateOrderFromModify also updates the ID
* engine/order_manager: add store.modifyExisting() and use it in OrderManager.Modify to update (on success) the state of the modified order
* exchanges: Bitfinex.ModifyOrder() now returns the ID in case of an error
* engine: OrdetManager.Modify() now emits an order event
* exchanges/bithumb: proper order.payment_currency key
* engine/order_manager: populate more Modify fields as they are needed by (some) exchanges, add comments
* engine: test OrderManager.Modify()
* engine: test store.modifyExisting()
* engine: write a docstring for store.modifyExisting
* engine: OrderManager.Modify() now also sets Modify.Price and Modify.Amount in case of zero values
* engine: TestOrderManager_Modify() now verify the effects of price and/or amount set to 0
* engine: OrderManger.Modify() now uses the commsManager to let observers know of errors
* engine: TestOrderManager_Modify() uses t.Fatal()
* engine: TestOrderManager_Modify() and TestStore_modifyOrder() supply t.Error() with proper messages
* exchanges/order_manager_test: fix a golangci-lint complaint
* engine/order_manager: fix an error comparison bug and simplify
* gctcli/commands: check if either price or amount is set, otherwise we would waste an API call