* CI/build: Update Go version, linters and fix minor issues
* Bump golangci-lint to v1.56.1
* BinanceUS: Make uint usage consistent
* Throw blank identifiers into the trash
* starting public endpoints
* Adding public endpoints
* added public spot market endpoints
* websocket subscriptions updates
* websocket push data handlers completing
* linter fix
* Added funding private endpoints
* Adding authenticated account endpoints
* Added fiat and OTC-RFQ authenticated endpoints
* trading authenticated endpoints
* completing trade endpoints and add public wrapper endpoints
* Authenticated wrapper functions and corresponding unit test
* Adding authenticated websocket endpoint and fixing wrapper functions
* Documentation and exchange websocket update
* update websocket orderbook checksum handling
* linter issues fix and unit test update
* remove invalid orderbook endpoint and unit test
* Documentation, handlers, and model types update
* minot fix
* Minor fixes
* Updating unit tests and added missing endpoints
* Add missing credential check
* Minor unit test fixes
* fix minor linter issue
* add snaphot test unit test
* Fix on update checksum and documentation update
* update exchange, add UpdateOrderExecutionLimits, and update documentation
* Minor fix on tickers fetching
* Minor websocket fix and smaill unit tests
* Minor websocket and naming fixes
* uncomment default channels
* Fix type and unit test issues
* websocket channels and data handling update
* Update Advanced-Algo websocket handling and minor fixes
* documentation and minor code fixes
* Fix name changes
* documentation contribution update
* intervalToString method update
* fix exchange_wrapper_standard tests
* Fix minor issues based on exchange_wrapper_standards_test
* Fix wrapper extended candlestick check
* websocket orders fetching error check method update
* Exchange name check and change
* docs: Add missing contributors
---------
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
* public endpoints methods added
* Completing mapping REST endpoints
* Binanceus Wrapper methods -Partially
* Binanceus Wrapper methods -Partially
* BinaWra functions with test funs; Not Completed
* Finalizing wrapper methods & test
* Fix & Complete wrapper functions
* Finalizing wrapper methods & test
* Adding Stream Datas
* WS Test functions
* CI: Fix golangci-lint linter issues
* CI: Fix reverting unnessesary changes and type conversion issues
* CI: Fix reverting unnessesary changes and type conversion issues
* Adding Public endpoints and tests
* Adding Market and Public Endpoints
* Adding Public endoints
* Public Trading Endpoints & Authenticated Trade order methods
* Adding Authenticated Methods and Tests
* Adding algo and Funding Authenticated endpoints
* Adding funding trading endpoints and correspondint tests
* adding authenticated endpoints
* Completing Block Trading endpoints and added subaccount endpoints
* Completing sub account and grid Trading endpoints
* Adding Rate Limit and missing endpoints
* Wrapper and Websocket handlers
* Fixing Websocket Test and Push Data Handler Issues
* Fixing Websocket Test and Push Data Handler Issues
* Fixing linter issues, package dependency, and other slight tempos
* Fixing linter and slight tempos
* Update on test functions, and Rest and Websocket Endpoint handlers
* Remove okex, adding comments, and slight fixes on endpoints.
* Fixing linter issues and adding comments
* Slight code changes, updating documentation, and n and linter issues
* Fix context and configuration endpoint issues
* slight fixes on config and test files
* adding some missing test and fix linter issues
* fix linter issue
* Slight fixes on code structure, shorthand exp,and ot and other
* Fix slight linter issue
* Slight code fixes and fixing linter issues
* fixing linter iissues
* fixing linter iissues
* slight linter issue fix
* slight linter issue fix
* Fix on models, type convert funcs and endpoints
* Adding Error messages map and update of models
* Fix on error message string and linter issues
* Fix slight linter issue
* Fix slight linter issue
* Fixing type converts, models, and linter issues
* Adding Ws fixes
* Slight fix on websocket and other issues
* Adding slight websocket fixes
* Remove 'books5' channel default subscription
* Small changes on default subscription and checksum
* Fix slight websocket tempos
* Fix Wrapper function tempost and linter issues
* Resolving slight naming and other issues
* Resolve slight pointer issues
* resolve slight linter issues
* Resolve config files issue
* Update websocket and wrapper funcs with test and docs
* fixs on websocket multiplexer, types, and other slight issues
* fix slight linter issues
* slight update on web-socket orderbook and tickers
* fix slight issues and websocket runtime errors
* Slight unit test fix and assing simple semaphore
* FIx race issue
* Update on authenticated endpoints
* Fix wsSetupRun check in websocket 'setupWsAuth' func
* Update wsSetupRun check in websocket 'setupWsAuth' func
* Slight update on websocket handling
* Fix some race conditions
* fix slight tempos
* fix authenticated test issues
* Update on conditional statements
* slight update on unit test
* fix unit test tempos
* Fix slight tempos
* Change check map from struct valued to bool valued
* slight fix trial
* Slight unit test update
* Fix websocket timeout error
* Updating websocket subscription endpoints, and unit tests
* update unit tests
* Slight issue on wrapper method 'GetActiveOrders'
* Overall code update
* Addressing missing review comments
* Fix unit test tempo and linter issue
* Monor fix
* Slight update
* Slight unit test fix
* Slight fixes
* Slight fixes
* Fixing on missing review comments
* Adding WS Fixes
* slight fix
* Monor fix on unit test
* Minor convert issue
* Minor change on WS
* Monor logic fix
* Fix code structure and logic issues
* Fixing small typos
* fix slight data format issue
* Update on trade and order wrapper methods
* Adding slight update
* fix on order detail
* Slight update on FetchTradablePairs wrapper method
* Slight update on wrapper
* Update on deserialization and other slight issues
* Final update
* Resolve missing review comments
* Slight update on config and unit test
* minor fix on GetDepositAddress param
* Minor fix
* logger: reduce go routine generation
* logger: shift most of processing and prep work to the worker pool, add pool for fields because each log we are pushing the struct to the heap, has better segregation now and includes a buffer in scope instead of relying on a pool
* logger: shift fmt package calls to worker pool
* logger: conform tests to new design
* linter: fix issues
* Update log/logger_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update log/logger_test.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* UN-GLORIOUS: nits
* logger: Handle config variable
* logger: NITERINOS BY GLORIOUS CODE
* logger: revert
* glorious: nits
* Panic at the disco: fix
* Panic at the disco: fix
* logger: make sure logger closed and job channel emptied on start up error
* fix tests
* logger: reduce globals
* logger: finished reduces globals, reduce workers to one too keep everything in line.
* logger: remove comments
* logger/exhchange: linter issues
* db/test: fix linter
* logger: add tests shift wait before unlock
* logger: consolidate worker code; fix linter issue and make sure we can sustain writing for external testing.
* logger: fix race and warn for conflict in config
* logger: fix name and add to tests
* logger: remove zero value field
* glorious: panic fix and removal of code
* logger: reinstate channels in close
* logger: shift reinstate processing to SetupGlobalLogger
* logger: segregate config.json from internal log.Config
* logger: fix silly mistake that is silly
* engine: Add protection for nil issues and implement new constructor in tests
* logger: Force singular mutex usage throughout package, throw away funcs that are not used outside of this package, unexport a bunch. Fix tests.
* logger: actually set advanced settings
* Update log/loggers.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update log/loggers.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update log/loggers.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update log/loggers.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* Update log/logger_multiwriter.go
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
* glorious: nits
* logger: test issue when not purging temp file and contents
* loggertest: add more protections for the panics
* linter: fix
* glorious: nits
* cleanup
* logger: linter fix
* linter: fix(?) :/
* linter: revert change
* linter: fix
Co-authored-by: Scott <gloriousCode@users.noreply.github.com>
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>
* log: fix bugs expand coverage and optimise
* log: fix linter issues
* log: fix linter issue and pack methods in same file
* log: drop defer
* logger: move global check inside getfields and remove unused test function
* logger: Increase note thanks @gloriouscode
* logger: wrap error with writer type
* logger: change variable name
* logger: change variable names and remove validsublogger func as it doesn't add functionality over a standard map call
* logs: error when unsupported output is applied on setup calls
* logs: add glorious suggestion
* logger: add protection to reduce olympic gold medal races
* logger: fix linter issues
* log: glorious niterinos
* 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
* 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
* 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
* Initial codes for a trade tracker
* Moving everything in a broken fashion
* Removes tradetracker. Removes some errors for subsystems
* Cleans up some subsystems, renames stuttering types. Removes some global Bot usage
* More basic subsystem renaming and file moving
* Removes engine dependency from events,ntpserver,ordermanager,comms manager
* Exports eventManager, fixes rpcserver. puts rpcserver back for now
* Removes redundant error message, further removes engine dependencies
* experimental end of day interface usage
* adds ability to build the application
* Withdraw and event manager handling
* cleans up apiserver and communications manager
* Cleans up some start/setup processes. Though should separate
* More consistency with Setup Start Stop IsRunning funcs
* Final consistency pass before testing phase
* Fixes engine tests. Fixes stop nil issue
* api server tests
* Communications manager testing
* Connection manager tests and nilsubsystem error
* End of day currencypairsyncer tests
* Adds databaseconnection/databaseconnection_test.go
* Adds withdrawal manager tests
* Deposit address testing. Moved orderbook sync first as its more important
* Adds test for event manager
* More full eventmanager testing
* Adds testfile. Enables skipped test.
* ntp manager tests
* Adds ordermanager tests, Extracts a whole new subsystem from engine and fanangles import cycles
* Adds websocket routine manager tests
* Basic portfolio manager testing
* Fixes issue with currency pair sync startup
* Fixes issue with event manager startup
* Starts the order manager before backtester starts
* Fixes fee tests. Expands testing. Doesnt fix races
* Fixes most test races
* Resolves data races
* Fixes subsystem test issues
* currency pair syncer coverage tests
* Refactors portfolio. Fixes tests. Withdraw validation
Portfolio didn't need to exist with a portfolio manager. Now the porfolio manager
is in charge how the portfolio is handled and all portfolio functions are attached
to the base instead of just exported at the package level
Withdrawal validation occurred at the exchange level when it can just be run at the
withdrawal manager level. All withdrawal requests go through that endpoint
* lint -fix
* golang lint fixes
* lints and comments everything
* Updates GCT logo, adds documentation for some subsystems
* More documentation and more logo updates
* Fixes backtesting and apiserver errors encountered
* Fixes errors and typos from reviewing
* More minor fixes
* Changes %h verb to %w
* reverbs to %s
* Humbly begins reverting to more flat engine package
The main reasoning for this is that the subsystem split doesn't make sense
in a golang environment. The subsystems are only meant to be used with engine
and so by placing them in a non-engine area, it does not work and is
inconsistent with the rest of the application's package layout.
This will begin salvaging the changes made by reverting to a flat
engine package, but maintaining the consistent designs introduced.
Further, I will look to remove any TestMains and decrease the scope
of testing to be more local and decrease the issues that have been
caused from our style of testing.
* Manages to re-flatten things. Everything is within its own file
* mini fixes
* Fixes tests and data races and lints
* Updates docs tool for engine to create filename readmes
* os -> ioutil
* remove err
* Appveyor version increase test
* Removes tCleanup as its unsupported on appveyor
* Adds stuff that I thought was in previous merge master commit
* Removes cancel from test
* Fixes really fun test-exclusive data race
* minor nit fixes
* niterinos
* docs gen
* rm;rf test
* Remove typoline. expands startstop helper. Splits apiserver
* Removes accidental folder
* Uses update instead of replace for order upsert
* addresses nits. Renames files. Regenerates documentation.
* lint and removal of comments
* Add new test for default scenario
* Fixes typo
* regen docs
* Add initial workflows config
* Add PSQL service
* Add 32bit and frontend jobs
* Add gcc-multilib and fix typo
* Fix backtester test for linux/unix filesystem errors and npm commands
* 32-bit Add -race to purposefully throw an error to ensure envs are set correctly (will revert)
* Revert "32-bit Add -race to purposefully throw an error to ensure envs are set correctly (will revert)"
This reverts commit b97e66c49fca859f8738e01107f96f9ca4040b2e.
* Bump workers count for orderbook processing
* Remove comments to trigger 32-bit cache hit after job success
* Cancel addition plus version bump, spawn more overlords
* Update build badge to Github Actions
* Brach -> Branch
* End of day commit moving packages and setting foundation into how trade processing will go
* Conformity
* tdd candle generation based on received trade data, renames orderbookbuffer back to buffer for now...
* Formalises test functions and designs the trade processor
* Theoretical amending old candles to allow any trades that were part of an old processed candle to be more accurate. Saving of candles will only occur on previous cycles, extending memory usage a bit longer
* Figures out sqlboiler for sqlite. Updates websocket entries to process trade data
* One more trade data
* Adds more exchange support
* Adds PSQL stuff
* Begins creating sql implementation
* End of day commit. Helper functions and understanding sql usage in GCT
* Adds delete and cleans up table design
* Finishes trades conceptually. Awaits candle data update in order to translate trades to candles
* Initial handling of trades in coinbene
* Proto
* Fixing of some bugs, attempting to address coinbene asset type ws issues
* Fixes up coinbene websocket implementation for the most part
* finalises coinbene websocket implementation. Adds new ability to parse currencies without a delimiter
* Implements rpc commands and adds testing
* updates the following to be compatible with trade data update: Theoretical amending old candles to allow any trades that were part of an old processed candle to be more accurate. Saving of candles will only occur on previous cycles, extending memory usage a bit longer
* Changes trade to be its own entity rather than attached to a websocket.
* Adds coverage to trades. Changes signature of `AddTradesToBuffer` to return error. Now automatically shuts down without need for channel listening. Will automatically start up again if it gets data
* Implements trade fetching at the wrapper level for a bunch of exchanges. Adds trade id to script updoot. Probably breaking change
* Implements trade fetching for all wrappers hurray hurrah. Updates all the tests
* Adds new interface func to get recent trades. Ensures GetExchangeHistory continues until conditions are met
* Adds new readme, tests all new wrapper endpoints, updates exchange_wrapper_issues to test new endpoints. Updates exchange_wrapper_coverage with new coverage... Fixes lame bug causing wrapper tests to fail from being poorly setup. Adds loopy loop to ensure that all data is captured when requesting exchange history
* Bugfix on psql migrations. Rebases latest changes, updates table design to use base and quote, updates trades to use exchange_name_id
* Adds new config field for saving trades to the database per exchange. Now exits trade processing when trade saving is not enabled. Similarly for wrapper, does not save if not enabled
* Minor bitfinex trade fixes. continues on buffer processing errors, now saves transactionid to the db
* Adds support for generating candles from candlesextended. May extend it further, idk
* Updates trade candles to be able to fill missing data with trades. Adds more tests. Also does a thing where you can forcefully override a candle based on internal trade data instead of API data
* Fixes bug where force deletions did not follow up with insertions. Adds force to candle commands
* Fixes specific exchange based issues. Extends recent trades to 24 hours where possible
* Fixes issue with saved tests. Fixes tests for trades. Adds parallel to tests. Pre-fixes people's nits
* Adds new GRPC functions to find out what data is missing from trades and candles. Fixes some assumptions from missing period code.
* Adds unique constraint. Fixes up niggling issues for wrappers and websockets
* Fixes issues with using unix times in the database trying to retrieve data via the CLI. Reduces save time to 15 seconds
* Updates trades to use timestamps instead of int64 unix
* Adds missing FTX wrapper implementation. Regens docs
* Linting the linters. Updating readme
* Adds new command to set whether an exchange can process trades
* Doc update
* Adds recent trades and historic trade endpoints to grpc
* formats pair_test.go to appease linter gods
* Addresses data race. Removes logging of missing intervals on unrelated function (now that it has its own rpc command). The buffer time isnt customisable, but I don't feel it needs to be at a config level at all really.
* Fixes a few niterinos regarding spacing, type conversion, a weird Bitmex 0 trade value error, unsubscriptions and cli command references
* Reduces map lookups. Adds base func and moves wrappers to use it
* Uses better currency formatter. Adds time based validation to trade history. Reverts configtest.json
* Reverts config and updates test names. Also WAYYYYY LESS SPAMMY
* oopsie doopsie missed a whoopsie
* mint flavoured lint
* Fixes issues caused by rebase
* Fixes issue with timestamps not converting properly from command to RPCServer. Adds new error type. Adds shorthand entries to some commands. Removes os.Exit from tests. Makes Gemini test rolling. Adds enabled exchange check to RPC function. Escapes timestamp on bitstamp. Renames var
* fixes whoopsie oopsie doopsie I forgot to remove code shoopsie
* missed a line
* 🎉🎉 :tada:Breaks everything in an end of day commit 🎉🎉🎉
* Modifies function 'createlocaloffset' to return a string instead. Uses strings for all time based start and end commands. Uses UTC times in RPC server and updates SQLITE to use formatted time based queries
* Adds concurrency-safe way of changing SaveTradeData and checking it. Fixes embarrassing typo
* End of day fix, adds bitfinex update to loop until either the return trades shows no new dates, or meets specifications. Fixes egregious typo
* Improves testing and handling of historical trades function
* Fixes tests after latest changes
* Fix potential fatal err now that db is enabled in test config now
* Fixes up some database settings to use a local engine instead of global var
* DELICIOUS LINT CHOCOLATE FIXES
* Fixes data race by slashing competitor's tyres
* Adds mock test fixes to allow for live and stored data test
* Removes verbosity in engine level tests. Adds new timezone format to highlight the timezone for RPC functions. Removes reference to Preix index fund
* Oopsie doopsie, fixed a whoopsie
* Loggers can no longer do data drag races on my lawn 👴
* Removes bad lock
* Addresses command nits. End of day conceptual commit, trying to calculate spans of time in the context of missing periods. Tests will fail
* Adds new stream response for retrieving trade history as it can take time to do. Unsuccessfully attempts to simplify time range calculation for missing trades response
* Adds new timeperiods package to calculate time periods, time ranges and whether data is in those ranges. Removes kline basic implementation of same concept
* Fixes lint issues. Fixes test. Moves trade cli commands to their own trade subcommands
* Updates lakebtc to no longer have gethistorictrades as it is unsupported. Adds more validation to rpc functions
* Removes requirement to have trades when testing trade wrapper functions. Doesn't really prove it works if there are no trades for a given currency in a time period.
* Addresses nits, runs linting fix and ensures a test is consistent
* Fix merge issues
* Moves sort to timeperiods. Adds test coverage. Fixes typo
* Removes log package in CLI
* Fixes `GetTrades` url
* Reorders all instances of validation occuring after settingup RPC connection
* Fixes test to ensure that it is setup before testing that it is setup
* Fixed issue with bool retrieval. Removes double append
* Fixes Binance times, fixes bitfinex sell sides, fixes huobi times, sorts all responses
* Fixes poloniex trade id consistency. Makes recent trade for poloniex consistent with others (15 minutes). Fixes coinbene. Fixes localbitcoins to use quote currency. Fixes coinut times. Updates huobi trade id, saves okgroup trades. Fixes bid and ask to buy and sell
* Removes websocket trades for lakebtc as it did not meet our requirements for processing. Adds new constraints to the database to ensure we have uniqueness on trades where ID doesn't exist and doesn't trigger errors for trades where the tid does
* Fixes migration for postgres to downscale properly
* Really really fixes the psql index changes
* Fixes broken tests
* Now with working tests and no pocket lint
* Makes the side column nullable with no more constraint for it. adds migrations and runs generation. comments lakebtc
* Lint & Sprüngli
* Updates zb to use more appropriate side
* Fixes oopsie
* Attempts to address a data race from globals
* Fixes build
* Fixes missed regen rpc files
* Updates readme to point to trade readme. Fixes exchange_wrapper_coverage wrapper count and untested panics, tests bitfinex funding pair test for `fUSD`, adds shiny new param `tradeprocessinginterval`
* mint flavoured lint
* Uses the real default to set the default value by default
* Fixes some extra tests surrounding email sending and number incompatibility
* Reverts test config
* re-adds gom2/usdt currency
* Fixes typo, don't look!
* Fixes minor codelingo pickups
* Adds more precision to handling of trade data from Kraken. Expands test
* interface christmas tree
* lint
* Adds mock testing to ZB
* STEALS improved time validation code from the original STOLEN validation code :D
* Mini fixes from review
* happy fun comment stealing
* Moves the loop checker earlier to ensure no double appendages
* Fixes sneaky test
* Fixes the important part where mock tests work instead of live tests
* Skips authenticated endpoints for mock testing.
* lint
* Updates candle wrapper functions to respect design
* basic linting fix
* Reverts configtest.json, updates readme to be way better, adds coverage to validateCandlesRequest
* Tiniest grammatical fix
* Fixes more outdated code references
* Closing out a high
* Fixes spacing
* Replaces all instances of 4 spaces in tmpl files with a tab
* fixes spacing and tab related readme issues once and for all 🤞
* tidy
* indentation violation identification situation
Refactoring the timeout retries into a more general 'retry policy' with
support for retrying on HTTP 429 (Too Many Requests) and other responses
with a `Retry-After` header
The delay between requests is controlled by a combination of a 'backoff'
(currently only a simple linear backoff), and honouring the
`Retry-After` value (longest delay wins)
This makes the 'rate limiter' an optional argument as well, removing the
use of `nil` when one isn't supplied
Signed-off-by: David Ackroyd <daveo.ackroyd@gmail.com>