* 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>
* exchanges: Add function to get standard config
* exchanges: add tests (cherry-pick here and above)
* after pick stuff
* cleanup
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* SubmitOrder- order.Buy replaced with IsLong
Progresses #1270
* Btcmarkets: order.Buy and order.Sell changed to order.Bid and order.Ask
* Bithumb: SubmitOrder- order.Buy replaced with IsLong
Progresses #1270
* Binanceus: SubmitOrder- order.Buy replaced with IsLong
Progresses #1720
* Bistamp: SubmitOrder- order.Buy replaced with IsLong
Progresses #1270
* Bitfinex: Changed order Side to IsLong
* Binance:switch added to SubmitOrder
* Binance: Replaced Buy and Sell in SubmitOrder with IsLong and IsShort
* Binance:SubmitOrder if statement for order side simplified
* 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
* Adding Public Endpoints and test functions
* Adding public endpoints and test functions
* Adding private spot endpoints
* Adding private endpoints and corresponding tests for margin
* Adding Margin Private endpoints
* Adding cross margin and flash swap endpoints
* Adding futures private endpoints
* Adding futures private endpoints and corresponding tests
* Adding Options and SubAccount endpoints and their unit tests
* Adding Wrapper functions
* Complete wrapper functions and corresponding unit test functions
* Fixing wrapper issues and adding websocket functions
* Update of Spot websocket and adding futures websocket handlers
* completed futures WS push data endpoints
* Completed Options websocket endpoints
* Adding websocket support for delivery futures and slight update on endpoint funcs
* Added Delivery websocket support and fix linter issues
* Update on Unit tests
* fix slight currency format error
* Fix slight endpoint tempos
* Update on conditional statements and unit tests issues
* fixing slight tempos
* Slight model and websocket data push method change
* Fix unit test tempos and updating models
* Fix on code structures and update on unit tests
* Slight code fix
* Remove print statements
* Update on tradable pairs fetch eps
* Fix websocket tempos
* Adding types to websocket routine manager
* Fix slight issues
* Slight fixes
* Updating wrapper funcs and models
* Slight update
* Update on test
* Update on tradable pairs
* update conditional statements
* Fixing slight issues
* Updating unit tests
* Minor fixes depending review comments
* Remove redundant method declaration
* Adding missing intervals
* Updating fetch tradable pairs
* update tradable pairs issues
* Addressing small tempos
* Slight fix on ticker
* Minor Fixes
* Minor review comment fixes
* Unit test and minor code updates
* Slight code updates
* Minor updates depending review comments
* Fixes
* Updating incoming message matcher
* Fix missing merge issue
* Fix minor wrapper issues
* Updating ratelimit and other issues
* Updating endpoint models and adding missing eps
* Update on code structure and models
* Minor codespell fixes
* Minor update on models
* fix unit test panic
* Minor race fix
* Fix issues in generating signature and unit tests
* Minor update on wrapper and unit tests
* Minor fix on wrapper
* Mini linter issues fix
* Minor fix
* endpoint fixes and slight update
* Minor fixes
* Updating exchange functions and unit tests
* Unit test and wrapper updates
* Remove options candlestick support
* Minor unit test and wrapper fix
* Unit test update
* minor fix on unit test and wrapper
* endpoints constants name change
* Add minor wrapper issues
* endpoint constants update
* endpoint url updates
* Updating subscriptions
* fixing dual mode endpoint methods
* minor fix
* rm small tempo
* Update on websocket orderbook handling
* Orderbook and currency pair update
* fix linter and test issues
* minor helper function update
* Fix wrapper coverage and wrapper issues
* delete unused variables
* Minor fix on ReadData() call
* separating websocket handlers
* separating websocket handlers
* Minor fix on enabled pair
* minor fix
* check instrument availability in spot
* create a separate subscriber for sake of multiple websocket connection
* linter fix
* minor websocket and gateio endpoints fix
* fix nil pointer exception
* minor fixes
* spelling fix decerializes -> deserializes
* fix Bitfinex unit test issues
* minor unknown currency pair labling fix
* minor currency pair handling fix
* slight update on GetDepositAddress wrapper unit test
* setting max request job to 200
* fixing numerical and timestamp type convert
* fix value overflow error
* change method of parsing orderbook price
* unifying timestamp conversion types to gateioTime
---------
Co-authored-by: Samuael Adnew <samuaelad@Samuaels-MacBook-Air.local>
* 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>
* exchanges: add setTimeWindow boolean to GetKlineRequest params to differentiate between a set time period return from endpoint.
* glorious: nits
* exchange: conjugation
* Update exchanges/exchange.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits and an assortment of differences
* exchanges: remove some comments
* glorious: nits
* cleanup
* tests: fix
* Update exchanges/hitbtc/hitbtc_wrapper.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/kline/kline.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update exchanges/kline/kline_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* kline: fix test
* rm unused variables
* almost: nits
* glorious: nits
* linter: fix
* rm unused variable
* Refactored comment in the okex tests to ensure that it accurately reflects the variable name and the issue related to the time window, as requested by GloriousCode. The previous comment did not align with the identifier assigned to the property, which could cause confusion and misunderstanding among other programmers or stakeholders. The updated comment will improve the clarity and readability of the codebase and make it easier to understand the intended purpose of the associated variables. The change was made with the aim of improving the overall quality and maintainability of the code.
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* 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>
* common: adjust common error slice to allow multi errors.Is matching and conform to interface better
* zb: forgot to save?
* linties: fixies
* linties: word change as well.
* nitters: glorious
* buts
* nitters: fix glorious bug
* Update common/common.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* nitters: shifty
---------
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* stream: set connection monitor delay.
- this fixes a bug where the connection monitor delay config value does not
get set to the websocket on intialization.
* multi: add connection monitor delay to exchange config.
- this adds the connection monitor delay config option to the exchange type.
- the validate function of the exchange type has been updated to validate the
connection monitor delay value as well.
* multi: resolve review issues.
* 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>
* Modifications for a smoother live run
* Fixes data appending
* Successfully allows multi-currency live trading. Adds multiple currencies to live DCA strategy
* Attempting to get cash and carry working
* Poor attempts at sorting out data and appending it properly with USD in mind
* =designs new live data handler
* Updates cash and carry strat to work
* adds test coverage. begins closeallpositions function
* Updates cash and carry to work live
* New kline.Event type. Cancels orders on close. Rn types
* =Fixes USD funding issue
* =fixes tests
* fixes tests AGAIN
* adds coverage to close all orders
* crummy tests, should override
* more tests
* more tests
* more coverage
* removes scourge of currency.Pair maps. More tests
* missed currency stuff
* Fixes USD data issue & collateral issue. Needs to close ALL orders
* Now triggers updates on the very first data entry
* All my problems are solved now????
* fixes tests, extends coverage
* there is some really funky candle stuff going on
* my brain is melting
* better shutdown management, fixes freezing bug
* fixes data duplication issues, adds retries to requests
* reduces logging, adds verbose options
* expands coverage over all new functionality
* fixes fun bug from curr == curr to curr.Equal(curr)
* fixes setup issues and tests
* starts adding external wallet amounts for funding
* more setup for assets
* setup live fund calcs and placing orders
* successfully performs automated cash and carry
* merge fixes
* funding properly set at all times
* fixes some bugs, need to address currencystatistics still
* adds 'appeneded' trait, attempts to fix some stats
* fixes stat bugs, adds cool new fetchfees feature
* fixes terrible processing bugs
* tightens realorder stats, sadly loses some live stats
* this actually sets everything correctly for bothcd ..cd ..cd ..cd ..cd ..!
* fix tests
* coverage
* beautiful new test coverage
* docs
* adds new fee getter delayer
* commits from the correct directory
* Lint
* adds verbose to fund manager
* Fix bug in t2b2 strat. Update dca live config. Docs
* go mod tidy
* update buf
* buf + test improvement
* Post merge fixes
* fixes surprise offset bug
* fix sizing restrictions for cash and carry
* fix server lints
* merge fixes
* test fixesss
* lintle fixles
* slowloris
* rn run to task, bug fixes, close all on close
* rpc lint and fixes
* bugfix: order manager not processing orders properly
* somewhat addresses nits
* absolutely broken end of day commit
* absolutely massive knockon effects from nits
* massive knockon effects continue
* fixes things
* address remaining nits
* jk now fixes things
* addresses the easier nits
* more nit fixers
* more niterinos addressederinos
* refactors holdings and does some nits
* so buf
* addresses some nits, fixes holdings bugs
* cleanup
* attempts to fix alert chans to prevent many chans waiting?
* terrible code, will revert
* to be reviewed in detail tomorrow
* Fixes up channel system
* smashes those nits
* fixes extra candles, fixes collateral bug, tests
* fixes data races, introduces reflection
* more checks n tests
* Fixes cash and carry issues. Fixes more cool bugs
* fixes ~typer~ typo
* replace spot strats from ftx to binance
* fixes all the tests I just destroyed
* removes example path, rm verbose
* 1) what 2) removes FTX references from the Backtester
* renamed, non-working strategies
* Removes FTX references almost as fast as sbf removes funds
* regen docs, add contrib names,sort contrib names
* fixes merge renamings
* Addresses nits. Fixes setting API credentials. Fixes Binance limit retrieval
* Fixes live order bugs with real orders and without
* Apply suggestions from code review
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update backtester/engine/live.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update backtester/engine/live.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Update backtester/config/strategyconfigbuilder/main.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* updates docs
* even better docs
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* 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
* 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>
* 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>
* order: slight optimizations
* orders: add benchmarks, small optimize and change order side to uin8 for comparitive optimizations.
* orders: continue to convert string type -> uint
* orders/backtester: interim move type to orders package, later can expand or deprecate.
* orders: handle errors
* orders: optimize filters and remove error returns when its clearly not needed
* orders: remove log call
* backtester: zero value check
* orders/futures: zero value -> flag
* linter: fix
* linter: more fixes
* linters: rides again
* glorious: nits
* common: Add zero value unix check for time values; also addresses glorious nits
* glorious scott: nits
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* orderbook/buffer: data integrity and resubscription pass
* btcmarkets: REMOVE THAT LIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIINE!!!!!!!!!!!!!!!!!
* buffer: reinstate publish, refaactor, invalidate more and comments
* buffer/orderbook: improve update and snapshot performance. Move Update type to orderbook package to util. pointer through entire function calls. (cleanup). Change action string to uint8 for easier comparison. Add parsing helper. Update current test benchmark comments.
* dispatch: change publish func to variadic id param
* dispatch: remove sender receiver wait time as this adds overhead and complexity. update tests.
* dispatch: don't create pointers for every job container
* rpcserver: fix assertion issues with data publishing change
* linter: fixes
* glorious: nits addr
* depth: change validation handling to incorporate and store err
* linter: fix more issues
* dispatch: fix race
* travis: update before fetching
* depth: wrap and return wrapped error in invalidate call and fix tests
* btcmarkets: fix commenting
* workflow: check
* workflow: check
* orderbook: check error
* buffer/depth: return invalidation error and fix tests
* gctcli: display errors on orderbook streams
* buffer: remove unused types
* orderbook/bitmex: shift function to bitmex
* orderbook: Add specific comments to unexported functions that don't have locking require locking.
* orderbook: restrict published data functionality to orderbook.Outbound interface
* common: add assertion failure helper for error
* dispatch: remove atomics, add mutex protection, remove add/remove worker, redo main tests
* dispatch: export function
* engine: revert and change sub logger to manager
* engine: remove old test
* dispatch: add common variable ;)
* btcmarket: don't overflow int in tests on 32bit systems
* ci: force 1.17.7 usage for go
* Revert "ci: force 1.17.7 usage for go"
This reverts commit af2f95563bf218cf2b9f36a9fcf3258e2c6a2d91.
* golangci: bump version add and remove linter items
* Revert "golangci: bump version add and remove linter items"
This reverts commit 3c98bffc9d030e39faca0387ea40c151df2ab06b.
* dispatch: remove unsused mutex from mux
* order: slight optimizations
* nits: glorious
* dispatch: fix regression on uuid generation and input inline with master
* linter: fix
* linter: fix
* glorious: nit - rm slice segration
* account: fix test after merge
* coinbasepro: revert change
* account: close channel instead of needing a receiver, push alert in routine to prepare for waiter.
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
* Bump CI versions
* Specifically set go version as 1.17.x bumps it to 1.18
* Another
* Adjust AppVeyor
* Part 1 of linter issues
* Part 2
* Fix various linters and improvements
* Part 3
* Finishing touches
* Tests and EqualFold
* Fix nitterinos plus bonus requester jobs bump for exchanges with large number of tests
* Fix nitterinos and bump golangci-lint timeout for AppVeyor
* Address nits, ensure all books are returned on err due to syncer regression
* Fix the wiggins
* Fix duplication
* Fix nitterinos
* 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>
* currency: Add method to derive pair
* currency: Add method to lower entire charset but used the slice copy and returned that. This will change the original, just gotta see if this is an issue, but the slice usually goes out of scope anyway.
* currency/pairs: add filter method
* currency: add function to derive select currencies from currency pairs
* currency/engine: slight adjustments
* currency: fix linter issue also shift burden of proof to caller instead of repair, more performant.
* currency: more linter
* pairs: optimize; reduce allocs/op and B/op
* currency: Add in function 'NewPairsFromString' for testing purposes
* currency: don't suppress error
* currency: stop panic on empty currency code
* currency: Add helper method to match currencies between exchanges
* currency: fixed my bad spelling
* currency: Implement stable coin checks, refactored base code methods, optimized upper and lower case strings for currency code/pairs
* currency: add pairs method to derive stable coins from internal list.
* Currency: Cleanup, fix tests.
* engine/exchanges/currency: fix whoops
* Currency: force govet no copy on Item datatype
* Currency: fix naughty linter issues
* exchange: revert change
* currency/config: fix config upgrade mistake
* currency: re-implement currency sub-systems
* *RetrieveConfigCurrencyPairs removed
*CheckCurrencyConfigValues to only provide warnings, add additional support when, disable when support is lost or not available and set default values.
*Drop Cryptocurrencies from configuration as this is not needed.
*Drop REST Poll delay field as this was unused.
*Update default values for currencyFileUpdateDuration & foreignExchangeUpdateDuration.
*Allow Role to be marshalled for file type.
*Refactor RunUpdater to verify and check config values and set default running foreign exchange provider.
* currency: cleanup
* currency: change match -> equal for comparison which is more of a standard and little easier to find
* currency: address nits
* currency: fix whoops
* currency: Add some more pairs methods
* currency: linter issues
* currency: RM unused field
* currency: rm verbose
* currency: fix word
* currency: gocritic
* currency: fix another whoopsie
* example_config: default to show log system name
* Currency: Force all support packages to use Equal method for comparison as there is a small comparison bug when checking upper and lower casing, this has a more of a pronounced impact between exchanges and client instances of currency generation
* currency: fix log name
* ordermanager: fix potential panic
* currency: small optim.
* engine: display correct bool and force shutdown
* currency: add function and fix regression
* Change ConvertCurrency -> ConvertFiat to be more precise
* ADD GetForeignExchangeRate to get specific exchange rate for fiat pair
* Fix currency display and formatting regression and tied in with config.Currency fields
* engine: fix tests
* currency: return the amount when no conversion needs to take place
* currency: reduce method name
* currency: Address nits glorious nits
* currency: fix linter
* currency: addr nits
* currency: check underlying role in test
* gct: change to EMPTYCODE and EMPTYPAIR across codebase
* currency: fix nits
* currency: this fixes test race but this issue has not been resolved. Please see: https://trello.com/c/54eizOIo/143-currency-package-upgrades
* currency: Add temp dir for testing
* Update engine/engine.go
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* documentation: update and regen
* currency: Address niterinos
* currency: Add test case for config upgrade when falling over to exchange rate host as default from exchangeRates provider
* currency: addr nits
* currency: fix whoops
Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@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
* Exchanges: enrich order history with avg executed price, cost, and more
* Fix division by zero in order detail enrichment
* Remove DateCompleted from Bithumb OrderData and fix OrderDate parsing
* Fixes on order detail fields and rename EnrichOrderDetail to CalculateCostsAndAmounts
* BTSE order history populate name and id
* Calculate average executed price for market order or when order amount is zero
* Minor fixes on infer order amounts, costs, and times
* Attach InferAmountsCostsAndTimes to Order.Detail
* Binance: fix order status
* Always use order.StringToOrderStatus() and ensure order has at least one of executed/remaining amount set
* Allow configuration of orderbook publish period
For some applications that import GCT it's more interesting to be
immediately notified of an exchange orderbook update instead of
only getting notified every 10 seconds. This option allows that
to happen while keeping the previous default.
* exchanges: allow configuration of orderbook update period
* golangci-lint/CI: Bump versions
Fix remaining linter issues
* Specifically set AppVeyor version
* Fix the infamous typos 👀
* Add go env cmd to AppVeyor
* Add go version cmd to AppVeyor
* Specify AppVeyor image, adjust linters
* Update go get to go install due to deprecation
* Bump golangci-lint timeout time for AppVeyor
* Change NW contract to NQ
* Address nitters
* GetRandomPair -> Pair{}
* Address nits
* Address time nitterinos plus additional tweaks
* More time inception upgrades!
* Bending time and space
* 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
* websocket: select case error if no receiver, add in functionality to reset to initial sync for books on a new websocket connection
* websocket: fix tests
* websocket: log error instead of losing it
* websocket: fix whoopsie
* exchanges: fix test
* websocket: force requirement of specific functionality
* exchanges: fix tests
* exchanges/websocket: move waitgroup add before scheduling across exchanges
* gateio: add feature subscribe
* bithumb/bittrex: include connection state reset, fix reconnection bug for Bithumb
* huobi: Add listen to shutdown to routine so it actually returns and stops being a naughty boy.
* huobi: add missing waitgroup add.
* exchanges: bleed comms channels
* binance: fix reconnection bug with buffer
* bithumb: fix reconnection bug with ws orderbook when websocket is diabled/enabled
* bithumb/bittrex: add bleeders for ws orderbook jobs
* linter: fix
* kraken: reduce code block from double assertion
* This bug ruined my day.
* glorious: error checking
* zb: add correct path for websocket connection
* exchange: Add verbosity when config conflicts and overwrites default values
* zb: add https to path
* exchanges: glorious nits
* stream: Add checkAndSetMonitoring to reduce potential routine bundling, increase timeout and check state in tests
* stream: remove check that is not needed.
* glorious: nits addr.
* lint: test
* golangci: Enable err checking linter to expose unchecked errors.
* gct: handle errors across the board
* gct: handle errors NOTE: Found bug in FTX (WIP)
* linter: fix issues
* ftx/exchanges: fix bug where error was being returned when setting pair management variables to an already enabled state
* bitmex: fix bug where a dangly supported asset in config danglied up the place.
* linter: fix more linter issues
* linter: fix my terrible spelling.
* currency: fix test
* exchanges: fix tests
* logger: fix test
* exchanges: fix tests
* glorious: nits
* vm: revert rm variable and instigate test
* 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
* requester: defer execution of request.Item generation in closure.
* bithumb: fix issue
* coinut/itbit: fix linter issues
* binance: fix bug on recvWindow setting
* requester: standardize sendpayload + add readme update
* nonce: remove inc() function
* request: defer unlockiflocked
* binance: revert changes for open orders
* btcmarkets: defer auth generation functionality, rm context deadline as this will be created just before sending HTTP request.
* binance: move const to top
* exmo: remove debug output as its generated in the requester function
* ftx: defer auth functionality
* requester: move error to top
* bittrex: defer auth functionality
* bitmex: defer auth functionality and remove deadline as generation occurs after rate limiting.
* btse: defer auth functionality
* coinbasepro: defer auth functionality and removed context deadline as this is generated after rate limiting
* coinbene: defer auth functionality and remove context deadline as this is generated after rate limiting
* huobi: defer auth functionality and remove context deadline as this is generated after rate limiting
* huobi-futures: defer auth functionality and remove context deadline as this is generated after rate limiting
* kraken: defer auth functionality and remove context deadline as this is generated after rate limiting
* kraken: remove deadline protection for timestamp generation
* okgroup: defer auth functionality and remove context deadline as this is generated after rate limiting
* poloniex: defer auth functionality
* zb: defer auth functionality and remove context deadline as this is generated after rate limiting
* exchanges: clean up log output which are done and inspected in the requester package
* binance: fix path bug on every retry, rm timeout context as this is not needed
* coinbene: fix path bug on retry
* binance: consolidate functionality
* coinbene: fix linter issues
* poloniex: linter fix
* kraken: change add -> set
* bitstamp: fix path bug for retry
* BTSE: fix retry path bug
* coinbene: fix path bug whoopsie by me
* gateio: fix bug where on retry it does not reset reader
* localbitcoins: fix path bug on retry
* zb: change domain to land
* exchanges: make sure io.Reader is generated every request
* exchanges: move reader generation into function scope
* wrapper_issues: setup exchange manager
* engine: expand withdraw manager test
* engine: dont look for environment
* bitstamp: fix pathing bug (@thrasher-)
* engine/withdraw_manager: purge tests as this is covered in repository withdraw
* 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
* Speeds up tests
* Reduces time.Sleeps, lowers CreateTestBot complexity. Breaks things
* Removal of unecessary config reads. Parallel tests. Lower times
* Speeds up recent trades results
* mini update
* zoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooom
* Removes the dupes
* Lint
* post cherrypick
* Fix rare kraken data race
* Fixes banking global issues. Fixes postgres trades
* rmline for appveyor test
* Expands timeout in event that channel is closed before send
* Fix data race
* No rows, no bows and definitely no shows
* Removes parallel from createsnapshot tests
* Extends timedmutext test a smidge. Exchange fatality
* Shorter end timeframe and bigger candle