GetScript¶
Info
GET https://{some_domain}/script/{id}
Returns one script by ID.
Public scripts are readable by all authenticated users. Private scripts are readable only by the owner or staff sessions.
Authorization¶
All requests must include a JWT token in Authorization.
Allowed roles: USER, MANAGER, ADMIN, DEALER.
Path Parameters¶
| Field | Type | Required | Description |
|---|---|---|---|
id |
int | Yes | Script ID |
Response¶
Success 200¶
{
"id": 42,
"login": 1001,
"name": "MorningScalper",
"script": "print('hi')",
"description": "simple moving average",
"kind": "indicator",
"language": "stscript",
"visibility": "public",
"autostart": 1,
"enabled": 1,
"created_time": 1777196331,
"updated_time": 1777196331
}
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Invalid ID |
| 401 | PERMISSION_DENIED |
Missing or invalid access context |
| 403 | PERMISSION_DENIED |
Private script is not accessible for this user |
| 404 | SCRIPT_NOT_FOUND |
Script not found |