Skip to content

CryptoNawwa/nawwa_scalper_terminal

Repository files navigation

nawwa-scaler-terminal-image

This CLI is a textual UI (TUI) terminal tool, it's goal is to automate certain action when you are trading / scalping, aka : place scale orders, auto-limit order, cancel orders, shortcuts..

This repository is a re-write of the previous tool I made (nawwa-scalper-tool) which was written in Python (meh).

This version is fully written in Typescript 🚀 and support the following exhanges:

  • Binance ✅
  • Bybit ✅

Note: The code was made so it's easy for a developer to implement any new exchange

Socials & Tip Jar

Twitter : @crypto_nawwa
Discord : Nawwa#8129
TIP JAR erc-20 : 0xc44823Cda133B49cb7F91B5cFa517FA76d3Ae561

Demo

Auto take profit system on Binance

atp_command_example.mp4

Switch between Binance & Bybit

switch_command_example.mp4

Features

  • Bybit & Binance support
  • Easy switch between exchanges
  • Display current active ticker & active exchange in terminal UI
  • Place scale reduce-only limit orders based on .% range away from entry
  • Place 1 (one) reduce only limit order, based on .% away from entry
  • Automatic take-profit system, on activation, the terminal will automatically place pre-configured scale or single order(s) whenever it detect a new position, on ANY symbols you trade
  • Cancellation of recent orders
  • Create/Update shortcuts (shortcuts are alias for your commands)
  • CLI history (press up and down arrows)
  • CLI autocomplete (press tab)

What I'm working on

Feel free to suggest anything

How to install

Standalone app ready to run

You can download the nawwa-scalper-terminal app directly from here :

Demo on how to install the app on windows:

nawwa_scalper_terminal_install_demo.mp4

Extra Steps on Windows

Strongly recommended : Install the terminal called Windows Terminal , the nawwa-scalper-terminal has some cool emojies and colors, they might not work in basic terminal.

To launch the nawwa-scalper-terminal:

  • Just double click the app
  • However, if it opens and closes real quick :
    • then open a cmd (terminal) window, and drag nawwa-scalper-terminal-win.exe and drop it into the black of the cmd (terminal) window
    • can also open cmd window and type: cd Desktop (or wherever you put it) and then type: nawwa-scalper-terminal-win.exe to run it.

Extra Steps on MacOS or Linux

If you are familiar with our beloved friend Ichibot, this is just like it, I will shamelessly copy-past some of his instructions :

Open a terminal and and navigate to wherever you put the nawwa-scalper-terminal

  • cd Downloads (Or whatever directory nawwa-scalper-terminal is in)
  • chmod +x nawwa-scalper-terminal-macos or for linux :
  • chmod +x nawwa-scalper-terminal-linux

Then:

  • just double click on the app to launch
  • alternatively, type in your terminal: ./nawwa-scalper-terminal-macos or for linux:
  • type: ./nawwa-scalper-terminal-linux

Build from source yourself

I will detail this more in the futre, for the moment you can do:

That's it ! To run the project in the future :

  • cd nawwa-scalper-terminal
  • yarn start

Shortcuts / Aliases

To add / remove shortcuts, open the shortcuts.json file located next to the app.

Shortcut file syntax is :

{
  "name_of_shortcut": "command",

  "name_of_shortcut_2": "command"
}

Example of a shortcut file :

{

"s1": "scale 5 0.01 0.03",

"s2": "scale 5 0.02 0.04",



"tp1": "tp 0.1",

"tp4": "tp 0.3",



"atp4": "atp ON tp4",
"atp4": "atp ON s1",


"t": "ticker",
"p": "positon",
"bb": "connect bybit",
"bn": "connect binance"

"sol": "ticker sol",
"eth": "ticker eth",
"btc": "ticker btc"

}

Pretty simple:

  • when you type bb in the terminal, it will execute connect binance
  • when you type t btc in the terminal, it will replace t by ticker and execute ticker btc
  • when you type atp4 in the terminal, it will execute atp ON tp4

You can add / update aliases and shortcut directly from the terminal, see the shortcutcommand info below, or type help shortcut in the terminal

Note : Shortcut are used by the atp command, see later.

Availables commands

  • help
  • connect
  • disconnect
  • switch
  • scale
  • atp
  • position
  • shortcut
  • cancel
  • ticker

You can type help in the app and it will display the list of all available commands and how to use it.

