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.hyperprop.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 - Set the name traders see:
curl -X PATCH ".../{planId}" \
-d '{"displayName": "100K Evaluation"}'
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 with this ID exists in your organization |
PLAN_NAME_EXISTS | Another plan already has this name |
RULE_NOT_FOUND | No trading rule with the new ID exists in your organization |
NO_FIELDS_TO_UPDATE | No valid fields provided |
ADMIN_REQUIRED | Only admins can update plans |
Access: full-access API keys only (a read-only key gets 403 READ_ONLY_KEY). Dashboard members need manage access to Plans & rules.
curl --request PATCH \
--url https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Updated Plan Name",
"displayName": "100K Evaluation",
"description": "Updated description",
"price": 349,
"currency": "EUR",
"durationDays": 45,
"accountSize": 150000,
"tradingRuleId": "<string>",
"isActive": true,
"metadata": {
"featured": false
},
"markets": [
"CME",
"BINANCE"
],
"mergeMetadata": true
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}"
payload = {
"name": "Updated Plan Name",
"displayName": "100K Evaluation",
"description": "Updated description",
"price": 349,
"currency": "EUR",
"durationDays": 45,
"accountSize": 150000,
"tradingRuleId": "<string>",
"isActive": True,
"metadata": { "featured": False },
"markets": ["CME", "BINANCE"],
"mergeMetadata": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Plan Name',
displayName: '100K Evaluation',
description: 'Updated description',
price: 349,
currency: 'EUR',
durationDays: 45,
accountSize: 150000,
tradingRuleId: '<string>',
isActive: true,
metadata: {featured: false},
markets: ['CME', 'BINANCE'],
mergeMetadata: true
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Plan Name',
'displayName' => '100K Evaluation',
'description' => 'Updated description',
'price' => 349,
'currency' => 'EUR',
'durationDays' => 45,
'accountSize' => 150000,
'tradingRuleId' => '<string>',
'isActive' => true,
'metadata' => [
'featured' => false
],
'markets' => [
'CME',
'BINANCE'
],
'mergeMetadata' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}"
payload := strings.NewReader("{\n \"name\": \"Updated Plan Name\",\n \"displayName\": \"100K Evaluation\",\n \"description\": \"Updated description\",\n \"price\": 349,\n \"currency\": \"EUR\",\n \"durationDays\": 45,\n \"accountSize\": 150000,\n \"tradingRuleId\": \"<string>\",\n \"isActive\": true,\n \"metadata\": {\n \"featured\": false\n },\n \"markets\": [\n \"CME\",\n \"BINANCE\"\n ],\n \"mergeMetadata\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Plan Name\",\n \"displayName\": \"100K Evaluation\",\n \"description\": \"Updated description\",\n \"price\": 349,\n \"currency\": \"EUR\",\n \"durationDays\": 45,\n \"accountSize\": 150000,\n \"tradingRuleId\": \"<string>\",\n \"isActive\": true,\n \"metadata\": {\n \"featured\": false\n },\n \"markets\": [\n \"CME\",\n \"BINANCE\"\n ],\n \"mergeMetadata\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Plan Name\",\n \"displayName\": \"100K Evaluation\",\n \"description\": \"Updated description\",\n \"price\": 349,\n \"currency\": \"EUR\",\n \"durationDays\": 45,\n \"accountSize\": 150000,\n \"tradingRuleId\": \"<string>\",\n \"isActive\": true,\n \"metadata\": {\n \"featured\": false\n },\n \"markets\": [\n \"CME\",\n \"BINANCE\"\n ],\n \"mergeMetadata\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Trading plan updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Plan Name",
"displayName": "100K Evaluation",
"price": 349,
"isActive": true,
"markets": [
"CME",
"CBOT",
"NYMEX",
"COMEX",
"BINANCE"
],
"updatedAt": "2025-02-17T14:30:00.000Z"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "No valid fields to update",
"code": "NO_FIELDS_TO_UPDATE"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Only organization admins can perform this action",
"code": "NOT_ADMIN"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Trading plan not found",
"code": "PLAN_NOT_FOUND"
}{
"statusCode": 409,
"error": "Conflict",
"message": "A trading plan with this name already exists",
"code": "PLAN_NAME_EXISTS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Service Unavailable",
"message": "The Idempotency-Key could not be recorded, so the request was not run. Retry with the same key.",
"code": "IDEMPOTENCY_UNAVAILABLE"
}Authorizations
Organization API key (hp_live_...), sent in the X-API-Key header. Create, rotate and restrict keys in the dashboard or with the API keys endpoints; an organization can have two active keys, so you can rotate without downtime. A full-access key can call every endpoint in this reference. A read-only key can call GET endpoints (and create a trading stream token); any other request returns 403 READ_ONLY_KEY. A key with an IP allowlist returns 403 IP_NOT_ALLOWED from any other address. Each endpoint lists which keys can call it under Access.
Headers
Optional. A value that identifies this operation on your side, at most 255 characters. A retry with the same key, method, path and body within 24 hours returns the original response (with Idempotency-Replayed: true) instead of repeating the change. The same key with a different body returns 409 IDEMPOTENCY_KEY_REUSED; a retry while the first request is still running returns 409 IDEMPOTENCY_KEY_IN_PROGRESS. A response that contains a credential (such as a new API key or signing secret) is not saved: the change is still not repeated, and a retry returns 409 IDEMPOTENCY_KEY_COMPLETED with the original status in originalStatus. Server errors (5xx) are not saved, so a retry runs again. If the key cannot be recorded, the request is not run and returns 503 IDEMPOTENCY_UNAVAILABLE; retry with the same key.
255Body
Markets accounts on this plan trade. Any CME Group exchange grants the full CME, CBOT, NYMEX and COMEX bundle; BINANCE adds crypto perpetuals, HYPERLIQUID adds index and commodity perpetuals and HDL adds Hyperprop Deep Liquidity crypto perpetuals (one book consolidated from several exchanges). Accounts created without their own markets use these; a plan that sets none uses the CME Group bundle. Every organization is enabled for the CME Group bundle. Perpetuals (BINANCE, HYPERLIQUID, HDL) must each be enabled for your organization by Hyperprop; until then, a request that includes one is refused with 403 MARKET_NOT_ALLOWED. Send null to return to the CME Group bundle. Existing accounts keep their markets.
1CME, CBOT, NYMEX, COMEX, BINANCE, HYPERLIQUID, HDL ["CME", "BINANCE"]
curl --request PATCH \
--url https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Updated Plan Name",
"displayName": "100K Evaluation",
"description": "Updated description",
"price": 349,
"currency": "EUR",
"durationDays": 45,
"accountSize": 150000,
"tradingRuleId": "<string>",
"isActive": true,
"metadata": {
"featured": false
},
"markets": [
"CME",
"BINANCE"
],
"mergeMetadata": true
}
'import requests
url = "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}"
payload = {
"name": "Updated Plan Name",
"displayName": "100K Evaluation",
"description": "Updated description",
"price": 349,
"currency": "EUR",
"durationDays": 45,
"accountSize": 150000,
"tradingRuleId": "<string>",
"isActive": True,
"metadata": { "featured": False },
"markets": ["CME", "BINANCE"],
"mergeMetadata": True
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated Plan Name',
displayName: '100K Evaluation',
description: 'Updated description',
price: 349,
currency: 'EUR',
durationDays: 45,
accountSize: 150000,
tradingRuleId: '<string>',
isActive: true,
metadata: {featured: false},
markets: ['CME', 'BINANCE'],
mergeMetadata: true
})
};
fetch('https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated Plan Name',
'displayName' => '100K Evaluation',
'description' => 'Updated description',
'price' => 349,
'currency' => 'EUR',
'durationDays' => 45,
'accountSize' => 150000,
'tradingRuleId' => '<string>',
'isActive' => true,
'metadata' => [
'featured' => false
],
'markets' => [
'CME',
'BINANCE'
],
'mergeMetadata' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}"
payload := strings.NewReader("{\n \"name\": \"Updated Plan Name\",\n \"displayName\": \"100K Evaluation\",\n \"description\": \"Updated description\",\n \"price\": 349,\n \"currency\": \"EUR\",\n \"durationDays\": 45,\n \"accountSize\": 150000,\n \"tradingRuleId\": \"<string>\",\n \"isActive\": true,\n \"metadata\": {\n \"featured\": false\n },\n \"markets\": [\n \"CME\",\n \"BINANCE\"\n ],\n \"mergeMetadata\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated Plan Name\",\n \"displayName\": \"100K Evaluation\",\n \"description\": \"Updated description\",\n \"price\": 349,\n \"currency\": \"EUR\",\n \"durationDays\": 45,\n \"accountSize\": 150000,\n \"tradingRuleId\": \"<string>\",\n \"isActive\": true,\n \"metadata\": {\n \"featured\": false\n },\n \"markets\": [\n \"CME\",\n \"BINANCE\"\n ],\n \"mergeMetadata\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/organization/trading-plans/{planId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated Plan Name\",\n \"displayName\": \"100K Evaluation\",\n \"description\": \"Updated description\",\n \"price\": 349,\n \"currency\": \"EUR\",\n \"durationDays\": 45,\n \"accountSize\": 150000,\n \"tradingRuleId\": \"<string>\",\n \"isActive\": true,\n \"metadata\": {\n \"featured\": false\n },\n \"markets\": [\n \"CME\",\n \"BINANCE\"\n ],\n \"mergeMetadata\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Trading plan updated successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Updated Plan Name",
"displayName": "100K Evaluation",
"price": 349,
"isActive": true,
"markets": [
"CME",
"CBOT",
"NYMEX",
"COMEX",
"BINANCE"
],
"updatedAt": "2025-02-17T14:30:00.000Z"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "No valid fields to update",
"code": "NO_FIELDS_TO_UPDATE"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "Only organization admins can perform this action",
"code": "NOT_ADMIN"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Trading plan not found",
"code": "PLAN_NOT_FOUND"
}{
"statusCode": 409,
"error": "Conflict",
"message": "A trading plan with this name already exists",
"code": "PLAN_NAME_EXISTS"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}{
"success": false,
"statusCode": 503,
"error": "Service Unavailable",
"message": "The Idempotency-Key could not be recorded, so the request was not run. Retry with the same key.",
"code": "IDEMPOTENCY_UNAVAILABLE"
}