Skip to content

Commit

Permalink
Add btd mode (#21)
Browse files Browse the repository at this point in the history
* Start working on btd

* reorg code

* commit to share

* POC of buy the dip

* USe whole value of budget

* Remove dedicated DollarDipsAverage stuff, will just reuse the buy the dips mode

* Add support for price modifier

* Use updated version of OHLC api

* Change min btc amount

* Fix min amount on btd

* Revert to upstream library now that my change is merged

* Add todo-to-isse
  • Loading branch information
primeroz committed Feb 27, 2021
1 parent b462797 commit db77283
Show file tree
Hide file tree
Showing 6 changed files with 527 additions and 164 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/on-push-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v2

- name: "TODO to Issue"
uses: "alstr/[email protected]"
id: "todo"
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
LABEL: "// TODO"
COMMENT_MARKER: "//"
CLOSE_ISSUES: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v2

Expand Down
10 changes: 7 additions & 3 deletions exchange/exchange.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
package exchange

import "github.com/urfave/cli/v2"

// Exchange is an interface that would allow for different implementations of exchange to be used
type Exchange interface {
Config(apiKey string, secretKey string) (err error)
Stack(amount float64, fiat string, orderType string, dryRun bool) (result string, err error)
Withdraw(address string, maxFee float64, dryRun bool) (result string, err error)
Config(c *cli.Context) (err error)
Init(c *cli.Context) (err error)
Stack(c *cli.Context) (result string, err error)
BuyTheDips(c *cli.Context) (result string, err error)
Withdraw(c *cli.Context) (result string, err error)
}
Loading

0 comments on commit db77283

Please sign in to comment.