Skip to content

Prop Trading

HTTP endpoints for the trading terminal prop challenge flow.

Current implementation covers active program discovery, program details, purchase preview, eligible payer account discovery, full challenge purchase activation, listing customer prop purchases/challenges, and challenge runtime details.

BuyPropChallenge validates the payer, creates a purchase, enqueues the fee withdrawal, opens the challenge DEMO account, enqueues the initial balance from the first phase account_group, and creates the active challenge record.

Programs can expose a computed profit_split field. The value is read from the funded phase (phase_type = 1) and uses ratio format: 0.8 means 80%. The current implementation allows only one funded phase, it must be the last phase, and its account_group must be a REAL trading group.

Purchase Lifecycle Fields

Purchase objects include UI-oriented lifecycle fields:

Field Type Description
status_name string Human-readable status code
next_action string Suggested frontend next action
payment_status string Payment stage status
activation_status string Challenge activation stage status
failure_reason string Stable failure reason code
can_retry bool Whether retry is allowed
can_cancel bool Whether cancel is allowed

Status Values

Purchase Status

Value Name
0 pending
1 paid
2 account_created
3 active
4 failed
5 refunded

Challenge Status

Value Name
0 pending
1 active
2 passed
3 failed
4 cancelled

Runtime Endpoints

The terminal can inspect an active or completed challenge through:

  • GET /prop/challenges/{id}
  • GET /prop/challenges/{id}/metrics
  • GET /prop/challenges/{id}/breaches

All runtime endpoints require a customer session and only return challenges owned by that customer.

Runtime daily loss/profit values are based on prop_daily_snapshots.daily_start_equity. The first evaluator pass in a local calendar day creates the daily boundary snapshot.

GET /prop/challenges/{id} returns every runtime phase with latest_metric and calculated progress, so the terminal can render the current state of each challenge stage without joining metrics manually.