Skip to content

This Python script fetches P2P sellers from Binance's API for a given asset, fiat currency, trade type, and payment method. It processes and displays the fetched data in a readable format and saves it to a JSON file.

Notifications You must be signed in to change notification settings

abirxdhack/Binance-P2P

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Binance P2P Seller Fetcher

πŸ“Œ Overview

This Python script fetches P2P sellers from Binance's API for a given asset, fiat currency, trade type, and payment method. It processes and displays the fetched data in a readable format and saves it to a JSON file.

βœ… Requirements

  • 🐍 Python 3.x
  • πŸ“¦ requests library (install using pip install requests)

βš™οΈ How It Works

  1. πŸ“‘ Sends requests to Binance's P2P API to fetch seller advertisements.
  2. πŸ“Š Collects and processes seller details.
  3. πŸ–₯️ Prints the sellers' information in a readable format.
  4. πŸ’Ύ Saves the seller details to a JSON file.

▢️ Usage

  1. Install dependencies if not already installed:
    pip install requests
  2. Run the script:
    python script.py

πŸ”§ Parameters

The script uses the following parameters:

  • πŸ’° asset: Cryptocurrency to trade (e.g., USDT)
  • πŸ’΅ fiat: Local currency (e.g., BDT for Bangladeshi Taka)
  • πŸ”„ trade_type: Type of trade (BUY or SELL)
  • 🏦 pay_type: Payment method (e.g., bKash)

These parameters can be modified in the script as needed.

πŸ“‚ Output

  • πŸ–₯️ The script prints seller details to the console.
  • πŸ“œ The data is saved as a JSON file in the format: p2p_{asset}_{fiat}.json.

πŸ“Š Example Output

Fetching page 1...
Seller: JohnDoe
Price: 110.50 BDT
Available: 500.00 USDT
Min Amount: 10.00 BDT
Max Amount: 5000.00 BDT
Completion Rate: 98.75%
Payment Method: bKash
----------------------------------------
Saved to p2p_USDT_BDT.json
Total unique sellers fetched: 10

πŸ”” Notes

  • ⏳ The script includes a delay (time.sleep(1)) to avoid hitting Binance's rate limits.
  • ❌ If no more sellers are found, the script stops fetching further pages.

πŸ“œ License

This script is open-source and free to use.


πŸ‘¨β€πŸ’» Author: Abir Arafat Chawdhury

About

This Python script fetches P2P sellers from Binance's API for a given asset, fiat currency, trade type, and payment method. It processes and displays the fetched data in a readable format and saves it to a JSON file.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages