Git Product home page Git Product logo

binance-p2p-rate-fetcher's Introduction

Binance P2P Rate Notifier

Table of Contents

Overview

The Binance P2P Rate Notifier is a Python script that automates the process of fetching the Binance P2P exchange rate for Naira (BTC to NGN) and sending a notification via Twilio SMS. It uses the Selenium web scraping library to retrieve the exchange rate from the Binance website and the Twilio API to send SMS notifications.

Getting Started

Prerequisites

Before running the script, you'll need to have the following:

  1. Python 3 installed on your system.

  2. Chrome web browser installed.

  3. ChromeDriver installed and its path set correctly in the script (chrome_driver_path).

  4. Binance API key and secret for web scraping.

  5. Twilio Account SID and Auth Token for sending SMS notifications.

Installation

  1. Clone this repository to your local machine:

    bashCopy code

    git clone https://github.com/yourusername/binance-p2p-rate-notifier.git

  2. Navigate to the project directory:

    bashCopy code

    cd binance-p2p-rate-notifier

  3. Create a virtual environment (optional but recommended):

    bashCopy code

    python -m venv venv

  4. Activate the virtual environment:

    • On Windows:

      bashCopy code

      venv\Scripts\activate

    • On macOS and Linux:

      bashCopy code

      source venv/bin/activate

  5. Install the required Python packages:

    bashCopy code

    pip install -r requirements.txt

Usage

  1. Set up the necessary environment variables by creating a .env file in the project directory with the following content:

    plaintextCopy code

    ACCOUNT_SID=your_twilio_account_sid AUTH_TOKEN=your_twilio_auth_token

  2. Edit the chrome_driver_path variable in the Python script to point to your ChromeDriver executable.

  3. Run the script to fetch the Binance P2P exchange rate and send an SMS notification:

    bashCopy code

    python binance_p2p_notifier.py

    The script will launch a Chrome browser, navigate to the Binance P2P page, fetch the exchange rate, send an SMS notification, and then quit the browser.

Contributing

If you would like to contribute to this project, please open an issue or submit a pull request. We welcome contributions from the community!

License

This project is licensed under the MIT License - see the LICENSE file for details.

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.