Update config
UpdateConfig¶
Description: Updates the global server configuration including server metadata, operational parameters, paths, demo settings, and reporting options.
Access Control¶
š”ļø Access Level Required:
SESSION_ADMINorSESSION_MANAGER
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Server name |
| owner | string | Yes | Owner name |
| timeofdemo | int | Yes | Demo duration (in seconds) |
| timezone | int | Yes | Server timezone offset |
| antiflood | int | Yes | Anti-flood mode |
| floodcontrol | int | Yes | Flood control level |
| rollovers_mode | int | Yes | Rollover mode (0: normal, 1: by close, 2: by bid) |
| path_database | string | Yes | Path to server database |
| path_history | string | Yes | Path to historical data |
| path_log | string | Yes | Path to log directory |
| account_url | string | Yes | URL to user account system |
| time_backup | string | No | Time to run backup (e.g., "02:00") |
Optionally supported if available in payload:¶
| Field | Type | Description |
|---|---|---|
| typeofdemo | int | Demo type (0: none, 1: time-limited) |
| timesync | string | Time synchronization source |
| port | int | Server port |
| timeout | int | Session timeout |
| daylightcorrection | int | 1 if daylight saving is enabled |
| feeder_timeout | int | Feed connection timeout |
| keepticks | int | Number of ticks to retain |
| monthly_state_mode | int | Monthly report mode |
| statement_mode | int | Statement report mode |
| statement_weekend | int | 1 if statements allowed on weekends |
Request Example¶
{
"name": "TradeServer",
"owner": "Broker Ltd.",
"timeofdemo": 604800,
"timezone": 2,
"antiflood": 1,
"floodcontrol": 50,
"rollovers_mode": 1,
"path_database": "/opt/server/db",
"path_history": "/opt/server/history",
"path_log": "/opt/server/logs",
"account_url": "https://account.broker.com",
"time_backup": "03:00"
}
Response Parameters¶
| Name | Type | Description |
|---|---|---|
| data | string | Returns "OK" on success |
Response Example¶
{
"data": "OK"
}
ā ļø If the update fails, an error message will be returned:
{ "error": "CONFIG_UPDATE_ERROR", "message": "Invalid configuration or write error" }