* 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
* Exchanges: enrich order history with avg executed price, cost, and more
* Fix division by zero in order detail enrichment
* Remove DateCompleted from Bithumb OrderData and fix OrderDate parsing
* Fixes on order detail fields and rename EnrichOrderDetail to CalculateCostsAndAmounts
* BTSE order history populate name and id
* Calculate average executed price for market order or when order amount is zero
* Minor fixes on infer order amounts, costs, and times
* Attach InferAmountsCostsAndTimes to Order.Detail
* Binance: fix order status
* Always use order.StringToOrderStatus() and ensure order has at least one of executed/remaining amount set
* Allow configuration of orderbook publish period
For some applications that import GCT it's more interesting to be
immediately notified of an exchange orderbook update instead of
only getting notified every 10 seconds. This option allows that
to happen while keeping the previous default.
* exchanges: allow configuration of orderbook update period
* Kraken futures: fix requests signature calculation
* Kraken futures: fix error return of SendOrder
* Kraken futures: fix order id json field name
* Kraken Futures: ensure uppercase instrument names
* Kraken Futures: add support for immediate or cancel type orders
* 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
* bitmex: normalize account info currencies
Bitmex has an interesting way of returning BTC balances, it returns them
as XBt and denominated in Satoshis instead. Normalize that still in the
bitmex wrapper by performing the conversion and returning the normal use
BTC currency.
* Change NW contract to NQ
Co-authored-by: Adrian Gallagher <adrian.gallagher@thrasher.io>
* FTX: Add missing fields for FutureData type NOTE: Use f.GetFutures(context.Background()) to test.
* ftx: Add missing field for FillsData
* ftx: Add UnderlyingDescription field to Futures Data type
* huobi futures: GetSwapAccountInfo argument is optional
* huobi futures: fetch main account data as well
* huobi futures: shut linter up
Old warnings not introduced in this scope.
* Remove settled from Coinbase Pro order history status
* Get Coinbase Pro order history without restricting currency pair and include price
* Add empty and nil pairs scenario for TestGetOrderHistory
* Include fee and fee asset in Coinbase Pro history order
* 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
* add account.Balance.Available() method that returns the amount of an asset not locked/held
* account: comment Balance.Available()
* account: test Balance.Available()
* websocket: select case error if no receiver, add in functionality to reset to initial sync for books on a new websocket connection
* websocket: fix tests
* websocket: log error instead of losing it
* websocket: fix whoopsie
* exchanges: fix test
* websocket: force requirement of specific functionality
* exchanges: fix tests
* exchanges/websocket: move waitgroup add before scheduling across exchanges
* gateio: add feature subscribe
* bithumb/bittrex: include connection state reset, fix reconnection bug for Bithumb
* huobi: Add listen to shutdown to routine so it actually returns and stops being a naughty boy.
* huobi: add missing waitgroup add.
* exchanges: bleed comms channels
* binance: fix reconnection bug with buffer
* bithumb: fix reconnection bug with ws orderbook when websocket is diabled/enabled
* bithumb/bittrex: add bleeders for ws orderbook jobs
* linter: fix
* kraken: reduce code block from double assertion
* This bug ruined my day.
* glorious: error checking
* zb: add correct path for websocket connection
* exchange: Add verbosity when config conflicts and overwrites default values
* zb: add https to path
* exchanges: glorious nits
* stream: Add checkAndSetMonitoring to reduce potential routine bundling, increase timeout and check state in tests
* stream: remove check that is not needed.
* glorious: nits addr.
* lint: test
* golangci: Enable err checking linter to expose unchecked errors.
* gct: handle errors across the board
* gct: handle errors NOTE: Found bug in FTX (WIP)
* linter: fix issues
* ftx/exchanges: fix bug where error was being returned when setting pair management variables to an already enabled state
* bitmex: fix bug where a dangly supported asset in config danglied up the place.
* linter: fix more linter issues
* linter: fix my terrible spelling.
* currency: fix test
* exchanges: fix tests
* logger: fix test
* exchanges: fix tests
* glorious: nits
* vm: revert rm variable and instigate test
* exchanges: add an UpdateTickers method to the main exchange interface
This method will fetch all currency pair tickers of a given asset type
and update them internally, does nothing for now.
* exchanges: refactor UpdateTicker on all exchanges
Keep the exact previous behaviour but implement the UpdateTickers
method and refactor UpdateTicker by using it where applicable.
* sync_manager: update all tickers when batching is enabled
* binance: UpdateTicker to fetch single ticker symbol
* ftx: UpdateTicker to fetch single ticker symbol
* Fix Bitstamp pair handling
* Fix spelling
* Populate namerinos
* Address nitterinos
* Revert trade currency code, introduces races between engine / this and rely on OB test instead
* One liner
* 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
* docs: initially commit WS_TRADE_UPDATES.md
* docs/WS_TRADE_UPDATES: shorter text
* docs: rename WS_TRADE_UPDATES to WS_ORDER_EVENTS as that is more descriptive of what it documents
* docs/ADD_NEW_EXCHANGE: reference the newly added WS_ORDER_EVENTS file
* WS_ORDER_EVENTS: common terminology
* WS_ORDER_EVENTS: turn the code segment into a markdown table
* WS_ORDER_EVENTS: AverageExecutedPrice is now not mandatory
* exchanges/README: link to WS_ORDER_EVENTS