DeleteSymbol¶
Description: Deletes a trading symbol by name.
Access Control¶
🛡️ Access Level Required:
SESSION_ADMIN
Requires super_admin. Permissions are checked against the cached staff manager record.
Deletion is refused while the symbol has active BUY/SELL positions or any pending BUY LIMIT, SELL LIMIT, BUY STOP or SELL STOP order. Active open, restore, update, close, partial-close and cancel transitions are also protected. Terminal closed, cancelled or deleted history does not itself block deletion. This guard is not a guarantee of atomicity with concurrent order submissions.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
symbol |
string | Yes | Symbol name |
Response Parameters¶
TCP responses contain extID (string request correlation), status (integer),
and data (object). On success, data.data is the string OК: Latin O followed
by Cyrillic К (U+041A), preserving the existing acknowledgement.
On failure, data.error is the error code and data.message, when supplied,
is a descriptive string.
{
"extID": "delete-symbol-1",
"status": 200,
"data": { "data": "OК" }
}
Blocked deletion example:
{
"extID": "delete-symbol-2",
"status": 409,
"data": {
"error": "RET_SYMBOL_USE_BY_TRADE",
"message": "The symbol is used in open trades"
}
}
The existing error message also applies to active pending orders.
Error Responses¶
| Code | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Missing or invalid symbol |
| 401 | PERMISSION_DENIED_ACCESS |
TCP session role is not allowed |
| 403 | RET_NOT_ENOUGH_RIGHTS |
Required staff permission is absent |
| 404 | RET_SYMBOL_NOT_FOUND |
Symbol does not exist |
| 409 | RET_SYMBOL_USE_BY_TRADE |
Active market position, pending order or protected transition references the symbol |
| 4xx/5xx | RET_* |
Delete failed |