Skip to content

Simple Binance Trader as a Telegram Bot with TakeProfit and Stoploss Trades (exact number or percentage) feature

Notifications You must be signed in to change notification settings

PSS1998/Binance-Trader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Binance-Trader

This is a Simple Binance Trader as a Telegram Bot.
With TakeProfit and Stoploss Trades using OCO type of trades.
For TakeProfit and Stoploss you can either use the exact value or you can use percentage.
You can also get your balance and use the bot for simple market and limit buy and sell orders.

How to install and use:

  1. To begin, you'll need an Access Token for your telgram bot that you can make using BotFather. then you need your API keys frm binance. be sure to turn withdrawal option off.

  2. First install some dependencies: Best way is use Virtualenv:

virtualenv -p python3 .env
source .env/bin/activate
pip install -r requirements.txt
  1. After create your bot and get your Token from botFather, send some text(more than two message) to your bot and use this command to find your chat_id: use @userinfobot bot to get your chat_id by sending /start to bot. Put your chat_id and Token and Binance's API keys in config.

  2. Run code:

python telegramBot.py
  1. Send you command via Telegram's Bot

Sample of commands to use:

/start : to start using the bot
/ping8 : to send ping and check your connection
/help : to get list of all the possible commands

the rest of the commands:
Buy_market --market market --quantity quantity
Sell_market --market market --quantity quantity
Buy_limit --market market'] --quantity quantity --rate rate
Sell_limit --market market'] --quantity quantity --rate rate
Get_open_trades --market market
Cancel_order --market market --orderID orderID
Get_balance --symbol symbol
Get_market_price --market market
Sell_OCO_order --market market --quantity quantity --takeProfitPrice takeProfitPrice --stopLimit stopLimit --stopLossPrice stopLossPrice
Trade --market market --quantity quantity --takeProfitPrice takeProfitPrice --stopLossPrice stopLossPrice
Trade_pct --market market --quantity quantity --takeProfitPct takeProfitPct --stopLossPct stopLossPct
Transfer_dust --symbol symbol

*you can also use amount of BTC instead of quantity (--amount amount)
*for get_balance market argument is optional. default value is BTC
*if you dont use amount or quantity minimum quantity will be used
*for Trade you can add multiple targets separating them with comma

example:
Get_balance --market BTC
Trade --market ETHBTC --quantity 0.005 --takeProfitPrice 0.038 --stopLossPrice 0.036
Trade_pct --market ETHBTC --quantity 0.005 --takeProfitPct 1.2 --stopLossPct 2

About

Simple Binance Trader as a Telegram Bot with TakeProfit and Stoploss Trades (exact number or percentage) feature

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages