Skip to content

Prop Trading API

The Prop Trading manager API is used by BackOffice to configure prop challenge products.

This API belongs to the TCP manager layer. Client-facing challenge browsing and purchase endpoints are documented in the HTTP Client API section.

Lifecycle

Current implementation covers the configuration layer and the first purchase step:

  1. BackOffice creates a program aggregate with settings and steps.
  2. BackOffice opens the full program card with MngGetPropProgram.
  3. BackOffice updates settings and steps with one MngUpdatePropProgram request.
  4. BackOffice can activate/disable a program through MngUpdatePropProgram.status.
  5. BackOffice can delete a program and all linked prop records through MngDeletePropProgram.
  6. Client requests available active programs.
  7. Client starts a purchase with BuyPropChallenge.
  8. Server creates a prop_purchase record in pending status.

Actual balance charge, DEMO account creation and challenge activation are separate next-step operations.

Status Values

Program Status

Value Name Description
0 active Available for use
1 disabled Not available for new purchases
2 archived Hidden/legacy record

MngUpdatePropProgram can activate a program with status = 0 or disable it with status = 1.

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

Program Object

Field Type Description
id int Program id
brand string Brand namespace
name string Program name shown to BackOffice/client
description string Program description
demo_group string Trading group used for DEMO challenge accounts
price double Challenge purchase price
price_currency string Purchase currency
status int Program status
sort_index int UI ordering value
created_time int Unix timestamp
updated_time int Unix timestamp

Aggregate Save Model

MngCreatePropProgram and MngUpdatePropProgram accept a nested steps array. Each step contains both phase settings and rule values.

{
  "steps": [
    {
      "phase_index": 1,
      "name": "Evaluation",
      "duration_days": 30,
      "max_daily_loss_pct": 5,
      "max_total_loss_pct": 10,
      "profit_target_pct": 8,
      "min_trading_days": 5,
      "max_trading_days": 30,
      "max_positions": 10
    }
  ]
}

On update, if steps is sent, the server replaces nested program steps as one aggregate.

Delete Flow

MngDeletePropProgram removes the program and all linked prop-domain records:

  • program steps/phases
  • purchases
  • challenges
  • daily snapshots
  • rule breaches
  • metric snapshots
  • the program row

The delete operation is transactional and writes the deleted counters to the server log.

Phase Object

Field Type Description
id int Phase id
program_id int Parent program id
phase_index int Phase order starting from 1
name string Phase name
duration_days int Phase duration, 0 means not configured
max_daily_loss_pct double Maximum daily loss percent
max_total_loss_pct double Maximum total loss percent
profit_target_pct double Profit target percent
min_trading_days int Minimum trading days
max_trading_days int Maximum trading days, 0 means not configured
max_positions int Maximum open positions, 0 means not configured
created_time int Unix timestamp
updated_time int Unix timestamp