# Streaming api for multiple endpoints

**URL:** <http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390>\
**Category:** API Question\
**Created:** [January 29, 2024, 4:19pm UTC](http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390 "2024-01-29T16:19:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehtesham](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/e/838e76/32.png) [@ehtesham](http://forum.companieshouse.gov.uk/u/ehtesham)\
**Post date:** [January 29, 2024, 4:19pm UTC](http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390/1 "2024-01-29T16:19:58Z")

</div>

Hi,

For the same company, we usually fetch data from 6 different endpoints at the same time (company/officers/insolvency/persons-with-significant-control/charges/filing-history). Due to this we some times get rate limited when we have large traffic.

To solve this problem, we are planning on using the streaming api and are currently new to this. Say we maintain our own database and update it using the streaming api, given that there is a limit of 2 concurrent connections, how can we use the streaming api to fetch data from 6 different endpoints?

In a few forums I have come across using an offline connection and storing the timeouts. Would the below logic work? (Say, we run this task every 30 min)

```auto
for endpoint in endpoints:
     previous_timepoint = TIMEPOINTS[endpoint]
     data = get_streaming_data_using_single_http_request(endpoint, previous_timepoint)
     update_local_db(data)
     TIMEPOINTS[endpoint] = data["timepoint"]

```

Also, how do we get the full snapshot of the existing data till current timepoint before the 1st run of such a task?

Many thanks

---

<div class="post-metadata">

**Author:** ![MArkWilliams](http://forum.companieshouse.gov.uk/user_avatar/forum.companieshouse.gov.uk/markwilliams/32/194_2.png) [@MArkWilliams](http://forum.companieshouse.gov.uk/u/MArkWilliams)\
**Post date:** [February 5, 2024, 10:53am UTC](http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390/2 "2024-02-05T10:53:34Z")

</div>

That limit of 2 has been increased to 6. So you can connect to all streams.  
You will be disconnected every 24hrs (at least) so you have to build in timepoint managment.

---

<div class="post-metadata">

**Author:** ![IvanGudkof](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/i/ea5d25/32.png) [@IvanGudkof](http://forum.companieshouse.gov.uk/u/IvanGudkof)\
**Post date:** [November 11, 2024, 11:56am UTC](http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390/3 "2024-11-11T11:56:32Z")

</div>

Hello, I have spotted that **Connection limits** section on [Streaming API:](https://developer-specs.company-information.service.gov.uk/streaming-api/guides/overview)  
still mentions having max 2 connections per account. Please update this

---

<div class="post-metadata">

**Author:** ![wcollins](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/w/a88e4f/32.png) [@wcollins](http://forum.companieshouse.gov.uk/u/wcollins)\
**Post date:** [January 6, 2025, 4:20pm UTC](http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390/4 "2025-01-06T16:20:23Z")

</div>

Since the introduction of the persons-with-significant-control-statements endpoint, which now takes the total number of streaming endpoints to 8, we receive regular disconnections when we subscribe to the new endpoint.  
Suggests that the previous limit was 7 - any chance this limit could be increased to 8 now @MArkWilliams?  
Thanks

---

<div class="post-metadata">

**Author:** ![bchazalet](http://forum.companieshouse.gov.uk/letter_avatar_proxy/v4/letter/b/94ad74/32.png) [@bchazalet](http://forum.companieshouse.gov.uk/u/bchazalet)\
**Post date:** [January 6, 2025, 4:41pm UTC](http://forum.companieshouse.gov.uk/t/streaming-api-for-multiple-endpoints/7390/5 "2025-01-06T16:41:49Z")

</div>

or even 9, if we count company-exemptions which is still stated as ‘in development’ but seems to be present on the server.
