Demo
Import demo account
Creates a demo trading account for the authenticated user. The account is free for the trader and starts in in_progress status. Internally the purchase records the plan list price so organization revenue analytics stay realistic; that price is never returned to the trader. Demo accounts are marked with is_demo: true in metadata. Maximum 3 demo accounts per organization per user. Only works with organizations that have demo_enabled in settings.
POST
/
v1
/
user
/
demo
/
accounts
Import demo account
curl --request POST \
--url https://api.hyperprop.com/platform/v1/user/demo/accounts \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "<string>",
"planId": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/user/demo/accounts"
payload = {
"organizationId": "<string>",
"planId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({organizationId: '<string>', planId: '<string>'})
};
fetch('https://api.hyperprop.com/platform/v1/user/demo/accounts', 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/user/demo/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organizationId' => '<string>',
'planId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/user/demo/accounts"
payload := strings.NewReader("{\n \"organizationId\": \"<string>\",\n \"planId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.hyperprop.com/platform/v1/user/demo/accounts")
.header("Content-Type", "application/json")
.body("{\n \"organizationId\": \"<string>\",\n \"planId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/user/demo/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"organizationId\": \"<string>\",\n \"planId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Demo account imported successfully",
"data": {
"id": "<string>",
"accountNumber": "DEMO-M3X7K9P2",
"type": "evaluation",
"status": "in_progress",
"initialBalance": 50000,
"currentBalance": 50000,
"highWaterMark": 50000,
"isDemo": true,
"organization": {
"id": "<string>",
"name": "FakePropFirm"
},
"tradingPlan": {
"id": "<string>",
"name": "50K Challenge",
"accountSize": 50000
},
"tradingRule": {
"id": "<string>",
"name": "Standard Challenge Rules"
},
"purchase": {
"id": "<string>",
"purchaseDate": "<string>",
"currency": "USD"
},
"createdAt": "<string>"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "You can have a maximum of 3 demo accounts per organization. Delete some before importing more.",
"code": "DEMO_LIMIT_REACHED"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "This organization does not offer demo accounts",
"code": "DEMO_NOT_ENABLED"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Trading plan not found",
"code": "PLAN_NOT_FOUND"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}Related topics
Delete demo accountList demo accountsImport a trading account with an import keyBulk-create unlinked accounts with import keysList demo organizations⌘I
Import demo account
curl --request POST \
--url https://api.hyperprop.com/platform/v1/user/demo/accounts \
--header 'Content-Type: application/json' \
--data '
{
"organizationId": "<string>",
"planId": "<string>"
}
'import requests
url = "https://api.hyperprop.com/platform/v1/user/demo/accounts"
payload = {
"organizationId": "<string>",
"planId": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({organizationId: '<string>', planId: '<string>'})
};
fetch('https://api.hyperprop.com/platform/v1/user/demo/accounts', 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/user/demo/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'organizationId' => '<string>',
'planId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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/user/demo/accounts"
payload := strings.NewReader("{\n \"organizationId\": \"<string>\",\n \"planId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.post("https://api.hyperprop.com/platform/v1/user/demo/accounts")
.header("Content-Type", "application/json")
.body("{\n \"organizationId\": \"<string>\",\n \"planId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperprop.com/platform/v1/user/demo/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"organizationId\": \"<string>\",\n \"planId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Demo account imported successfully",
"data": {
"id": "<string>",
"accountNumber": "DEMO-M3X7K9P2",
"type": "evaluation",
"status": "in_progress",
"initialBalance": 50000,
"currentBalance": 50000,
"highWaterMark": 50000,
"isDemo": true,
"organization": {
"id": "<string>",
"name": "FakePropFirm"
},
"tradingPlan": {
"id": "<string>",
"name": "50K Challenge",
"accountSize": 50000
},
"tradingRule": {
"id": "<string>",
"name": "Standard Challenge Rules"
},
"purchase": {
"id": "<string>",
"purchaseDate": "<string>",
"currency": "USD"
},
"createdAt": "<string>"
}
}{
"statusCode": 400,
"error": "Bad Request",
"message": "You can have a maximum of 3 demo accounts per organization. Delete some before importing more.",
"code": "DEMO_LIMIT_REACHED"
}{
"success": false,
"statusCode": 401,
"error": "Unauthorized",
"message": "Authentication required",
"code": "UNAUTHORIZED"
}{
"statusCode": 403,
"error": "Forbidden",
"message": "This organization does not offer demo accounts",
"code": "DEMO_NOT_ENABLED"
}{
"statusCode": 404,
"error": "Not Found",
"message": "Trading plan not found",
"code": "PLAN_NOT_FOUND"
}{
"success": false,
"statusCode": 500,
"error": "Internal Server Error",
"message": "An unexpected error occurred",
"code": "INTERNAL_ERROR"
}