Questions tagged [websocket]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Rust and erigon: How to Stabilize Responses from the Erigon WebSocket API?

I have a Rust application that communicates with the erigon API using websockets (specifically using the web3 crate). Lately, I've been experiencing instability with the responses from the server, as ...
Pierogi's user avatar
  • 203
1 vote
0 answers
54 views

EthereumProvider from @walletconnect/ethereum-provider not seeing my Infura project

I'm having trouble with getting EthereumProvider to connect via the Infura API key. I use it in my connection logic like this: const provider = await EthereumProvider.init({ ...
Oleh Yatskiv's user avatar
0 votes
1 answer
65 views

Disconnected from ETH websocket after timeout error [Python]

i'm trying to listen to eth websocket using python's web3 library, particularly listening to log events. async def ws_v2_subscription_context_manager_example(): while True: try: async with ...
germor197's user avatar
0 votes
0 answers
31 views

Geth private POA network behaving strangely

The Setup I have setup a private POA network using geth (v1.10.14). My network configurations are as following; BlockTime: 1sec Consensus: Clique Number of Signers: 3 Number of Miners: 3 I have ...
Asad Hayat's user avatar
0 votes
1 answer
48 views

Web3. Websocket connection closed. An error occurred: object of type 'NoneType' has no len()

I'm trying to receive pending transactions from the eth mempool, for which I use a wss connection to the node. The problem is that when normally receiving messages from the node, no errors occur and ...
404's user avatar
  • 33
0 votes
0 answers
10 views

Can eth_subscribe newHead in Ethereum Provide baseFeePerGas Directly?

I'm working with Ethereum's eth_subscribe method, specifically subscribing to newHeads to get real-time information about new blocks. My goal is to retrieve the baseFeePerGas for each new block. ...
Bnq's user avatar
  • 1
0 votes
0 answers
19 views

Error "could not detect network" when using WebSocket provider with Alchemy

I have a file with over 1 million+ ethereum addresses and private keys grouped together in a single file separated only using a ','. Example: 0x7256bCf73C2309893AA12d6b26A142AB3097560c,...
Nikhil Meena's user avatar
0 votes
0 answers
40 views

Getting error when connecting my ether js websocket provider to local node web socket server

So I am building my backend to listen for events. So I used the websocket provider of ether js to listen. Since it requires a websocket server url so I built my local websocket server. But I am ...
Arnab Chatterjee's user avatar
0 votes
1 answer
28 views

I want to subscribe to flashloan events on the Aave v2 contract via websocket, how do I find the function/event?

I am trying to set up a websocket connection with ethers.js to listen for flashloan events. I have made a connection successfully listening to Transfer events on the USDT contract - which was simple ...
Zara44's user avatar
  • 3
0 votes
0 answers
21 views

Live Price monitor

How does dexscreener or dextools websites keep up with the price changes efficiently on thousands of tokens? Can anyone provide a sample code for that? if not, then a roadmap of steps to be taken, ...
Melardev's user avatar
  • 101
0 votes
0 answers
548 views

Cannot listen to contract events with ethers.js

Trying to track token transfer events but it only works initially when the server is starts. After 5mins, it stops listening to any Transfer events even when the websocket is still active. I've ...
Nischit Pradhan's user avatar
0 votes
1 answer
290 views

Connection types, http/ws/ipc

I was wondering and couldn't find any docs regarding that, which connection is the fastest/has the least latency when querying the blockchain? From logical point of view I think IPC, but I'm not sure. ...
Kacper's user avatar
  • 1
1 vote
1 answer
1k views

WEBSOCKETS Provider url for binance smart chain

I have a contract deployed in Binance smart chain. I have written a script that will help me read the events logs from the Blockchain. currently, I tested that with the local hardhat network itself, ...
Bappa Banerjee's user avatar
0 votes
1 answer
571 views

Error on WebSocket connection

