Create Account Template
API URL: POST https://userapi-demo.s2f.projectx.com/AccountTemplate/create
API Reference: /AccountTemplate/create
info
Documentation on this page is applicable to platforms that have Account Templates enabled. If you are unsure whether you have Account Templates enabled, please contact your account manager.
Description
Create Account Template.
Parameters
Name | Type | Description | Required | Nullable |
---|---|---|---|---|
title | string | The Account Template title. | true | false |
name | string | The Account Template name. | true | false |
description | string | The Account Template description. | true | false |
notes | string | Notes on the Account Template. | false | true |
startingBalance | decimal | The starting balance for all accounts created from this Account Template. | false | false |
margin | decimal | The margin for all accounts created from this Account Template. | false | false |
titleColor | string | The title color for the Account Template. | false | true |
tag | int | The Account Template tag. Valid Values:
| true | false |
Example Usage
Example Request
- Request
- cURL
{
"title": "TEMPLATE_TITLE",
"name": "TEMPLATE_NAME",
"description": "TEMPLATE_DESCRIPTION",
"notes": "Starting Balance: $100,000\nProfit Target: $6,000\nMax Loss: $2,500 (Trailing EOD highest account balance)\nDaily Loss: $1,000 (temporary violation - non fail)\nMax Position: 10 contracts ($100,000 margin)",
"startingBalance": 100000,
"margin": 100000,
"titleColor": #ff0000",
"tag": 0 // 0 = Regular Template, 1 = Practice Template
}
curl -X 'POST' \
'https://userapi-demo.s2f.projectx.com/AccountTemplate/create' \
-H 'accept: text/plain' \
-H 'Content-Type: application/json' \
-d '{
"title": "TEMPLATE_TITLE",
"name": "TEMPLATE_NAME",
"description": "TEMPLATE_DESCRIPTION",
"notes": "Starting Balance: $100,000\nProfit Target: $6,000\nMax Loss: $2,500 (Trailing EOD highest account balance)\nDaily Loss: $1,000 (temporary violation - non fail)\nMax Position: 10 contracts ($100,000 margin)",
"startingBalance": 100000,
"margin": 100000,
"titleColor": "#ff0000",
"tag": 0
}'
Example Response
- Success
- Error
{
"success": true,
"errorMessage": "string",
"template": {
"id": 2,
"title": "TEMPLATE_TITLE",
"titleColor": "#ff0000",
"description": "TEMPLATE_DESCRIPTION",
"startingBalance": 100000,
"margin": 100000,
"name": "TEMPLATE_NAME",
"notes": "Starting Balance: $100,000\nProfit Target: $6,000\nMax Loss: $2,500 (Trailing EOD highest account balance)\nDaily Loss: $1,000 (temporary violation - non fail)\nMax Position: 10 contracts ($100,000 margin)",
"isActive": false,
"tag": 0
}
}
Error: response status is 401