* Initial concept for creating price tracking pairs
* Completes coverage, even with a slow test
* I dont know what point to hook this stuff up
* Bit of a broken way of handling tracking pairs
* Correctly calculates USD rates against all currencies
* Removes dependency on GCT config
* Failed currency statistics redesign
* initial Update chart to use highcharts
* Minor changes to stats
* Creats funding stats to handle the stat calculations. Needs more work
* tracks USD snapshots and BREAKS THINGS FURTHER
* Fixed!
* Adds ratio calculations and such, but its WRONG. do it at totals level dummy
* End of day basic lint
* Remaining lints
* USD totals statistics
* Minor panic fixes
* Printing of funding stats, but its bad
* Properly calculates overall benchmark, moves funding stat output
* Adds some template charge, removes duplicate fields
* New charts!
* Darkcharts. funding protection when disabled
* Now works with usd tracking/funding disabled!
* Attempting to only show working stats based on settings.
* Spruces up the goose/reporting
* Completes report HTML rendering
* lint and test fixes
* funding statistics testing
* slightly more test coverage
* Test coverage
* Initial documentation
* Fixes tests
* Database testing and rendering improvements and breakages
* report and cmd rendering, linting. fix comma output. rm gct cfg
* PR mode 🎉 Path field, config builder support,testing,linting,docs
* minor calculation improvement
* Secret lint that did not show up locally
* Disable USD tracking for example configs
* ShazNitNoScope
* Forgotten errors
* ""
* literally Logarithmically logically renders the date 👀
* Fixes typos, fixes parallel test, fixes chart gui and exporting
* Expose trade feed websocket exchange data through data channel
Most relevant to applications that import GCT as a lib, this allows
them to (through configuration, disabled by default) receive trade data
through the data channel similarly to the orderbook feed.
* exchanges: allow exposure of trade websocket feed through data channel
* Expose fill feed websocket abstracted exchange data through data channel
* exchanges: allow exposure of fill websocket feed through data channel
* 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
* Better designed backtester funding concept
* Fleshes out funding concepts further to allow two funding types
* Adds types, finishes adding to portfolio and adds to exchange
* Fixes a bug to reveal another
* Fixes issues with purchasing
* A partial conversion to using decimal.decimal for the backtester
* Further decimal rollout. Can compile and output report
* More cleanup
* Fix rendering and initial funds issue.
* Adds new concept for trading using the exchange level funding to see what happens
* Fixes a bug in funding not being found
* New strat config to test RSI and discover issues
* Can run with pairs that contain 0 funding
* Finally fixes the arrangement to share funds
* Adds testing and funding transfer
* end of day
* More comments, more tests!
* Improves item comparisons and completes testing
* Initial attempt at new strategy which utilisies shared funding and transfers
* end of day broken
* Chronological output. Fixes output bug where multi currency.
* End of day commit
* Fixes bug where events were being overwritten in a simultaneous context
* Begins transitioning from portfolio holdings to funding holdings. Am I doing the right thing
* End of day run around
* Likely fix for holding calculations
* Improvement to template. Improvement to holdings
* DARK MODE. Report upgrades. Even handling with funds. Fix output
* Output funding to cmd
* Add new trasnferred funds "side"
* Fixing test run 1
* Test updates
* Test updating
* More test fixing
* Fixes portfolio tests
* More test fixes
* Fixes remaining tests and lints
* Fixes currencystatistics tests. Adds decimal math implementations
* Fixes hilarious bug where there could only be on holding
* Adds funding support for config. Minor fixes
* Adds documentation
* Finishes config builder support for funding
* Logs inexact conversions, updates tests. adds config validation
* The quest to understand a new funding bug begins. New strategy
* Fixes bug where wrong funding was retrieved. Expands t2b2 strat
* End of the day commit. Gotta revert the nulldecimal stuff
* Fixes tests, adds extra funding transfer feature
* Fixes initial total values, tries to add a grand total value
* Rebase fixes, documentation updates, tests for strategy
* Swaps the err statement for tests. Regenerates tests. Math warnings
* Attempts to solve Live data problems. Fixes volume
* Fixes live data missing
* can trade at any interval. skip volume sizing. volume colours.
* config regen. display fixes
* test fixes, lint fixes
* Anti-funky errors
* docs
* Rmbad
* docs
* docs update
* Simplifies err handling. Updates readmes. Data type checks
* docs. new field initial-base-funds. comment errs. config test coverage
* minMaxing
* testfix
* Fixes fee calculation, re-bans minMax being equal
* Crazy concepts to attempt to solve totals. Addresses nits
* Adds in totals calculation for exchange level funding.Uses external API
In future, this will be replaced by proper pricing supplied by the same
exchange that is requested. This is an unknown price
* rm dollar signs in cmd and report. rm bad error. fix chart decimal. padding
* re-run docs post merge
* Fixes oopsie for fee parsing
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Initial REST managed order updating
* Apply gloriousCode's changes.go patch
* Update internal order ID handling
* Check error
* Replace string with string pointer
* Avoid nil pointers in upsert
* Update test for UpdateOrderFromDetail()
* Add tests for orders.go
* Remove unnecessary newline
* Address comments
* Add missing nil check
* Add tests for new functions in order_manager.go
* Remove empty line
* Change log level for updates from Info to Debug (keep added orders at Info)
* Initialize orders before running the timer
* [TEMP] Add verbosity for debugging
* Nil checking on exchangeManager in GetExchanges()
- exchangeManager.GetExchanges() and iExchangeManager.GetExchanges() return an error on nil
- bot.GetExchanges() wraps exchangeManager.GetExchanges() and returns an empty slice
* Revert b5afe1a46b
* Do not start the order manager runner thread
Instead, mark the order manager as running
* Remove redundant error.Is() and remove print wrapper on msg
* Add atomic blocker and waitgroup on processOrders()
* Disable unnecessary orderManager runner thread for rpcserver_test
* Remove redundant err from orderStore.getActiveOrders()
* [FIX] Populate requiresProcessing using UpsertResponse data instead of REST return data
.. because the data returned by the REST calls do not include the internal user ID's
* [TEST] Verify that processOrders() actually processes queried order data
* Remove leftover warning and add nil check on wg.Done()
* Apply suggestions from code review
Log category changes - as suggested
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* Return when no exchanges available
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* 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
* exchanges: add an UpdateTickers method to the main exchange interface
This method will fetch all currency pair tickers of a given asset type
and update them internally, does nothing for now.
* exchanges: refactor UpdateTicker on all exchanges
Keep the exact previous behaviour but implement the UpdateTickers
method and refactor UpdateTicker by using it where applicable.
* sync_manager: update all tickers when batching is enabled
* binance: UpdateTicker to fetch single ticker symbol
* ftx: UpdateTicker to fetch single ticker symbol
* gctcli: remove all exchange name client-side validation
Since now exchange names can be user-assigned we can no longer have
client-side validation, all exchange name validation must now occur
on the server (it was already doing that).
* engine: add server side exchange name check on some RPCs
* engine: Setup exchange manager earlier
So it's available for applications before starting.
* engine: Add a custom exchange builder interface
Allows applications that import GCT as a lib to build new
custom exchanges without further modifications.
* 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
* Remove old concept. Introduce new job types and candle scaling
* Adds extra processing, commands
* new concept for queued jobs. Jobs can pause. New commands to manage status
* =End of day commit designing tables and implementing prerequisites further.
* Adds postgres data history relations
* Fixes table design for sqlite. Fixes all issues from merge
* Fixes craziness of database design. Adds some functions to get related jobs
* Fixes errors
* Updates some documentation, manages prerequisite jobs a little better, adds rpc funcs
* Fixes database design and adjust repo functions
* Tests database relationship
* Test coverage of new job functions
* Finishes coverage of new functions
* Commands and RPC coverage
* New database modifications for new job types
* Adds db support of new columns. Adds conversion validation. lint
* command blurb changes
* Allows websocket test to pass consistently
* Fixes merge issue preventing datahistorymanager from starting via config
* Minor fixes for different job type processing
* Fixes rangeholder issue, fixes validation, does not address jobs not starting or wrong status
* Fixes database tests, but at what cost. Fixes dhm tests
* Fixes dhj completion issue. Adds prerequisite by nickname
* Fixes validation processing. Adds db tests and validation
* Fixes validation job processing range
* Fixes trade sql. Reduces defaults. Validation processing and errors
* Updates cli job commands. adds validation decimal. fix job validation
* Expands run job handling and tests
* Validation work
* Fixes validation processing
* candle relations. new job type. updating database design
* Adds secondary exchange support. Sets stage for candle override
* Re adds accidentally deleted relationship
* Updates loading and saving candles to have relationship data when relevant
* Now validates and replaces candle data appropriately
* Fixes getting and setting datahistory data. Neatens DHM
* Test coverage
* Updates proto for new db types. New test coverage. Secondary exchange work
* Investigation into never-ending validation jobs. Now that intervals are ruled out, now need to complete the job....
* Fixes issues with validation job completion. Fixes validation volume issue for secondary exchange
* Adds candle warning support to the backtester
* Fixes warnings
* lint and begin docs
* Documentation updates. Final testing changes
* Minor fixes
* docs, prerequisite checks, more testing
* Fixes binance trade test. Rename err
* Documentation fixes. Figure fixes
* documentation update
* Fixes remote PSQL tests
* Fix binance mock test
* Remove unnecessary JSON
* regen proto
* Some minor nit fixes
* Var usage, query sorting, log improving, sql mirroring
* Extra coverage
* Experimental removal of m.jobs and mutex. Fix messaging
* Fixes error
* Lint fixes, command description improvements. More isRunning gates
* description improvements
* Lint
* BUFF regenerate
* Rough concept to fix insertions taking up long periods of time
* New calculation for trade data. Adds batch saving
This also adds an experimental request feature to shut down lingering requests. However, its uncertain whether or not this is having any impact. Initially thought it was the trades that was taking time and not SQL. Will investigate further
* Removes experimental requester. Adds documentation. Fixes typo
* rm unused error
* re-adds more forgotten contributors
* Now with proper commit count
* orderbook: export orderbook nodes for external strategy inspection
* orderbook: Add in methods for locking and unlocking multiple books at the same time e.g. book1.LockWith(book2); defer book1.UnlockWith(book2)
* include waiting functionality for depth change alert
* backtester: add word.
* log: include logger changes to impl with downstream integration
* engine: reduce params for loading exchange
* assort: rm verbose in tests, change wording in ob, expose sync.waitgroup for ext. sync options
* ticker: reduce map look ups and contention when using RW mutex when there are over 80% writes adds find last function to get the latest rate
* engine/syncmanager: add in waitgroup for step over for external package calls
* cleaup
* engine: linter fix
* currency/fx: include all references to fiat currencies to default
* orderbook: Add in fields to Unsafe type for strategies to detect potential out of sync book operations
* syncmanager: changed config variable to display correct time
* ordermanager: Add time when none provided
* currency/manager: update getasset param to get enabled assets for minor optimizations
* ftx: use get all wallet balances for a better accounts breakdown
* orderbook: unlock in reverse order
* bithumb: fixes bug on market buy and sell orders
* bithumb: fix bug for nonce is also time window sensitive
* bithumb: get orders add required parameter
* bithumb: Add asset type to account struct
* currency: improve log output when checking currency and it fails
* bithumb: Add error return on incomplete pair
* ticker:unexport all service related methods
* ticker/currency: fixes
* orderbook: fix comment
* engine: revert variable name in LoadExchange method
* sync_manager: fix panic when enabling disabling manager
* engine: fix naming convention of exported function and comments
* engine: update comment
* orderbook: fix comment for unsafe type
* config: add remoteControl/gRPC/timeInNanoSeconds
* grpc: consult with remoteControl/gRPC/timeInNanoSeconds whether timestamps should be in seconds or nanos
* engine: test if RPCServer.unixTimestamp() respects config/remoteControl/gRPC/timeInNanoSeconds
* engine: implement TestRPCServer_GetTicker_LastUpdatedNanos that makes sure TickerResponse.LastUpdated is returned in nanoseconds if configured
* config_example.json: add remoteControl/gRPC/timeInNanoSeconds
* engine: (1) test RPCServer.unixTimestamp() in parallel, (2) increase time tolerance of TestRPCServer_GetTicker_LastUpdatedNanos()
* engine: TestRPCServer_GetTicker_LastUpdatedNanos() now fetches a mock-up ticker to check timestamps
* first draft of getmanaged orders RPC call
* - ClientIDs for binance, especially spot asset
- applied old ClientOrderId for cancelled orders
- added clientOrderId to GCTRPC
* added tests for Matchfilter and GetManagedOrders
* smaller fixes
* comment fix
added getFilteredOrders to store
changed store mutex to RWMutex
smaller fixes
* fixed bug in Detail Copy and added test
* fixes for Scotts review
* processSubmittedOrder was missing clientOrderId
* changed: TestGetOrdersFiltered expanded
fixed: warning, where variable name collided with package name
fixed: used req.AssetType in binance_wrapper.go
Co-authored-by: Mark Dzulko <81071907+Mark-numus@users.noreply.github.com>
* 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
* Adds lovely initial concept for historical data doer
* Adds ability to save tasks. Adds config. Adds startStop to engine
* Has a database microservice without use of globals! Further infrastructure design. Adds readme
* Commentary to help design
* Adds migrations for database
* readme and adds database models
* Some modelling that doesn't work end of day
* Completes datahistoryjob sql.Begins datahistoryjobresult
* Adds datahistoryjob functions to retreive job results. Adapts subsystem
* Adds process for upserting jobs and job results to the database
* Broken end of day weird sqlboiler crap
* Fixes issue with SQL generation.
* RPC generation and addition of basic upsert command
* Renames types
* Adds rpc functions
* quick commit before context swithc. Exchanges aren't being populated
* Begin the tests!
* complete sql tests. stop failed jobs. CLI command creation
* Defines rpc commands
* Fleshes out RPC implementation
* Expands testing
* Expands testing, removes double remove
* Adds coverage of data history subsystem, expands errors and nil checks
* Minor logic improvement
* streamlines datahistory test setup
* End of day minor linting
* Lint, convert simplify, rpc expansion, type expansion, readme expansion
* Documentation update
* Renames for consistency
* Completes RPC server commands
* Fixes tests
* Speeds up testing by reducing unnecessary actions. Adds maxjobspercycle config
* Comments for everything
* Adds missing result string. checks interval supported. default start end cli
* Fixes ID problem. Improves binance trade fetch. job ranges are processed
* adds dbservice coverage. adds rpcserver coverage
* docs regen, uses dbcon interface, reverts binance, fixes races, toggle manager
* Speed up tests, remove bad global usage, fix uuid check
* Adds verbose. Updates docs. Fixes postgres
* Minor changes to logging and start stop
* Fixes postgres db tests, fixes postgres column typo
* Fixes old string typo,removes constraint,error parsing for nonreaders
* prevents dhm running when table doesn't exist. Adds prereq documentation
* Adds parallel, rmlines, err fix, comment fix, minor param fixes
* doc regen, common time range check and test updating
* Fixes job validation issues. Updates candle range checker.
* Ensures test cannot fail due to time.Now() shenanigans
* Fixes oopsie, adds documentation and a warn
* Fixes another time test, adjusts copy
* Drastically speeds up data history manager tests via function overrides
* Fixes summary bug and better logs
* Fixes local time test, fixes websocket tests
* removes defaults and comment,updates error messages,sets cli command args
* Fixes FTX trade processing
* Fixes issue where jobs got stuck if data wasn't returned but retrieval was successful
* Improves test speed. Simplifies trade verification SQL. Adds command help
* Fixes the oopsies
* Fixes use of query within transaction. Fixes trade err
* oopsie, not needed
* Adds missing data status. Properly ends job even when data is missing
* errors are more verbose and so have more words to describe them
* Doc regen for new status
* tiny test tinkering
* str := string("Removes .String()").String()
* Merge fixups
* Fixes a data race discovered during github actions
* Allows websocket test to pass consistently
* Fixes merge issue preventing datahistorymanager from starting via config
* Niterinos cmd defaults and explanations
* fixes default oopsie
* Fixes lack of nil protection
* Additional oopsie
* More detailed error for validating job exchange
* engine: Set full state on settings validation before flag check to minimise future work when settings are added.
* engine: purge sillyness comment
* engine: address logic issues with change
* engine: invert boolean check
* 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
* Add new forex provider ExchangeRateHost.io
* Fix linter paramTypeComine
* Add templates and README files
* Convert all times to UTC
* Fix cosmetic issue and address nits
* Add support for fx exchangerate.host engine override
* Address nit plus use remove plural
* Exchanges: Initial implementation after rebase of depth (WIP)
* orderbook/buffer: convert and couple orderbook interaction functionality from buffer to orderbook linked list - Use single point reference for orderbook depth
* buffer/orderbook: conversion continued (WIP)
* exchange: buffer/linkedlist handover (WIP)
* Added some tests for yesterday
* linkedList: added more testing and trying to figure out broken things
* Started tying everything in
* continuous integration and testing
* orderbook: expanded tests
* go mod tidy
* Add in different synchornisation levels for protocols
Add in timer for the streaming system to reduce updates to datahandler
Add in more test code as I integrate more exchanges
* Depth: Add tests, add length check to call linked list updating, add in constructor.
Linked List: Improve tests, add in checks for zero liquidity on books.
Node: Added in cleaner POC, add in contructor.
Buffer: Fixed tests, checked benchmarks.
* orderbook: reinstate dispatch calls
* Addr glorious & madcozbad nits
* fix functionality and add tests
* Address linterinos
* remove label
* expanded comment
* fix races and and bitmex test
* reinstate go routine for alerting changes
* rm line :D
* fix more tests
* Addr glorious nits
* rm glorious field
* depth: defer unlock to stop deadlock
* orderbook: remove unused vars
* buffer: fix test to what it should be
* nits: madcosbad addr
* nits: glorious nits
* linkedlist: remove unused params
* orderbook: shift time call to outside of push to inline, add in case for update inster price for zero liquidity, nits
* orderbook: nits addressed
* engine: change stream -> websocket convention and remove unused function
* nits: glorious nits
* Websocket Buffer: Add verbosity switch
* linked list: Add comment
* linked list: fix spelling
* nits: glorious nits
* orderbook: Adds in test and explicit time type with constructor, fix nits
* linter
* spelling: removed the dere fence
* depth: Update alerting mechanism to a more battle tested state
* depth: spelling
* nits: glorious nits
* linked list: match cases
* buffer: fix linter issue
* golangci: increase timeout by 30 seconds
* nodes: update atomic checks
* spelling: fix
* node: add in commentary
* exchanges/syncer: add function to switch over to REST when websocket functionality is not available for a specific asset type
* linter: exchange linter issues
* syncer: Add in warning
* nits: glorious nits
* AssetWebsocketSupport: unexport map
* Nits: Adrr
* rm letter
* exchanges: Orderbook verification change for naming, deprecate checksum bypass as it has the potential to obfuscate errors that are at the tail end of the book, add in verification for websocket stream updates
* general: fix spelling remove breakpoint
* nits: fix more glorious nits until more are found
* orderbook: fix tests
* orderbook: fix wait tests and add in more checks
* nits: addr
* orderbook: remove dispatch reference
* linkedlist: consolidate bid/ask functions
* linked lisdt: remove words
* fix spelling
* deleting the unwanted file created during testing + adding more verbose errors for cli
* wip
* checking params throughout wip
* improving errors
* wip
* thrasher patch
* better err name
* whip
* testing and fixing errors WIP
* upgrades and better errors
* broken test
* wip
* adding some tests
* using tempDir
* mini improvement
* little changes
* better time check
* fixing error
* more glorious changes
* end of day wip
* shazzy changes
* checking error
* appveyor
* last changes:
* Exchanges: Add in exchange defined tolerance settings to conform to min max amounts/price/notional etc (Initial)
* Add to tests fix linter
* Binance: Implement CMF and usdtMarginFutures fetching of currency information, addr nits
* binance: Add in test for tolerance set up
* exchanges: add in more tolerance settings and add tests
* nits: addr
* fix linter issue
* RPCServer: Use ordermanager instead of going direct to exchange
* Nits: Addr
* nits: glorious addr phase one
* nits: glorious nits phase 2
* exchange: move tolerance -> limits in order package add wrapper function, split binance functions to asset files
* nits: Addr thrasher + also include locking of limits struct when we update via syncer later on
* nits: mdc addr
* nits: glorious nits
* limits: unexport mutex
* limit: revert maths optim. and fix spelling
* limit: Add decimal package
* limit: don't check price on market order
* Orders: Add order execution checks on fake orders so as to always conform to tight specifications even in simulation
* binance: handle case where spot is not enabled but margin is
* backtester: add in amount conforming to back tested events to simulate realistic orders
* rm ln
* order limit: return amount when limit is nil and conformToAmount is requested
* nits: glorious nits + friends
* backtester/orders: fix tests
* nits: glorious nits
* nits: glorious nits
* RMLINE
* nits: more glorious nits!
* nits: pooosh
* binance: fix margin logic
* nits: Add warning, settings log and report item for exchange order execution limits
* backtester: add specific warnings in report output
* backtest: Adjust warnings
* Updates starting and stopping routines to be a bit more parallel with less waiting required
* Removes stop, removes debugging output
* linting and test fixes
* Add extra kill switch for exiting on exchange loading delay
* Fixes fun math
* breaks loop instead of switch. Moves param warns higher
* Removes unceccary gos. passes in cfg to remove data race
* Removes os signal processing. Fixes bad master merge
* Backtester: event handler completed, basic back tester support is working
* Backtester: support for ticker data added, general code clean up, start of risk & size manageR
* Backtester: WIP
* Me: I am going to write tests and comment as I go this time, also me: doesn't write any tests or comments as i go
* Backtester: work on orderbook system to track orders, increased test coverage
* Backtester: further test coverage, output json, start of js chart output
* Backtester: test coverage, output strat name
* Backtester: WIP
* WIP backtest charts
* WIP on template
* Backtester: further test coverage added
* Backtester: WIP
* backtester: attempting easier to read template for backtesting output
* comments, and tests
* Backtester: end of day WIP started work on risk management for handling leveraged positions
* Backtester: WIP
* Backtester: started heavy documentation phase for handover
* Backtester: started heavy documentation phase for handover
* Backtester: further comments, also work on making chart solution modular to allow for usage outside backtester (e.g OHCLV data)
* Backtester: CHART LIBRARY
* Backtester: move backtester over to new chart library
* Backtester: removed old chart templates, template updates
* Chart: add advancedintervaldata, convert from stats -> chart
* Chart: gctscript hookup to generate chart from OHLCV data
* Chart: reworked template to load from generated data if no template path is set
* chart: template wip
* correclty generate backtester readme, readme generation for charts, chart data generation
* Removed old read file methods
* Removed chart library from backtest as its now standalone
* Remove reference to unfinish TA code. Removes value calculation from order signal. It belongs with portfolio signal
* regen
* Re-jiggles everything around to not have import cycle issues and makes it look like a normal application
* End of day commit creates a new function to setup a backtester from a settings struct. Doesn't work though lol
* Builds up more backtest work to allow to be run from the command line
* Regen RPC
* End of day mind mine field of RSI calculation5
* Finishes basic main.go application
* Minor updates while theorising
* Rearranging things like the size and data types. Adds portfolio setup like a normal human. Allows positions to be decimal based since this is for CRYPTOCURRENCIES :o
* Moves code around to related positions. Adds compatibility to ordermanager to handle order submission. Fails to do things
* End of day commit. Adding config based loading for indiviual strats. Attempting to allow for multiple cps per strategy as well as loading fees
* End of day commit. Expanding config definition and loading implementation. Attempting to setup backtester wide multi currency support in a strategy.
* Moves risk, attempts to revert multi currency, but also supports more in depth multi currency for later...... in the portfolio
* End of day commit for realsies. Updates the strat and sets the invalid backtester
* No more panics. Finishes config loading. Renames buyandhold to dollarcostaverage
* Extends strategy to include a reason why its performing an action. Adds 420blazeit.strat. Expands statistics output. Moves folders around some more. Reduces amount of processing when "DO NOTHING" is the direction
* Commit before home time. Looks to expand the order manager to cater to the backtester. Fleshes out risk manager to think about leverage and holdings in other currencies
* Some basic expanding of strategy definitions. Changes weird package naming.
* Expands size and risk validations. Expands config settings for the validation. Starts looking at loading from live data source
* Merge branch 'master' into backscratcher
* Work towards having backtester load data
* Adds support and tests for all data source loading except for LIVE
* Some basic additions looking to append to data streams instead of load all at once, for the purpose of live data analysis
* End of day commit where I broke functions
* Adds live backtesting
* Adds FANCY MATHS to correctly size orders before slippage. Rearranges minmaxing in config and strats
* Prints out initial settings. Creates a lame slippage calculator. Ensures that order price/amounts respect OHLCV data. Adds customisable config variables that can influence a strategy
* Fixes minor issues with rendering. Fixes portfolio buying and selling now
* ALL OVER THE PLACE END OF DAY COMMIT! In order to expand stats, thing must be tracked appropriately, which they arent. Here we add the addition of a compliance.go to track orders specifically. This will allow for the holdings manager to keep track of base stats such as how much we hold versus whats in use along with profits Compliance holds snapshots of every tick and what orders were there across exchanges. Also added a random slippage calculator which will allow a user to set their own slippage rates
* Another fun end of day commit where nothing works. In order to have accurate stats, you need accurate positions, to have accurate positions you need to break things down to individual levels and store them. This is part of that process of ensuring that we can have multiple settings and everything processed appropriately.
* Finalises multi currency config and support at most levels with exception to data loading.
Simplifies some struct property definitions by removing redundancy
Allows tracking of entire portfolio snapshots after each interval to track the entire process
Lowercases use of exchange names
* Sets the different prices to track across time. Attempts to sort out compliance snapshots
* end of day commit. Moving compliance to the portfolio to manager and track all transactions at each interval.
* Moves compliance calculation to portfolio.go. Adds a nice little decorator on the compliance manager orders to keep track of slippage, cost basis, volume adjusted price and close price. Moves "positions" to "hodlings" to be more accurate. Ensures exchange value calculations are accurate. Begins looking at Statistics and hodlings
* Moves statistics to eventhandlers. Removes ticker work as not needed. Redefines hodler properties
* hodlings are actually part of the portfolio
* Renamed 420blazeit.strat file. Renamed hodlings to holdings. Moved Datahandler to data_types.go. Expanded holdings calculations, doesn't work, but we're getting somewhere. Renamed bad var names in backtest.go. Added new order side types to highlight lack of action reasons
* Adds tests for holdings to ensure that holding snapshot calculation is accurate for the length of a strategy. Removes portfolio.Funds because its now handled via the holdings snapshots. Adds helper functions to Holding snapshots to retrieve relevant holdings. Updates sizing calculation to properly handle sell events. Expands holdings definitions to allow for comparison. Expands risk calculations to include holding snapshots so as to analyse all positions simultaneously
* Changing the statistics results to consider all datas, with the ultimate goal to replace the current statistics package with this multi currency output
* Made "Why" more generic. Expands statistics output. Removes time tying to stats map. Moves order event to correct location. Removes some debug lines.
* Adds some raw funky drawdown statistics 🎉
* End of day commit. experimentation leaves little code changes
* An attempt at expanding statistics. Need to have ones dedicated to exchange, asset, pair. Early work for having global map to track all the asset things to minimise all the maps throughout the application
* 🎉 ADDS MULTI CURRENCY SUPPORT TO FOR THE BACKTESTER 🎉 Can either execute strategies by assessing multiple currencies individually, or as a group and make strategic decisions on what currency to signal in. Adds new strat files to demonstrate
* End of day shenanigans. Moving codes around, making more fun stats. Expanding DCA strat to check if DCA is better than the market longer term
* Adds sharpe ratio and total stats for final output if more than one currency is considered
* Adds sortino ratio and test for validation
* Adds information ratio
* Adds calmar ratio
* Adds CAGR
* Slims down the statistics file to only include my work. Updates everything to use interfaces rather than direct code references to make it easier to swap out codes. Begins looking at serialising statistics for reports
* More neatening. Removal of old FAKE tests. Can now output a report in JSON
* End of day commit. Creation of reporting. Uses tradingview charting library and some basic bootstrap CDN to render content nicely. Will be updating everything to have a special kline item to annotate chart results
* Minor formatting changes before all the reviews
* End of day commit. Expands reporting to have an enhanced candle. These candles contain metadata on whether an order has been placed and to mark charts appropriately. This will be expanded to have all the stats and make it pretty
* Extra code I forgot to commit!
* Fixes an issue where data cannot render above 1,100 candles by stopping it from rendering more than that..
* End of day commit. There is no inclusivity with candle requests and I cant figure it out right now.
* Fixes issue with missing data by adding events when data isnt present and classifying it. Adds new way for klines to verify data with a bit more clarity
* Completes report generation
* Improves cagr. removes butts. Replaces old kline function with new supercalc
* Adds readme templates and files across whole backtester. Renames 420rsi to more appropriate name. Moves interfaces to common
* Some extra documentation
* New header
* Adds some nice coverage to backtest.go. Updats readmes to use new backtester header template
* End of day crappy test commit
* Adds report coverage... Somewhat. Adds template path and output path to allow custom properties and easier testing. Fixes interface duplication
* Adds some lame tests.
* Fixes test
* Adds coverage to the exchange event handler
* Minor test changes
* Fixes slippage calculations based on buying and selling. Adds more tests to compliance and holdings
* Rejiggles risk assessment to properly consider leverage if it were ever to be implemented fully. Removes bot dependency and adds coverage to the risk package
* Expands coverage to sizing
* Rejiggles code to add coverage for the portfolio package and its compatriots.
* Adds additional testing to the backtester along with some data gathering tests
* Tried and failed attempt to expand testing for the database.
* Adds testing for kline, data, statistics
* into the 70%s of coverage! Adds tests for base, DCA, statistics
* Adds test coverage of strategies
* Adds test coerage to statistics. updates template generation to not require CurrencyStatistics to have EAP. Removes EAP from currencystatistics
* Adds coverage to currencystatistics.go BUT ITS NOT COMPLETE
* 86% coverage wow. Fixes 2 tests
* Fixes data races due to engine dependency craziness. Changes order manager to not have a global dependency
* Completes currencystatistics test coverage
* Some linting fixes
* Adds new documentation to the bakctester config. Updates how risk leverage/ratios work with a single map.
* Minor documentation changes. Its difficult to describe how it all works
* Redefines strats and strat tests. Adds some really light documentation
* Updates some basic documentation.
* Fixes lazy bugs
* Fixes bug in fill event processing. Fixes bug in statistics crashing. Fixes report generation. Fixes multi-currency processing to still process non-errored signals
* More documentation.
* Fixes ALL LINTING ISSUES
* Cuts off unnecessary limbs/interface functions. linting. Adding comments to all functions. Adding ability to use whalebomb to calculate slippage for live orders. Adds testing for it too. Simplifies adding events to statistics.
* Removes a weird overlap of holding features that made no sense and the writer of those functions should be ASHAMED. Adds additional documentation
* Fixes issue with data being outside ranges. Adds some extra validation to areas where people can mess around. Makes generating configs easier with consistent dates. Adds more documentation. Cleans up okex/okcoin implementation to some functions since people aren't understanding that they share a based okgroup and that anything that is the same between two functions only needs to be written once...................... Also fixes some bad gct script code
* Updated image and slight change to readme
* Removes unused code. Fixes up verbose and removes old comment
* Fixes issues with data validation for other data sources. Fixes bad reference in template
* Fixes missing data problem for last candle considered missing. Fixes issue where fill order crashes when sizing error occurs. Adds documentation
* Fixes issue with drawdown calculations. Fixes live data usage
* Adds some comments for good measure
* Default strat fix
* Fixes surprise linting issues
* gofmt
* New linting issue with every commit
* Fixes testing. Adds new config setting to set a custom gocryptotrader config path. Updates config tests to use dryrun. Results now include the nickname in the file for easier identification
* Fixes live testing bitstamp. Fixes some template issues. Adds comments.
* Updates max drawdown calculation to go peak vs trough. Fixes minor return issue. Removes unnecessary Data implementations. Removes weird verbose false. Fixes holdings calculations for boughtvalue. Removes Swingholder and just uses Swing. Fixes time calculation issue in kline
* End of day commit that breaks things. Fixes issue with documentation generation only going one space deep. Adds exchange name to warnings of missing candle data. Renames missing candle data function. Adds some testing to kline functions. Adds new ability to size modified orders to portfolio allowance. Addresses defer close and other small nits. Fixes slow loop
* End of day commit. There are too many mini changes to list. DateType to int. Default switch case. Returning earlier. Nil returns instead of ok. High low price in data, now used in max drop down. Missing data shown in the report.
* End of day commit moving things from stats to maths.
* Move the rest to math package and add testing
* Ammends slippage calculations for live. Adds sizing funds to order event. Improves CAGR calculation
* Mini fix commit for test
* End of day mini change for documentation
* Fixes in documentation and expanded error messages. Pretties up the report
* minor adjustments to sharpe ratio and other ratio calculations
* Fixes test by taking it out back. linting
* Fixes tests
* Fixes some tests, addresses some poor nits
* More test and lint fixes
* Fixes binance translation issue
* Further craziness into reducing the concurrent test issues
* lint
* Mini fix
* Geometric average added and tested. Adjusts application to support it. End of day experiementation with negative geometric mean. Fixes typo in currencystatistics package name
* Fixes geometric calculation. Adds sweet CMD logo
* fixes geometric mean 😆 can now disable logo output if you hate everything good in life
* lint
* Should fix test in appveyor by not being nil
* Fixes chance of getting no trades error. Maybe making nil events in the test will stop this poorly formed appveyor error
* Forgotten Y tail
* Check-ch-check-check-check-ch-check it out, minimising stutter is what its all about... Also provides more verbose error messages
* de-ooopsies the whoopsie
* Attempts to further address race issues when using global logs during start stop process
* Includes a copy of the logger itself when logging so that no log.Debug action can create a data race upon being changed globally
* Reduces bot usage further
* Removes sharpie from b-acktester
* comments, renames and bears, oh my!
* Fixes git merge issues/tests. Splits average calculation into their own functions. Clarifies math function and sell position comments. Removes taker fee from final report. Adds warning when maker and taker aren't appropriately set. Fixes config testing issue where the config was saved when running exchange_template tests. Adds new test to ensure the testconfig isn't changed unnecessarily
* More why to reason
* Remove test due to hash discrepancy.
* Updates maths to use errors. Updates tests to support it.
* Fixes error handling for some packages. Uses position value instead of position size. Fixes leverage ratio work. Removes extra binance windows
* Removes references to "multi currency" to shiny new verbiage "simultaneous processing"
* Fixes issue with extra data be appended and then declared missing
* Removes redundant code via code removal
* Does a larger transition to using error types. Addresses math related nits
* eat a mint while you lint
* Completes err definition sweep
* replaces over 80 instances of the same typo!
* Renames more properties with Maximum ratios. Adds examples to config readme. Updates config maker takers. Adds cool kline error
* Adds 'InclusiveEndDate' config property to API and Database datas. Adds testing for it. Updates readme for it
* splint
* Minor naming fix. Minor drawdown fix. Attempts to lower the bot usage when heaps of candles are requested.
* Large data set processing improvements
* Speeds up backtesting processing. Ensures rate limits are set
Processing of most events is done in a linear fashion. So functions that
relied on checking an events time for example, will now check the latest
before processing every interval. The functions will still work normally
in the event that someone wishes to use them out of order, but for
general backtesting, it greatly speeds up all processing.
Further, rather than comparing times all the time, I've introduced
offsets for comparisons of ints for events and with candle data tests
* Fixes build issue
* Adds committed funds stat. Adds config goal
Committed funds are calculated as the total amount of money currently in position
It allows for a strategist to get the maximum returns for the smallest funds
The goal function is to allow a strategist to set a goal description
* Fixes data race
* Adds unfinished config builder application
* End of day broken commit
I focussed on too many things at once and there are many things left to resolve
* Fixees panics
* Finishes config builder
* Fixes order manager start/stop. Improves config manager
* Fixes writefile reference
* Adds some extra readme
* Makes a more user friendly config builder. Fixes initial nil. Adds more order size reasons
* lint
* Adds warnings for when data is missing and ratios will be skewed
* bodMISSED bodmas
* Does not consider initial entry in performance calculations
Adds strategy description field
Adds cost basis to chart
Fixes time rendering on default configs
* Fixes bug in ratio calculations
* saveConfig := !(!false != !true) == true
* lint
* Fixes start end single day drawdowns. Expands cmd drawdown explanation
* Comment on rounding, updated report rounding
* Addresses readme link issues
* Actually fixes readme references
* Should truly solve readme links....
* Includes filename for report log
* Fixes panics, reduces csv trade candle size, no more science
* Removes more science
* test123
* Adds extra config validation
* Fixes the date validation
* Shows smaller fees
* Changes perfectly cromulent error message to start >= end
Co-authored-by: Andrew Jackson <andrew@disvelop.net>
* Fixes issue where getorders could not work due to unset asset type in rpcserver.go. Adds test. Also adds start and end date to the cli.
* A few fixes
* lint
* fixes oopsie that affected doopsie
* Ensures dates are set for all open order implementations. Adds new filter to ensure orders without dates are returned rather than filtered. Fixes up Binance OpenOrders implementation. Adds some extra typeconverts for binance
* Add updated time to Binance GetActiveOrders. Update rpcserver.go to only set the time if its not empty. Also addressed bad expected value
* Actually fixes things this time
* Improves recvWindow to process openOrders
* Adds asset type to getOrder as well
* Fixes tests
* Adds missing date fields
* Fixes default time, updates default errors
* Default start to last month, instead of last year
* port orderbook binance management from draft singular asset (spot) processing add additional updates to buffer management
* integrate port
* shifted burden of proof to exchange and remove repairing techniques that obfuscate issues and could caause artifacts
* WIP
* Update exchanges, update tests, update configuration so we can default off on buffer util.
* Add buffer enabled switching to all exchanges and some that are missing, default to off.
* lbtc set not aggregate books
* Addr linter issues
* EOD wip
* optimization and bug fix pass
* clean before test and benchmarking
* add testing/benchmarks to sorting/reversing functions, dropped pointer to slice as we aren't changing slice len or cap
* Add tests and removed ptr for main book as we just ammend amount
* addr exchange test issues
* ci issues
* addr glorious issues
* Addr MCB nits, fixed funding rate book for bitfinex and fixed potential panic on nil book return
* addr linter issues
* updated mistakes
* Fix more tests
* revert bypass
* Addr mcb nits
* fix zero price bug caused by exchange. Filted out bid result rather then unsubscribing. Updated orderbook to L2 so there is no aggregation.
* Allow for zero bid and ask books to be loaded and warn if found.
* remove authentication subscription conflicts as they do not have a channel ID return
* WIP - Batching outbound requests for kraken as they do not give you the partial if you subscribe to do many things.
* finalised outbound request for kraken
* filter zero value due to invalid returned data from exchange, add in max subscription amount and increased outbound batch limit
* expand to max allowed book length & fix issue where they were sending a zero length ask side when we sent a depth of zero
* Updated function comments and added in more realistic book sizing for sort cases
* change map ordering
* amalgamate maps in buffer
* Rm ln
* fix kraken linter issues
* add in buffer initialisation
* increase timout by 30seconds
* Coinbene: Add websocket orderbook length check.
* Engine: Improve switch statement for orderbook summary dissplay.
* Binance: Added tests, remove deadlock
* Exchanges: Change orderbook field -> IsFundingRate
* Orderbook Buffer: Added method to orderbookHolder
* Kraken: removed superfluous integer for sleep
* Bitmex: fixed error return
* cmd/gctcli: force 8 decimal place usage for orderbook streaming
* Kraken: Add checksum and fix bug where we were dropping returned data which was causing artifacts
* Kraken: As per orderbook documentation added in maxdepth field to update to filter depth that goes beyond current scope
* Bitfinex: Tracking down bug on margin-funding, added sequence and checksum validation websocket config on connect (WIP)
* Bitfinex: Complete implementation of checksum
* Bitfinex: Fix funding book insertion and checksum - Dropped updates and deleting items not on book are continuously occuring from stream
* Bitfinex: Fix linter issues
* Bitfinex: Fix even more linter issues.
* Bitmex: Populate orderbook base identification fields to be passed back when error occurrs
* OkGroup: Populate orderbook base identification fields to be passed back when error occurrs
* BTSE: Change string check to 'connect success' to capture multiple user successful strings
* Bitfinex: Updated handling of funding tickers
* Bitfinex: Fix undocumented alignment bug for funding rates
* Bitfinex: Updated error return with more information
* Bitfinex: Change REST fetching to Raw book to keep it in line with websocket implementation. Fix woopsy.
* Localbitcoins: Had to impose a rate limiter to stop errors, fixed return for easier error identification.
* Exchanges: Update failing tests
* LocalBitcoins: Addr nit and bumped time by 1 second for fetching books
* Kraken: Dynamically scale precision based on str return for checksum calculations
* Kraken: Add pair and asset type to validateCRC32 error reponse
* BTSE: Filter out zero amount orderbook price levels in websocket return
* Exchanges: Update orderbook functions to return orderbook base to differentiate errors.
* BTSE: Fix spelling
* Bitmex: Fix error return string
* BTSE: Add orderbook filtering function
* Coinbene: Change wording
* BTSE: Add test for filtering
* Binance: Addr nits, added in variables for buffers and worker amounts and fixed error log messages
* GolangCI: Remove excess 0
* Binance: Reduces double ups on asset and pair in errors
* Binance: Fix error checking
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* pull previous changes
* linter issues fix
* updated query_order exmple in gctscript, fixed params check
* removed orderPair unnecessary conversion
* added wsCancelAllOrders, fixed bugs
* fixed Kraken wsAddOrder method
* cleanup
* CancelBatchOrders implementation
* changed CancelBatchOrders signature
* fixed tests and wrappers
* btcmarkets_test fix
* cleanup
* cleanup
* changed CancelBatchOrders signature
* fmt
* Update configtest.json
* Update configtest.json
* rollback configtest
* refactored Kraken wsHandleData to allow tests
* removed unnecessary error test in TestWsAddOrderJSON
* dependencies updates
* fixed issue with PortfolioSleepDelay set on startup
* add GetWithdrawalsHistory method to exchanges interface
* param name changes
* add extra params for Binance WithdrawStatus method
* add Binance TestWithdrawHistory
* add GetOrderInfo on Poloniex
* linter errors fix
* switch interface type to avoid panic
* Poloniex has no para errror in OrderbookResponse - removed, added seq param (incrementing sequence) for future use
* linter issues fix
* linter issues fix
* dependencies update
* add tests
* refactored unmarshalling of GetAuthenticatedOrderStatus response
* test fix
* linter issues fix
* unmarshaling logic moved to GetAuthenticatedOrderStatus
* forced Status setting on GetAuthenticatedOrderStatus error
* comment edited
Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* pull previous changes
* linter issues fix
* updated query_order exmple in gctscript, fixed params check
* removed orderPair unnecessary conversion
* added wsCancelAllOrders, fixed bugs
* fixed Kraken wsAddOrder method
* cleanup
* CancelBatchOrders implementation
* changed CancelBatchOrders signature
* fixed tests and wrappers
* btcmarkets_test fix
* cleanup
* cleanup
* changed CancelBatchOrders signature
* fmt
* Update configtest.json
* Update configtest.json
* rollback configtest
* refactored Kraken wsHandleData to allow tests
* removed unnecessary error test in TestWsAddOrderJSON
* dependencies updates
* fixed issue with PortfolioSleepDelay set on startup
* add GetWithdrawalsHistory method to exchanges interface
* param name changes
* add extra params for Binance WithdrawStatus method
* add Binance TestWithdrawHistory
* linter errors fix
Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* pull previous changes
* linter issues fix
* updated query_order exmple in gctscript, fixed params check
* removed orderPair unnecessary conversion
* added wsCancelAllOrders, fixed bugs
* fixed Kraken wsAddOrder method
* cleanup
* CancelBatchOrders implementation
* changed CancelBatchOrders signature
* fixed tests and wrappers
* btcmarkets_test fix
* cleanup
* cleanup
* changed CancelBatchOrders signature
* fmt
* Update configtest.json
* Update configtest.json
* rollback configtest
* refactored Kraken wsHandleData to allow tests
* removed unnecessary error test in TestWsAddOrderJSON
* dependencies updates
* fixed issue with PortfolioSleepDelay set on startup
Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce
* return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo
* removed the Binance extra method GetClosedOrder
* func description corrected
* removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side
* GetClosedOrder implementation moved to GetOrderInfo
* changed GetOrderInfo params
* removed Canceled order.Type used for Kraken
* update QueryOrder in gctscript
* add missed params to QueryOrder validator (gctscript)
* fixed testing issues
* pull previous changes
* linter issues fix
* updated query_order exmple in gctscript, fixed params check
* removed orderPair unnecessary conversion
* added wsCancelAllOrders, fixed bugs
* fixed Kraken wsAddOrder method
* cleanup
* CancelBatchOrders implementation
* changed CancelBatchOrders signature
* fixed tests and wrappers
* btcmarkets_test fix
* cleanup
* cleanup
* changed CancelBatchOrders signature
* fmt
* Update configtest.json
* Update configtest.json
* rollback configtest
* refactored Kraken wsHandleData to allow tests
* removed unnecessary error test in TestWsAddOrderJSON
* dependencies updates
Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>