💼

P2P Offer Management

Manage peer-to-peer trading offers

🎯 Offer Overview

P2P offers enable users to create buy or sell orders for cryptocurrency trading. Each offer includes configuration for amounts, pricing models, trade settings, location preferences, and user requirements. The system supports flexible JSON-based configurations for complex trading scenarios.

📈 Offer Types

💰

Buy Offers

Users want to purchase cryptocurrency

  • • Set purchase amount ranges
  • • Configure pricing model
  • • Define payment methods
  • • Specify trade terms
💸

Sell Offers

Users want to sell cryptocurrency

  • • Set selling amounts and limits
  • • Choose pricing strategy
  • • Select payment options
  • • Configure release terms

⚙️ Offer Configuration

Basic Information

Required Fields

User ID UUID of the offer creator
Type BUY or SELL operation
Currency Cryptocurrency symbol (max 50 chars)
Wallet Type FIAT, SPOT, or ECO wallet

Status Tracking

Status DRAFT, PENDING_APPROVAL, ACTIVE, PAUSED, COMPLETED, CANCELLED, REJECTED, EXPIRED
Views Number of times offer was viewed
System Tags JSON array for categorization
Admin Notes Optional administrative notes

Amount Configuration (JSON)

The amountConfig field stores trading amount parameters as JSON:

{
  "total": 1000,
  "min": 50,
  "max": 500,
  "availableBalance": 1000
}

Required Fields

  • total: Total amount available for trading
  • • Defines the maximum tradeable amount
  • • Used for liquidity calculations

Optional Fields

  • min: Minimum trade amount
  • max: Maximum per trade
  • availableBalance: Current available amount

Price Configuration (JSON)

The priceConfig field manages pricing strategy and calculations:

{
  "model": "FIXED",
  "value": 45000,
  "marketPrice": 44000,
  "finalPrice": 45000
}

Required Fields

  • model: "FIXED" or "MARGIN" pricing
  • value: Price or margin percentage
  • finalPrice: Calculated final price

Optional Fields

  • marketPrice: Current market rate
  • • Used for margin calculations
  • • Updated automatically for margin model

Trade Settings (JSON)

The tradeSettings field defines trading rules and conditions:

{
  "autoCancel": 30,
  "kycRequired": true,
  "visibility": "PUBLIC",
  "termsOfTrade": "Payment within 30 minutes",
  "additionalNotes": "Contact before trading"
}

Required Settings

  • autoCancel: Minutes before auto-cancellation
  • kycRequired: Whether KYC verification needed
  • visibility: "PUBLIC" or "PRIVATE" offer

Optional Settings

  • termsOfTrade: Specific trading terms
  • additionalNotes: Extra instructions
  • • Custom trading conditions

🔧 Advanced Settings

Location Settings (Optional JSON)

{
  "country": "US",
  "region": "California",
  "city": "San Francisco",
  "restrictions": ["no_vpn"]
}
  • • Geographic targeting options
  • • Regional restrictions
  • • Location-based filtering
  • • Optional field

User Requirements (Optional JSON)

{
  "minCompletedTrades": 10,
  "minSuccessRate": 95,
  "minAccountAge": 30,
  "trustedOnly": false
}
  • • Trading experience requirements
  • • Account age restrictions
  • • Success rate minimums
  • • Trust level filtering

📋 Offer Management

Administrative Operations

View Operations

  • • List all P2P offers
  • • Filter by status, type, currency
  • • View detailed offer configurations
  • • Monitor offer performance
  • • Track view counts and activity

Management Actions

  • • Review pending offers for approval
  • • Add administrative notes
  • • Apply system tags for categorization
  • • Monitor compliance with platform rules
  • • Handle flagged or reported offers

🔄 Offer Lifecycle

Status Progression

📝

DRAFT

Being created

PENDING_APPROVAL

Awaiting review

ACTIVE

Live for trading

PAUSED

Temporarily inactive

COMPLETED

Successfully finished

CANCELLED

User cancelled

REJECTED

Admin rejected

EXPIRED

Time limit reached

💳 Payment Methods

Payment Method Associations

Offers can be linked to multiple payment methods through the p2pOfferPaymentMethod junction table:

Payment Method System

  • • Many-to-many relationship with offers
  • • Separate p2pPaymentMethod model
  • • Junction table for associations
  • • Cascading delete support

Integration Benefits

  • • Flexible payment options
  • • Reusable payment method data
  • • Centralized payment management
  • • Easy filtering and matching

💡 Best Practices

Offer Configuration

  • • Validate JSON configurations thoroughly
  • • Set realistic amount and price ranges
  • • Configure appropriate auto-cancel timers
  • • Use clear terms of trade
  • • Monitor offer performance regularly

Administrative Management

  • • Review pending offers promptly
  • • Use system tags for organization
  • • Monitor flagged offers closely
  • • Maintain detailed admin notes
  • • Track view counts and engagement