If you want to see more detail about a certain command you can type help <command_name> and it will display a detailed description with examples :

> help scale
Usage:
- scale <nb_of_order> <from_%> <to_%>

Examples:
- 'scale 10 0.1 0.2' -> Will create 10 reduce-only orders on the active ticker, from 0.1% to 0.2% away from the entry price
- 'scale 2 0.5 0.8' -> Will create 2 reduce-only orders on the active ticker, from 0.5% to 0.8% away from the entry price

connect [binance | bybit]

This command will connect to the given exchange

> connect binance

or

> connect bybit

Whenever there is no bybit-api.json or binance-api.json file, the terminal will ask you to enter your API and secret keys, it will then store the keys in a file.

Next time you use the command it will automatically use the keys from the file and connect to the exchange.


disconnect

This command will disconnect from the current active exchange

> disconnect

The current active exchange is displayed in the terminal, using disconnect will disconnect the terminal from that exchange


ticker [ticker_name]

This command switch the active ticker to a new one

> ticker ethusdt

or

> ticker eth

In this example, the command set the active ticker to ETHUSDT

The current active ticker is displayed on your terminal

Note : You will need to have a ticker selected to execute certain command


scale [nb_of_order] [from_%] [to_%]

This command create [nb_of_order] reduce-only limit order(s) on the active ticker, from [from_%] above entry price to [to*%] above entry price (or below if short)

> scale 10 0.1 to 0.2

In this example, it will create 10 orders from 0.1% to 0.2%

Note : For this command to work you need to have an open position on the active ticker


tp [away_from_entry_%]

This command create 1 (one) reduce-only limit order on the active ticker, from [away_from_entry_%] above entry_price (or below if short)

> tp 0.4

In this example, it will create 1 order from 0.4% away from entry price

Note : For this command to work you need to have an open position on the active ticker


cancel

This command cancel the recent limit orders, for the current active ticker

> cancel

switch [bybit | binance]

This command will switch the current active exchange

> switch binance

Will switch current active exchange to Binance

> switch bybit

Will switch current active exchange to Bybit


position [action]

Available actions:

  • refresh

This command list the current opened position for the current exchange, stored in the terminal

> position

Will list the current stored positions.
Positions are gathered using Websockets, every time you enter a position the terminal will add it to the position list

> position refresh

Adding the refresh action will force the terminal to call the current active exchange and refresh the position list


shortcut [action] [shortcut_name]=[shortcut_value]

This command will execute the given [action] with [shortcut_name] and [shortcut_value] as parameter

This command is usefull to add / modify shortcuts Available actions:

  • ADD
> shortcut ADD tp10=scale 4 0.5 0.9

In this example, a shortcut named tp10 will be added to the shortcuts.json file, with the shortcut value being scale 4 0.5 0.9

Assuming the file was empty, after this command it will look like this :

{
  "tp10": "scale 4 0.5 0.9"
}

Now, when you type tp10 in the terminal, it will execute scale 4 0.5 0.9


atp [atp_action] [shortcut_name]

This command will execute the given [atp_action] with [shortcut_name] as parameter

Actions availabe :

  • ON

  • OFF

  • STATUS

atp command (for automatic take profit) will automatically set reduce-only limit orders based on the shortcut config you gave him.

⚠️ Once it's ON , the atp system works for all the positions you enter, on every pair.
It means that if you take a trade on another pair, it will place the limit order(s), it's not only related to the current active ticker (might change that later if it's a problem / or a request)

ON example

Consider we have the following shortcut file :

{
  "tp1": "scale 10 0.1 to 0.2"
}
> atp ON tp1

This will activate the atp system with the shortcut tp1 as limit order config

It means, if we enter a position on any coin, the bot will execute scale 10 0.1 to 0.2

  • It will automatically set 10 limit orders from 0.1 to 0.2 each time you enter a position

Note : Obviously, only use scale or tp shortcuts for atp command Note : Shortcuts needs to be defined in the file located shortcuts.json Note : To update a atp shortcut, use the ON action again

OFF example

> atp OFF

This will disable the atp system

STATUS example

> atp STATUS

This will print the current status (ON / OFF)

Support

If you need any help, follow & dm me on twitter crypto_nawwa or add me on Discord Nawwa#8129

Disclaimer

Downloading and using this bot is at your own risk, you take full responsibility and if you lose money it's your own fault. I recommend using it on a test account first.