hirosystems / hirosystems/stacks-blockchain-api

subscribeBlocks & subscribeMempool Not Working

Open
#2,146 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
193
Forks
127
Avg merge
16h 35m
Merged PRs (30d)
46

Description

Hi! dev teams.

I am making code with your api.
Here is my computer info.
Mac OS Sonoma14.4
Node 18.19.1
NPM 10.2.4
API version: 8.2.0

Here is the typescript code

```
import * as stacks from '@stacks/blockchain-api-client';
const socketUrl = "https://api.mainnet.hiro.so";
const socket = new stacks.StacksApiSocketClient({ url: socketUrl });

let client = await stacks.connectWebSocketClient('wss://api.mainnet.hiro.so/');

sub = await socket.subscribeBlocks((event) => {
console.log(event)
}
sub = await socket.subscribeBlocks((event) => {
console.log(event)
}
```
After about 6 hours, the websocket stops.

I also see the this report.
https://github.com/hirosystems/stacks-blockchain-api/issues/1885

The admin said it was resolved on above link, but it seems the issue has resurfaced with the Nakamoto update.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.