Expire Market Data Subscription

### Expire market data subscriptions for users. Available to: Organization administrators and super 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
List of market data subscription IDs to expire. Maximum 100 IDs per request.

Response

ExpireMarketDataSubscriptionResponse
okboolean
true if all provided subscription IDs were successfully expired
failedSubscriptionIdExpirieslist of longs
List of subscription IDs that failed to expire
successfulSubscriptionIdExpirieslist of longs
List of subscription IDs that were successfully expired. Contains all IDs provided in the request when the operation was completely successful.
errorCodeenum or null
Error code if the operation failed
Allowed values:
errorTextstring or null<=8192 characters
Optional description of the error, if any