If you've done serious Bybit P2P trading in Nigeria, you know the pain: a buyer pays, you check your bank app manually, confirm, release crypto. It works โ€” but it's slow, exhausting, and you can't do it while sleeping.

I built a system that reduced that from a ~20 minute manual process to automated release in under 30 seconds. Here's how it works and how you can build it too.

What you'll need: Python 3.10+, a Bybit account with P2P history, a Kuda or GTBank account (for webhook/notification parsing), and basic async Python knowledge.

Why Automate P2P?

The P2P market on Bybit Nigeria is competitive. Faster release times = better merchant reputation = more orders. On top of that, manually confirming every transfer:

Automation solves all three.

System Architecture

The system has three moving parts that talk to each other:

  1. Bank notification listener โ€” reads incoming transfer alerts from your bank
  2. Order matcher โ€” matches the bank credit to an open Bybit P2P order
  3. Auto-release trigger โ€” calls the Bybit SDK to release the crypto

Everything runs async so multiple orders can be processed simultaneously without blocking.

Step 1 โ€” Set Up the Project

# Install dependencies
pip install pybit motor python-telegram-bot aiohttp

# Project structure
p2p-bot/
โ”œโ”€โ”€ main.py          # entry point
โ”œโ”€โ”€ bank.py          # bank notification handler
โ”œโ”€โ”€ matcher.py       # order matching logic
โ”œโ”€โ”€ bybit_client.py  # Bybit SDK wrapper
โ””โ”€โ”€ config.py        # API keys, settings

Step 2 โ€” Listen for Bank Credits

Kuda sends email/SMS alerts for every credit. You parse these in real time. The cleanest approach is to forward Kuda alerts to a Telegram bot, then your Python script reads from Telegram:

import asyncio
from telegram.ext import Application, MessageHandler, filters

async def handle_bank_alert(update, context):
    text = update.message.text

    # Example Kuda alert format:
    # "Credit: NGN 50,000.00 from JOHN DOE"
    if "Credit:" in text:
        amount = parse_amount(text)   # extract NGN amount
        sender = parse_sender(text)   # extract sender name

        # hand off to order matcher
        await match_and_release(amount, sender)

app = Application.builder().token(TELEGRAM_TOKEN).build()
app.add_handler(MessageHandler(filters.TEXT, handle_bank_alert))

Step 3 โ€” Match Credit to Bybit Order

This is the critical part. You pull open orders from Bybit and find one that matches the credited amount:

from pybit.unified_trading import HTTP

session = HTTP(
    api_key="YOUR_API_KEY",
    api_secret="YOUR_SECRET"
)

async def match_and_release(credited_amount, sender_name):
    # Get pending P2P orders
    orders = session.get_p2p_order_list(
        status="10"  # 10 = payment confirmed by buyer
    )

    for order in orders["result"]["items"]:
        order_amount = float(order["amount"])

        # Match within ยฑ1 NGN tolerance
        if abs(order_amount - credited_amount) <= 1:
            await release_order(order["orderId"])
            return

    # No match โ€” alert manually
    await send_telegram_alert(f"โš ๏ธ Unmatched credit: NGN {credited_amount}")

Step 4 โ€” Auto Release

async def release_order(order_id: str):
    result = session.release_p2p_order(
        orderId=order_id
    )

    if result["retCode"] == 0:
        await send_telegram_alert(
            f"โœ… Released order {order_id}"
        )
    else:
        await send_telegram_alert(
            f"โŒ Release failed: {result['retMsg']}"
        )
โœ… Order #1748392 Released โ€” NGN 50,000 confirmed
โฑ Total time: 23 seconds from bank credit to crypto release

Safety Considerations

Never auto-release without verification. Always match amount AND check that the order is genuinely in "paid" status on Bybit before releasing. A mismatch means you lose crypto.

Results After Running This Live

After running this system live on Bybit P2P Nigeria:


This is a simplified version of the system โ€” the production version includes MongoDB order logging, duplicate detection, and a Telegram-based manual override. If you want a deeper breakdown of any specific part, email us.