Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
greedy_cli
Advanced tools
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
npm i -g greedy_cli
If you don't have npm
on your machine, install Node.js
Open a terminal and type greedy
to launch Greedy
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 : …
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
Parameter | Description |
---|---|
Layered bids / Market | As 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 loss | The 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 bids | Layered bids only. Limit orders will be spread across this price range. |
# of layered bids | Layered 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 profits | Optional. 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.
FAQs
CLI for crypto traders
The npm package greedy_cli receives a total of 0 weekly downloads. As such, greedy_cli popularity was classified as not popular.
We found that greedy_cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.