Skip to content

Bot created in Python that connects to Binance API for automated trading

Notifications You must be signed in to change notification settings

msochan/Binance-API-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Binance API connection demo

This repo contains example usage of Binance API using python-binance wrapper.

Main idea behind this was not to build outstanding bot with excellent profitable strategy, but just to show a way of connection to the Binance API.

Strategy in this example is implemented with the most basic RSI indicator and it's using overbought/oversold pattern to place orders.

Please remember then that if you do use this strategy on the real market it is at your own risk.


Usage instructions

Install required dependencies:

$ pip install -r requirements.txt

Enter your API_KEY and API_SECRET into config.py file:

API_KEY = ""
API_SECRET = ""

Optionally you can change parameters of the strategy and desired instrument in config.py:

SOCKET = "wss://stream.binance.com:9443/ws/dogeeur@kline_1m"
# RSI parameters
RSI_PERIOD = 14
RSI_OVERBOUGHT = 70
RSI_OVERSOLD = 30
# Instrument details
TRADE_PAIR = ("DOGE", "EUR")

Run in the terminal:

$ python3 main.py

Links

Binance API docs

About

Bot created in Python that connects to Binance API for automated trading

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages