Git Product home page Git Product logo

binance-trader's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.