Update a trading plan
Update an existing trading plan. Admin only.
Only provide fields you want to change.
Example - Update price:
curl -X PATCH "https://api.example.com/platform/v1/organization/trading-plans/{planId}" \
-H "X-API-Key: hp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"price": 349}'
Example - Deactivate plan:
curl -X PATCH ".../{planId}" \
-d '{"isActive": false}'
Example - Change trading rule:
curl -X PATCH ".../{planId}" \
-d '{"tradingRuleId": "new-rule-uuid"}'
Note: Existing purchases are not affected by changes. Changes only apply to new purchases.
Error Codes:
| Code | Description |
|---|---|
PLAN_NOT_FOUND | No plan exists with this ID |
PLAN_NOT_IN_ORG | Plan belongs to different organization |
PLAN_NAME_EXISTS | Another plan already has this name |
RULE_NOT_FOUND | New trading rule not found |
RULE_NOT_IN_ORG | New trading rule belongs to different org |
NO_FIELDS_TO_UPDATE | No valid fields provided |
ADMIN_REQUIRED | Only admins can update plans |
Authorizations
JWT Bearer token for user session auth. Format: "Bearer {token}". Used by User and Organization endpoints.
Path Parameters
The plan ID to update
Body
New plan name (must be unique)
"Updated Plan Name"
New description (null to clear)
"Updated description"
New price
349
New currency code
"EUR"
New duration (null = unlimited)
45
New account size
150000
New trading rule ID
Enable/disable plan
New metadata. Replaces existing metadata wholesale unless mergeMetadata is true.
When true, the provided metadata keys are merged into the existing metadata instead of replacing it entirely
true
Related topics
Update a trading ruleBulk update trading accountsDelete a trading planUpdate a trading accountGet a specific trading plan