Code Monkey home page Code Monkey logo

binance-php-trader's Introduction

Binance PHP Trader

Experimental bot for auto trading on the Binance.com exchange written in PHP with Tradingview Technical analysis and Telegram notifications.

Requirements

  • PHP
  • PHP Curl
  • Composer
  • GIT

Installation

Requirements (Ubuntu)

$ sudo apt-get update & apt-get upgrade
$ sudo apt-get install git php php-curl
$ wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet

Binance PHP Trader

$ git clone https://github.com/andrejtrcek/binance-php-trader.git
$ cd binance-php-trader
$ composer install

Configuration

  1. Signup for Binance
  2. Enable Two-factor Authentication
  3. Go API Center and Create a New Api Key
  4. Modify configuration parameters inside trader.php

Configuration parameters

Required

primary: The cryptocurrency Trader buys (ex. BTC, ETH, LTC, ...)

secondary: The cryptocurrency Trader sells (ex. BTC, USDT, ...)

binance/key: Binance API key

binance/key: Binance API secret

digits/price: Number of digits for price determined by the exchange (ex. ETH: price = 2)

digits/quantity: Number of digits for quantity determined by the exchange (ex. ETH: quantity = 5)

Optional

tradingview/period/buy: Tradingview period to fetch for a BUY order (ex. 1, 5, 15, 60, ...)

tradingview/period/sell: Tradingview period to fetch for a SELL order (ex. 1, 5, 15, 60, ...)

tradingview/url: Tradingview URL Endpoint

tradingview/margin: Determine if the currency is for buying or selling (strong sell = <-0.5, sell = -0.5-0, buy = 0 - 0.5, strong buy = 0.5>)

telegram/token: Telegram bot token for notifitations (if empty, Telegram bot does not work)

telegram/token: Telegram Channel ID

trendNum/buy: Number of trades to count as trend for a BUY order

trendNum/sell: Number of trades to count as trend for a SELL order

tradeMin: Min. amount of secondary currency determined by the exchange to trade

tradePercentage: Amount (in percentage) of secondary cryptocurrency to trade

tradePrice: Trade price difference from market price (in percentage)

orderRepeat: Max. amount of cycles per single buy/sell order

stop/loss: Max. loss in percentage

stop/gain: If price starts dropping, sell only if min. this much gain (in percentage)

sleepTime: Time (seconds) between two loops

Usage

$ php trader.php

DISCLAIMER

I am not responsible for anything done with this bot. You use it at your own risk. There are no warranties or guarantees expressed or implied. You assume all responsibility and liability.

Author

Andrej Trcek

Web: http://www.andrejtrcek.com

E-mail: [email protected]

License

Code released under the MIT License.

binance-php-trader's People

Contributors

andrejtrcek avatar

Watchers

 avatar

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.