* Updates websocket URL
* Minor test changes, URL changes too
* verbosity purposity prepostery
* Fixes issue where websocket data passed through the round trip was invalid
* Adds a test protection
* fix the return problem
* fix the return problem
* add the mandatory parameter
* fix the symbol empity problem
* fix the symbol empty problem
* add Pair parameter for order.Cancel parameters
* follow the gofmt rule
Co-authored-by: MK <mk@MKdeMacBook-Pro.local>
* fix 440: SubmitOrder and CB-ACCESS-TIMESTAMP value
* removed gctcli executable and added it to gitignore
* implemented GetOrderInfo
* getOrder also has trades attached to an order
* getOrder also has trades attached to an order
* fix 440: SubmitOrder and CB-ACCESS-TIMESTAMP value
* removed gctcli executable and added it to gitignore
* fix 440: SubmitOrder and CB-ACCESS-TIMESTAMP value
* removed gctcli executable and added it to gitignore
* minor
* go lint fixes
* removed clutter
* fixed Amount, Executed Amount, Remaining Amount
* removed default value declarations
* removed useless nil chceck
* iteration rewritten go style from java style
* returning error if GetFills fails
* returning error if GetOrderInfo fails
* ExecutedAmont value is FilledSize
* added TODO to fix asset type
* chnages after merging #446
* range without copy value, using index
* removed useless slice initialisation
* couple of nits from code review
* fix indentation
* Update rpc.proto
Fixes indentation
Co-authored-by: Adrian Gallagher <thrasher@addictionsoftware.com>
* Initial changes, removing exchange name as an arg and puts it in the pointer struct. Adds case to ws routines
* Adds CancelAllOrders func, adds GetByExchangeAndID. Adds modify handler in routines.go
* initial poor attempts to have bitmex work with new datahandler handlers. fixes ordersides
* bitmex Completes new order
* Better bitmex handling, but not complete. Begins a gargantuan task of unifying order data structs. Sometimes an order update will contain lot's of information, so its best to be able to update all fields of our orders, rather than just an arbitrary subset. As a result, everything will be broken for the foreseeable future :glitch_crab:
* Removes old order handler which did nothing. Updates order properties for everything everywhere - now consistent. Changes order status. Adds asset type and wallet address to all order types
* Adds order updater to update only relevant fields since the object is generic, we don't know what fields are passed from what exchanges. Adds "lastupdated" field to order.Detail. Expands order cancellation for engine orders.
* Ensures that new orders are added to the ordermanager's order store. Saaa many comments. Internalises orderStore get func. Adds internalOrderID to orderdetail and adds websocket support for it
* Fixes a cancelAllOrders oopsie doopsie
* Adds potential func to update orderdetails from an orderdetail struct. Unsure if will keep.
* Begins btcmarkets implementation. Expands order "stringToOrder" funcs to allow for some more flexible string coversions. Removes order.Submit via websocket as it would cause unlimited order place issues :D
* Finishes btc markets without testing
* Adds untested ws auth func to btse
* Finises btse, fixes btcmarkets bug
* Adds coinbasepro support
* Fixes a few more fields in coinbase pro and readds the extra subs
* Begins work on coinbene. Plus theyve added a new ws connection yeee
* Wasted a bunch of time adding support to an additional websocket that isn't needed ;_; Fixed a bug in coinbasepro. Fully kitted out coinbene support. Updates order types with all fields
* Removes extra websocket connection ;_;
* Finishes gemini. Fixes order side unknown
* Adds okgroup support. Moves byte reading to another function to allow for unit testing. Updates routines to use pointers. Updates date update handling for order details
* Finishes order data for okgroup websocket, but starts the STRANGE process of converting all other websocket endpoints to be a little less silly
* Cleans up okroup websocket implementation. Fixes bug in Gemini
* Adds poloniex support. Updates ws order handling
* new bitmex support. Adds some tests now that its all in its own func. Fixes poloniex bug
* Begins work on authenticated binance websocket
* Attempts to track user data via binance websocket
* Maybe finishes Binance websocket support
* Begins adding test coverage to orders.go. Updates names of script properties to match updated
* Begins an experiment with code coverage. Fixes more rebase issues
* Completes orders coverage. Botches a few other things though. Fixes more scripting stuff
* All tests in engine package pass
* Adds some loevely routine tests
* Moves ordermanager to test Bot ordermanager
Adds lovely routine tests to ensure things that get sent to be handled the data handler are handled by the data handler by handling them
* Replaces "wsHandleData" with "wsReadData" as that's what its going to do now.
* Splits all wsHandleData into wsReadData and wsHandleData to allow for easy testing via sending []byte json examples to test proper functionality. Breaks so many tests
* Fixes majority of test issues. But data races which are tough on the engine package
* "Fixes" test by removing shutdown test. It interferes with too many things. Requires some thought
* Tests all the binance websocket points
* Adds better bitfinex websocket support.
* Adds testing for bitfinex, bitstamp and btcmarkets. Fixes websocket bugs encountered
* Adds BTSE ws tests. Fixes bugs in ws
* Adds coinbase pro tests. Fixes any issues
* Coinbene tests
* Starts to handle coinut. Runs into a problem conceptually regarding websocket roundtrip and orders. Both events need to happen without impacting eachother/racing
* Addresses a data race issue regarding websocket and bot order management submission - order submission locks at an earlier point to prevent routines.go from creating an order before order submission creates it. Updates rpcserver to use order management bot to submit orders.
* Finishes the hectic coinut testing
* Adds tests for gateio
* Fixes rebase issues. Updates tests to work without being overloaded
* Begins testing of gemini. fixes up minor issues
* ginishes gemini tests and fixes
* Adds hitbtc tests. Fixes all the many issues with hitbtc websocket
* Adds remaining tests. Increases default test channel limit again
* Begins work towards huobi tests
* Finishes huobi tests
* Fixed all mythical rebase adventures
* Begins kraken transformation
* Finishes kraken. Fixes coinbene leverage now that its changed
* Begins okgroup testing
* Adds okgroup ws tests
* Does some poloniex
* Fixes basic curreny issue by extracting to func
* Begins redesign of poloniex websocket datahandling. Completes authenticated handling, now onto unauth
* Finishes poloniex revision
* Finishes ZB additions
* Fixes data races
* Fixes rebase issues. Fixes bad kraken logic
* Fixes after reviewing code
* lint everywhere
* Fixes lingering lints
* lint
* Adds test coverage to order detail and modify updating
* Fixes linting
* Fixes huge int, fixes date tests
* Adds GetByExchange, adds test for it. Protects fakepass echange. Renames DisplayQty to DisplayQuantity. Removes verbose. Adds some websocket properties. Updates bitmex asset type in test
* Addresses timestamps, type abbreviations, verbosity. Expands binance kline switch cases. Updates some websocket capabilities.
* Adds coverage to the stringToOrderType/Status functions introduced in PR
* Minor fixes addressing some time, error text and use of StringDataCompareInsensitive
* Introduces shiny new system which checks if there is an awaiting ID, if found, processes via wrapper method, else, goes through wsHandleData method. Removes weird locking system from wrapper/websocket data race. Updates bitfinex to properly handle websocket order requests and notifications
* Moves fakePassingExchange to test_helper. Fixes some order side implementations for trades. Botches a new error type
* Adds new error type to track and handle order classification errors separately
* Fully fleshes out ClassificationError for all instances of status conversion. Even in order trades and some wrapper functions
* Introduces common.SimpleTimeFormat for "2006-01-02 15:04:05". Fixes binance and bitfinex issues with auth endpoint use, map casting. Expands more order.ClassificationError usage. Fixes some more generic websocket response errors
* Future proofs order updating by utilising asset types. Expands testing to accomodate. Adds shiny new time type. Expands wrapper websocket functionality definitions
* minty linty
* Broken end of day code addressing basic nits on comments, returns and currency conversion
* Adds testing to btcmarkets websocket. Also updates websocket orderbook to use update instead
* Fixes fun rebase fun fun so fun
* Addresses minor nits regarding changed interface and comments
* Creates new function `GetRequestFormattedPairAndAssetType` to retrieve a currency pair and asset type based on a string. It will iterate over enabled pairs and compare them to formatted pairs and then return that pair if found.
* Fixes test
* Adds a single line to the end of the file, because that would be really bad if it wasn't there
* Updates fakepassexchange to not use params, updates test params, uses fatal in some tests where its important, updates order manager to have a rwmutex, removes some returns, improves ws key test for binance, updates properties to reflect their actual values, adds some more websocket properties
* Addresses binance switch linting
* Updates leverage property to int64
* Fixes what was broken
* reworked request struct and exchange response started work on validation system
* removed import cycle until work around
* Added intial withdraw support via CLI added
* Added Crypto command to gctcli
* moved var declartion to single line
* Test updates for binance and anx
* All exchange tests have been updated test coverage added to validate
* First pass at adding withdrawl select from database
* started adding basic lru cache system
* Added basic LRU cache including Add Get Remove Contains ContainsOrAdd Clear
* wording changes on comments
* removed exported var's in strut as they are not required
* Added README
* README updates
* corrected ID on commands
* rm line :D
* merged in origin/cache
* linter fixes (gofmt)
* Added basic cache lookup to events
* swapped to mutex over rwmutex updated comments
* unexported getNewest & getOldest
* unexported getNewest & getOldest
* Updated comments and cited references in source
* updated comments
* WIP
* Migrated exchange WithdrawFiat wrapper to new struct response
* Migrated exchange WithdrawFiat wrapper to new struct response
* started work on bank management
* Added exchange level banking details back with migration to banking package
* Removed broken tests for now
* Added validation to bank accounts
* removed duplicate bank details from withdraw struct
* Test coverage increased
* gofmt
* merged upstream/master with clean up
* First pass at adding command line linking to gctcli
* added validation for crypto address, added gctcli support to retreive previous withdrawal requests
* general cleanup
* general cleanup
* reordered imports
* Increased test coverage moved to database sublogger
* Pass incorrect currency no longer return error from c.CheckBankAccountConfig
* remove TestMain() for now as other tests in this package will need to be reworked
* Happy little race car
* Reverted to upstream tests
* Added test covarege for validation method, corrected response on cli protobuf
* query clean up and removal of duplicated code
* cleaned up queries into singlem ethod increased test coverage
* Migrated international fund withdraw to new exchange response and added cache size override
* Migrated international fund withdraw to new exchange response and added cache size override
* Extended gctcli commands
* lowered default cache to 25
* small code clean up
* added get by date method
* add returned error
* cli commands cleaing return error on nil results to fix out of bounds
* merged write & read helpers into one for test coverage and increased engine/withdraw test coverage
* gofmt
* Added test coverage for valid ID
* removed unused param
* converted to use timestamp package from protobuf
* gofmt
* use built in RFC3339 timestamp
* remove setting of CreatedAt & UpdatedAt and allow ORm to take care of it
* also use ptype on byid
* code flow improvements
* remove inverse conditional check and linters run
* removed test data
* removed comment
* removed comment
* also write failures to database for auditing
* converted to use default time for start & end
* Default to time.Now() minus 30 days
* Default to time.Now() minus 30 days
* small code clean up
* fixed missing semicolon on migrations, code clean up
* updated sqlite migrations
* Added additonal check for exchange level bank account if global is not found
* case sensativity fix for currency names
* use correct compare
* test coverage fixed
* removed space
* return pointer to banking.Account
* return pointer to banking.Account
* added else check back to validate()
* Added empty string as default to migration over NULL due to retrivial of data
* Improved test setup for logger, improved test coverage for database
* removed some new lines
* add new line
* removed database config detailS
* removed lines
* code cleanup
* renamed package to log to stop side import requirement
* reverted comment changes
* reverted comment changes
* one more reverting wording back to logger
* wording changes on comments
* 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
* Add exchange manager to engine
* Several improvements for engine and friends
1) New file.Exists func
2) gRPC TLS cert expiration date check and regeneration
3) New donation var for use across the codebase
4) Use Go log package until the logger is initialised
* Add cert tests and create dir tree if it doesn't exist for file.Write
* Link up donation address to documentation tool plus minor adjustments
* Fix remaining donation addrs
* Move non-needed reload exchange funcs
* Revert accidental config_example.json changes 🕯️
* Use go logger for logging until the logger has initiliased, otherwise no output will be seen
* Link up portfolio delay val and other fixes
* Run go mod tidy after dependabot PR
* Address nitterinos
* Bittrex GetDepositHistory method return new DepositHistory struct type
* Id field of DepositHistory type changed to int64
* check exchange (exist and enabled) before calling methods on, to avoid program crashes
* Update bittrex_types.go
* t2
* Program always uses the DefaultSyncerTimeout because c.SyncTimeout in engine/syncer.go newer set in code
* gofmt file
Co-authored-by: Ryan O'Hara-Reid <oharareid.ryan@gmail.com>
* Initial rework of rework of requester - WIP
* Implementing and checking rate limits - WIP
* implemented coinbene rate limiting shenanigans
* add in remaining WIP
* fixy
* use authenticated rate limit
* drop ceiling as this can be done with a counter later
* add functionality to struct
* purge config options for rate limiting so as to keep things minimal
* prepare futures and swap rate limiting for implementation
* Address linter issues
* Addressed nits, fixed race
* fix linter issue
* remove global var as this was only setting when newrequester was called
* moved rate limit functionality into its own file
* Update Bitfinex with correct rate limit and test endpoints (WIP)
* finish off bitfinex adjustments
* fixes
* fix linter issues
* slowed rate for coinbasepro
* drop rate limit for huobi as the doc times have intermittent 429 issues.
* Set MACOSX_DEPLOYMENT_TARGET to remove linking warning
* Addr Thrasher nits
* Addr glorious nits
* unexport do request function
* fixed nitorinos
* Fixed something I missed
* move disabled rate limiter into loadexchange and use interface functionality
* Add temp quick fix
* expose auth validator functionality for wrapper
* Add REST validation after keys set, package account types for future syncing
* Add transient error checking for initial creddemtial validation
* fix command types
* Addressed nits from glorious person
* Amalgamate body within error when not between 2xx status, added btcmarket specific auth error check
* nit fix for glorious person
* Format fix
* removed unused code
* check transient first then validate if its an exchange specific authentication error, all others will be disregarded
* Addressed glorious nits
* Addressed glorious nits
* Moved account processing to updateaccountinfo func and added in fetch account info
* Add GRPC Account streaming (NOTE: could not complete until sync item added)
* RM exchange check
* Address xtda nits
* RM comment code
* Fix linter issues
* used most recent protoc version
* lbank linter issues fixed
* Addressed nits and changed len check to range in for loops
* Fixed timeout issue
* thrasher nits addressed
* add string holdings
* 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
* GCTCLI param and linter fixes
* Linter fixes
* Add more basic validation and address codelingo nits
* Add arg number support to cancelOrder and more validity checks
* initial wiring to providegethistoricalcandles
* initial wiring to providegethistoricalcandles
* initial wiring to providegethistoricalcandles
* gethistriccandles work from cli using hard coded inputs
* gethistoriccandles RPC service and CLI working fine for coinbasepro
* fixed unit test
* input check on grpc for gethistoriccandles
* updated deps
* fixed the return value when a method is not yet implemented
* code review: fixed CLI input check and int32->int64
* code review: handling wrong exchange name
* added check on granularity and allowing start and end being empty
* code review: removed currency2
* code review: dependency reverted
* improved func comment
* typo in func comment
* get historic values tests
* unit tests for get historical rates on coinbasepro
* using time format time.RFC3339
* names to camel case and improved comments
* test cleanup
* changed to camel case
* added InArray tests
* dropped not needed string time
* enforced use of int64
* fixed make check
* cleaned up code organisation to be consistent
* fixed Travis remarks
* more Travis remarks
* added comments
* regenerated proto files after merge
* linter fix