This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 262
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nikhilsaraf
suggested changes
Oct 2, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, minor change suggested inline.
cmd/trade.go
Outdated
@@ -70,6 +70,25 @@ func init() { | |||
} | |||
log.Printf("Trading %s:%s for %s:%s\n", botConfig.ASSET_CODE_A, botConfig.ISSUER_A, botConfig.ASSET_CODE_B, botConfig.ISSUER_B) | |||
|
|||
//Add current strategy to the log | |||
var strat_display string | |||
switch *strategy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do without the switch-case to keep it simple. Just use *strategy instead directly in the log statement.
I've made the requested change, makes sense. |
nikhilsaraf
approved these changes
Oct 2, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the changes, lgtm!
Reidmcc
added a commit
to Reidmcc/kelp
that referenced
this pull request
Oct 2, 2018
* cap3: 1 - implement liabilities for XLM * cap3: 2 - integrate liabilities into willOversell and willOverbuy methods * cap3: 3 - remove fractionalReserveMultiplier cli arg * cap3: 4 - offers in the same tx will contribute to liabilities, incorporate into cachedLiabilities * cap3: 5 - handle case of setting incrementalBuy for native asset * cap3: 6 - refactored willOversell and willOverbuy to extract common offer logic * cap3: 7 - added support for checking XLM fee and min reserves * cap3: 8 - update ordering of operations in strategies (sellSideStrategy, mirrorStrategy) when not all offers can be placed — always place inside orders first * cap3: 9 - native fee inclusion checks source/trader account usage * cap3: 10 - delete offer if nothing was created and we were planning to modify an existing offer * cap3: 11 - prepend deleteOps so we "free" up our liabilities capacity to place the new/modified offers * cap3: 12 - better error propagation from sdex.createModifySellOffer * cap3: 13 - extracted liability updates after placing/modifying offers to callers in sellSideStrategy and mirrorStrategy * cap3: 14 - prepend deleteOps for mirror strategy too * cap3: 15 - log liabilities in trader.go after resetting and after updating ops * cap3: 16 - add liabilities in mirror strat * cap3: 17 - added support for partial offers in sellSideStrategy, refactored updateSellLevel * cap3: 18 - updated comment when resetting cached liabilities * cap3: 19 - add current offer amounts to liabilities when not modifying an offer * cap3: 20 - add a caching layer for asset balances to reduce requests * cap3: 21 - cleaner logging of asset balance and trust amounts * cap3: 22 - let new capacity constraint system handle max limits for sellSideStrategy * cap3: 23 - reset caches before pruning and updating operations * cap3: 24 - update CHANGELOG * new release: v1.0.0-rc2 * expand assets allowed to use with the Kraken exchange, fixes stellar-deprecated#13 * new release: v1.0.0-rc3 * remove default rate offset percent from sample strategy config files * Print strat (stellar-deprecated#15) * Update trade.go * Update trade.go * Update trade.go * enable Travis CI, closes stellar-deprecated#17 (stellar-deprecated#18) * enable Travis CI * go_import_path * travis: ./bin/kelp version * doc clarify full path needed for configs (stellar-deprecated#16)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add current strategy to the log for later analysis. Change is to address issue #8