1.4.0 • Published 3 years ago

greedy_cli v1.4.0

Weekly downloads
-
License
GPL-3.0-or-later
Repository
-
Last release
3 years ago

Commitizen friendly Build

Greedy

Greedy is a command-line tool allowing crypto traders to plan and execute risk-managed trades on FTX. With Greedy you can:

  • Layer your bids: define your entry range and maximum risk, Greedy will generate orders that spread accross your entry range to optimize your fills

  • Manage your risk: Greedy gives you a clear view of your trade's potential PnL and R:R before sending orders

Installation

npm i -g greedy_cli

If you don't have npmon your machine, install Node.js

Usage

Open a terminal and type greedy to launch Greedy

Adding an account

Greedy needs to be connected to an exchange. You will need to get your API keys from your FTX dashboard. Once you have them, launch Greedy, select Manage accounts -> Add account and fill the form:

✔ Choose an exchange: · ftx
✔ Is it a sub-account? (y/N) · false
? Please fill in API key and secret:
⊙  Account name :
⊙       API key : …
⊙    API secret : …

Creating a setup

Launch Greedy, select New setup, choose your pair and your bias.

✔ Pair? · BTC-PERP (BTC-PERP)
✔ Bias? · Long / Short
✔ Order types? · *Layered bids* / Market

Latest BTC-PERP price: 36925

? Fill this:
⦿  # of layered bids : 5     (Layered bids only)
⦿          Stop loss : 35000
⦿           Max loss : 1000
⦿       Maximum bid? : 36300 (Layered bids only)
⦿       Minimum bid? : 36000 (Layered bids only)
⦿        TP #1 price : 40000
⦿            TP #1 % : 30
⦿        TP #2 price : 45000
⦿            TP #2 % : 20
⦿        TP #3 price : 50000
⦿            TP #3 % : 30
⊙        TP #4 price : 0
⊙            TP #4 % : 0
ParameterDescription
Layered bids / MarketAs the name suggests, when selecting Layered bids you will get to choose the entry range and When selecting Market Greedy will just send a market order.
Max loss / stop lossThe maximum loss (generally in USD) and the stop loss will be used to size your position and set the quantities in orders. Stop loss orders are triggered market orders and reduce only (they will never increase your position).
Maximum/Minimum bidsLayered bids only. Limit orders will be spread across this price range.
# of layered bidsLayered bids only. The number of bids you want to place. Greedy will then spread your orders across your entry range. By choosing a higher number of bids you optimize your chances of getting filled as the price travels through your entry range.Note: if you trade small sizes and set too many orders the order quantity might fall under the minimum quantity required by the exchange.
Take profitsOptional. You can define up to 4 take profit levels. Each TP must have a price and a percentage.

Once your setup is ready, type Enter to preview the orders. They will not be sent yet.

┌──────────┬────────┬─────────────┬────────┬───────┬────────┬──────────────┬──────────────┐
│ Pair     │ Side   │ Type        │ Amount │ Price │ Status │ Realized PnL │ Potential RR │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  SELL  │ stop_loss   │ 0.8695 │ 35000 │        │ -999.925     │              │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  BUY   │ limit       │ 0.1739 │ 36000 │        │              │              │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  BUY   │ limit       │ 0.1739 │ 36075 │        │              │              │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  BUY   │ limit       │ 0.1739 │ 36150 │        │              │              │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  BUY   │ limit       │ 0.1739 │ 36225 │        │              │              │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  BUY   │ limit       │ 0.1739 │ 36300 │        │              │              │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  SELL  │ take_profit │ 0.2608 │ 40000 │        │ 1004.08      │ 3.35         │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  SELL  │ take_profit │ 0.1739 │ 45000 │        │ 2543.10      │ 7.70         │
├──────────┼────────┼─────────────┼────────┼───────┼────────┼──────────────┼──────────────┤
│ BTC-PERP │  SELL  │ take_profit │ 0.2608 │ 50000 │        │ 7159.25      │ 12.04        │
└──────────┴────────┴─────────────┴────────┴───────┴────────┴──────────────┴──────────────┘
? What do you want to do? …
Send orders
Make changes
New setup

You can review the orders that Greedy prepared. Prices and quantities are adjusted to the precision settings of the contract on the exchange.

The PnL at every take profit level only accounts for what is realized. In the above example, when you take partial profits at 40000, 1004.08 is the realized profit calculated on the portion you sold (0.2608 BTC-PERP) and not the remainder of your position.

You can then make changes or proceed and send your orders.

1.4.0

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.2-alpha.1

3 years ago

1.2.2-alpha.3

3 years ago

1.2.2-alpha.2

3 years ago

1.2.2

3 years ago

1.2.2-alpha.14

3 years ago

1.2.2-alpha.9

3 years ago

1.2.2-alpha.13

3 years ago

1.2.2-alpha.8

3 years ago

1.2.2-alpha.12

3 years ago

1.2.2-alpha.11

3 years ago

1.2.2-alpha.10

3 years ago

1.2.2-alpha.5

3 years ago

1.2.2-alpha.4

3 years ago

1.2.2-alpha.7

3 years ago

1.2.2-alpha.6

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.0.0

3 years ago

1.1.0

3 years ago