i want to retrive data from this websocket api, where is my code import { WebSocketServer } from 'ws' let socket = new WebSocketServer('wss://ws.blockchain.info/inv'); socket.on('error', console....
Oswald's user avatar
  • 1
1 vote
0 answers
30 views

Real-time subscription to events in fantom?

I've tried to listen to events using websockets. import asyncio, json from websockets import connect wss = 'wss://wsapi.fantom.network' params = json.dumps({"id": 1, "method": &...
hdnguyen's user avatar
0 votes
1 answer
2k views

Cannot read properties of undefined (reading 'WebSocketProvider')

I keep getting this error "cannot read properties of undefined (reading 'WebSocketProvider')" this is my code require('dotenv').config() const ethers = require('ethers') const { BigNumber, ...
Adediran Adedamola Oluwafemi's user avatar
1 vote
1 answer
201 views

Frame size of X bytes exceeds maximum accepted frame size

I'm attempting to calculate slippage of the past X number of blocks to determine if a potential trade is likely to slip beyond the threshold 1% level. If it does I will cancel the trade. To do this, ...
Trent Kennelly's user avatar
2 votes
1 answer
1k views

Reading and listening to Solidity events via Web3.py and websocket

Recently I have been solving a problem of how to listen to and read Solidity events in Web3.py via websocket rather than constant HTTP calling. You may be familiar with this algorythm which can be ...
f22daniel's user avatar
  • 333
0 votes
1 answer
60 views

usage of infura wss

I am trying to connect to infura via wss protocol, but I get this typerror, can you please help me out with that? from web3 import Web3 # add your blockchain connection information infura_websocket = ...
f22daniel's user avatar
  • 333
1 vote
0 answers
105 views

Localhost Websocket Events Don't Work With Truffle?

I created a simple smart contract that emits an event when a function in called. When I run it with truffle develop it says "Truffle Develop started at http://127.0.0.1:9545/" I then start ...
Jim's user avatar
  • 173
0 votes
1 answer
927 views

Connecting to matic mumbai via websocket

I try to connect to mumbai testnet via websocket to listen to blockchain events: const web3 = new Web3(new Web3.providers.WebsocketProvider("wss://rpc-mumbai.matic.today")); However, I get ...
dnnagy's user avatar
  • 111
0 votes
1 answer
293 views

Alchemy Websocket Sub with Filter on Arbitrum Returns No Messages

The following sub with filter is not resulting in an error and no messages are received for newly mined txns: '{"jsonrpc": "2.0", "id": 1, "method": "...
Paul's user avatar
  • 11
0 votes
1 answer
183 views

Websocket Connection With Filter Returns No Messages

I am trying to listen on a websocket connection to an optimism node for specific events on a specific contract. I am getting the message back that I am connected to the node, but even though I see ...
Alkhara's user avatar
  • 26
0 votes
1 answer
146 views

How can I know if my rpcUrl is working or not?

I have a 2 rpcUrl, I would like to pick the one that's working. How can I pick the active rpcUrl? Unfortunately, I can't catch the error log on this one. const provider = new ethers.providers....
Lonewarp's user avatar
  • 141
1 vote
2 answers
376 views

Can I know in real time when ether is coming into my account from Ethereum?

I would like to create a feature in my Dapp(nodejs) that notifies me when ether is coming into my account in real time. For example, is there a way to use websockets or APIs? Can anyone give me some ...
imelon2's user avatar
  • 498
0 votes
1 answer
446 views

TimeOut excpetion on websocket using Nethereum

I'm working on a frontrunning bot using Nethereum. the problem I'm facing is the following, once I get all the pending transaction hashes through the websocket, I pass the hash trhough ...
ramy ben haj yahia's user avatar
0 votes
3 answers
948 views

How to listen for events without a websocket RPC?

Based on the docs of ethersjs, I could use the provider.on() function to listen for events and perform some actions. However, would it still work if I don't have a websocket RPC URL? If it still does ...
xenon's user avatar
  • 445
2 votes
1 answer
2k views

Ganache and webscockets

I'm searching the docs, but, I cannot find anything. Does ganache support WebSocket connections? People seem to use for web socket connections in different posts.
Nikos Iliakis's user avatar
0 votes
0 answers
71 views

0x V4 Websocket connection

Is the 0x V4 Websocket server down? It was working for me a few days ago, but now I am getting the error "server rejected WebSocket connection: HTTP 400". Has anything changed?
Orvar's user avatar
  • 1
0 votes
0 answers
487 views

How do I listen to changes for an ethereum address using websockets + RPC eth_subscribe method + postman

I am trying to listen for changes in a wallet balance on the Kovan testnet , so I have connected to a Kovan node using a node provider's websocket endpoint, I have no errors connecting, and no errors ...
noahm101's user avatar
1 vote
0 answers
404 views

Websocket returning "unexpected server response: 200"

Using ethers.js with node, I was able to connect and communicate with websockets until recently. My code did work but now I only get Unexpected server response: 200 as response when trying to ...
kitaro's user avatar
  • 11
1 vote
1 answer
477 views

Websocket listener returns no response

I am trying to listen to a UniSwap v3 Swap event but I get no response from the network. I am connected to polygon network via websocket and after firing up the listener I get no callbacks even though ...
Ádám Klöczl's user avatar
2 votes
1 answer
290 views

Filter out mint and burn Transfers from Transfer events (web3.js)

In web.js Library Is there a way to filter out the Transfers events generated by the mint and burn function so as to ignore all the Transfer events generated by the mint or burn function. I know we ...
hassan ahmed's user avatar
1 vote
0 answers
956 views

How to properly subscribe to Uniswap v3 pool price events with NodeJS and JavaScript?

In reviewing the Uniswap v3 Quoter documentation: These functions are not marked view because they rely on calling non-view functions and reverting to compute the result. They are also not gas ...
ElHaix's user avatar
  • 187
0 votes
1 answer
2k views

Can't create Web3 websocket connection successfully

I use latest Web3 version (1.6.1) code in Node.js as provided in docs. But when I run: var Web3 = require('web3'); var web3 = new Web3( new Web3.providers.WebsocketProvider('wss://dex.binance.org/api/...
T.Todua's user avatar
  • 155
0 votes
0 answers
152 views

Web3 socket with options doesn't work

I'm trying to set some options in my wss connection but that seems don't have any effect using the moralis endpoint to connect in BSC I tried to keep the connection but that's dropped yet const Web3 = ...
kraune's user avatar
  • 11
0 votes
0 answers
208 views

Web3 Contract events not working on Ropsten testnet

Despite assuring that all event subscriptions are done through a websocket web3 provider instead of https, I still cannot get an event to return an info with " .on('data' ", however " ....
Blake Hatch's user avatar
0 votes
1 answer
1k views

What is the primary cause of error ECONREFUSED?

I have written a few small scripts using Node and Ethers to do simple buy and sell transactions through the PCS router and have had success when I write the code however, I am just learning and i have ...
gendisarray's user avatar
2 votes
0 answers
706 views

Losing connection on Geth websocket subscription

I am trying to keep multiple WebSocket connections to my Geth node open at the same time (around 200 connections). My issue is that they keep closing with a timeout error. I can't seem to know if it's ...
Kaki Master Of Time's user avatar
1 vote
0 answers
339 views

How can I listen emitted events from BSC network

How can I noticed and get the results of events whenever events are emitted on BSC network. I have tried web3.on() method, but the on() method can work with WebSocketProvider and BSC network does not ...
David Yu's user avatar
  • 111
0 votes
2 answers
164 views

Geth is not emitting pending transactons

I am connected to two nodes, mine and external. The external one emits pending transactions mine does not. I started geth full node (after downloading a snapshot of the network). After 24h using eth....
PhoenixPL's user avatar
1 vote
0 answers
379 views

Get addLiquidityTransaction on a specific contract on ethers.js

I'am trying to get an addLiquidityETH event in ethers.js with a WebSocket on a specific contract but got nothing, can someone tell me what am i missing ? const filter = { address: ' TOKEN ADDRESS ', ...
Juan Hernandez's user avatar
1 vote
2 answers
4k views

Is there a way to listen to log events via websocket with web3py

i am trying to listen to log events via my node's websocket server but i can't seem to find a way to do that using the web3Py lib. the asynchronous implementation of the docs is basically a threaded ...
Kaki Master Of Time's user avatar
1 vote
0 answers
211 views

Dex Data on BinanceSmartChain

I'm trying to get access to some data on the BSC using a websocket and the same methods as web3. I've sucessfully sent the following to get the latest swap pairs created at the PancakeSwap Factory: {\&...
user2146441's user avatar
5 votes
1 answer
6k views

Subscribing to events using ethers / hardhat network

I have a basic node express application. It connects to my locally running hardhat network via ethers & websocket. The connection seems to work, since I can query the blockchain succesfully (for ...
Fabian Scherer's user avatar
0 votes
1 answer
264 views

Why can't I establish a socket connection with Infura? Project ID is correct, I triple checked

I want to subscribe and listen to events that involve funds moving to my wallet, however I for some reason am not able to establish a socket connection to an Infura node. First I npm init and npm web3....
Teo's user avatar
  • 43
2 votes
1 answer
797 views

405 Method Not Allowed with websocket geth RPC

curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: XXXXXXX" -H "Origin: https://XXXXXXX/" -H "Content-Type: application/json" -X ...
Dobit's user avatar
  • 162
0 votes
1 answer
392 views

newPendingTransactions returning old transactions

I'm building an application where i need to keep track on new pending transactions. I'm somehow receiving old pending transactions, an example is this one https://etherscan.io/tx/...
ole's user avatar
  • 1
1 vote
3 answers
168 views

Is there a websocket URL in Ethereum classic like in Ethereum?

Can anyone tell me whether or not there is a WebSocket URL to deal with smart contract events in Ethereum Classic especially? I know ethereum supports WebSockets and we can easily listen to events ...
NinjaMAN's user avatar
  • 409
0 votes
1 answer
119 views

ROPSTEN: Duplicate Blocks adding transactions using Geth Real-Time Event API

I'm using the Geth Real-Time Event to get the new blocks via web-socket and there's a subscription called "newHeads" for that propose. The thing is sometimes the socket returns a duplicate ...
Fran Blázquez Matías's user avatar