Expire Market Data Subscription

View as Markdown
### Expire market data subscriptions for users. **Available to:** Organization administrators This endpoint allows you to immediately archive and expire up to 100 market data subscriptions in a single request, helping you manage multiple subscriptions at once. The subscription IDs are primary keys from the `marketDataSubscriptions` database table and are returned when subscriptions are created using endpoints like [`addMarketDataSubscription`](/api/rest-api-endpoints/users/add-market-data-subscription). If some subscriptions fail to expire while others succeed, the response will include both `successfulSubscriptionIdExpiries` and `failedSubscriptionIdExpiries` arrays, allowing you to identify which subscriptions were processed successfully and which encountered errors. **Common failure scenarios:** - Providing a nonexistent subscription ID - Providing an ID for a subscription belonging to a user not in your organization - Providing more than 100 IDs in a single request If you accidentally expire a subscription, you can create a new subscription for the user using [`addMarketDataSubscription`](/api/rest-api-endpoints/users/add-market-data-subscription). **Error Codes:** | Error Code | Description | |------------|-------------| | `0` | `UsersNotInOrganization` - One or more subscription IDs belong to users not in your organization | | `1` | `TooManySubscriptions` - More than 100 subscription IDs were provided in the request | | `2` | `InternalError` - An internal processing error occurred |

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
marketDataSubscriptionIdslist of longsRequired

Response

ExpireMarketDataSubscriptionResponse
okboolean
failedSubscriptionIdExpirieslist of longs
successfulSubscriptionIdExpirieslist of longs
errorTextstring<=8192 characters

Non-empty if the request failed

errorCodeenum
InternalError, TooManySubscriptions, UsersNotInOrganization