[Python] Programmatic Access to Binance P2P Chat Messages or Buyer Phone Numbers via API...

Discussão em 'Python' iniciado por Stack, Junho 16, 2025.

  1. Stack

    Stack Membro Participativo

    I'm developing a Python script to automate the monitoring and processing of Binance P2P BUY orders for a merchant account, specifically focusing on handling mobile money payments.

    I'm currently using the python-binance library and the client.get_c2c_trade_history() endpoint. This allows me to retrieve comprehensive details about an order, such as:

    • orderNumber
    • orderStatus (e.g., 'BUYER_PAYED', 'TRADING')
    • asset (e.g., USDT)
    • fiat (e.g., TZS)
    • totalPrice
    • payMethodName (e.g., 'MpesaVodaphone', 'MTN')
    • counterPartNickName (masked, e.g., 'na****')
    • createTime

    The Problem: For mobile money payments, the crucial piece of information required to complete the payment – the buyer's actual phone number – is exchanged within the Binance P2P chat interface. The get_c2c_trade_history() API does not provide this specific detail. My script currently identifies mobile money orders and then prompts for manual checking of the chat.

    My Understanding & What I've Considered: I understand that due to privacy, security, and dispute resolution policies, Binance's public API might intentionally not expose direct access to P2P chat messages or full personal contact details like phone numbers. I've thoroughly reviewed the python-binance documentation and general Binance API docs, and I haven't found any public endpoints for P2P chat.

    My Question(s):

    Is there any official or unofficial API endpoint, method, or workaround (e.g., a private API if accessible to certain partners, or a hidden/undocumented public endpoint) that allows programmatic access to Binance P2P chat messages or, more specifically, the buyer's phone number as provided in the chat? Are there any alternative strategies or tools (e.g., secure, compliant web scraping, though I'm aware of its fragility) that merchants or developers successfully use to automate the retrieval of this specific, critical information? If a "Merchant API" exists with such capabilities, how does one typically inquire about or apply for access to it? My ultimate goal is to fully automate the mobile money payment process, and manually checking the P2P chat for each order is currently the main bottleneck preventing full automation.

    Continue reading...

Compartilhe esta Página