Update Watchlist
This API allows a user to update an existing Watchlist. It supports renaming the Watchlist, modifying the list of scrips (adding/removing), and rearranging their sequence. The API ensures updates based on version control.
🔑Header Parameters
| Header | Type | Required | Description | Example/ENUM |
|---|---|---|---|---|
| Authorization | string | Yes | Bearer token for user authentication | Bearer{{access_token}} |
| x-api-key | string | Yes | API key for access control | {{x-api-key}} |
📦Request Body Schema
| Field | Type | Required | Description | Example/ENUM |
|---|---|---|---|---|
| id | string | Yes | ID of the Watchlist to update | "abc123-xyz789" |
| sWatchListName | string | No | Updated name of the Watchlist | "Updated Portfolio" |
| bIsPrivate | boolean | No | Set Watchlist as private or public | true / false |
| bIsDefault | boolean | No | Set as the default Watchlist | true / false |
| sSettings | string | No | Reserved JSON string for future use | "" |
| scrips | array | No | New list of scrips (replace existing) | See Scrip Object |
| _version | number | Yes | Current version of the Watchlist (for conflict handling) | 2 |
📝 Scrip Objects
| Field | Type | Required | Description | Example/ENUM |
|---|---|---|---|---|
| nMarketSegmentId | number | Yes | Exchange segment ID | 1 |
| nToken | number | Yes | Exchange token number for the scrip | 123456 |
| nSequenceNo | number | Yes | Sequence number in the Watchlist | 1, 2, ... |
| sSettings | string | No | Reserved for future settings (JSON string) | "" |
🟢Success Response - 200 Ok
| Field | Type | Description | Example/ENUM |
|---|---|---|---|
| status | string | Status of the API call | "success" |
| code | string | Response code | "s-101" |
| message | string | Descriptive success message | "Watchlist Updated successfully" |
| data | array of object | List of Watchlist objects | See details below |
📘 Watchlist Object Schema
| Field | Type | Description | Example/ENUM |
|---|---|---|---|
| id | string | Unique Watchlist ID | "32b95c61-370-b215-bb8857f9c949" |
| sWatchListName | string | Name of the Watchlist | "My Watchlist" |
| bIsPrivate | boolean | If true, watchlist is private | true |
| bIsDefault | boolean | If true, this is the default watchlist | false |
| sUserId | string | User ID of the watchlist creator | "user123" |
| sTenantId | string | Tenant/Broker ID | "1256878" |
| sSettings | string | Reserved for future (must be valid JSON string) | "{\"subCount\":13}" |
| scrips | array | List of scrips within the watchlist | See Scrip Object above |
| _version | number | Version number of the watchlist | 1 |
| _deleted | boolean | Flag to indicate if deleted | false |
| _lastChangedAt | number | Epoch timestamp of last change | 1718008123 |
| createdAt | string | ISO date-time of watchlist creation | "2025-06-01T12:00:00Z" |
| updatedAt | string | ISO date-time of last update | "2025-06-10T09:45:00Z" |
put
/nontransactional/v1/watchListProfile