We changed our privacy policy. Read more.

Questions tagged [websocket]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 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 ...
1
vote
0answers
66 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 ...
0
votes
0answers
47 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 ...
0
votes
2answers
47 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....
0
votes
0answers
125 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 ', ...
0
votes
1answer
148 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 ...
0
votes
0answers
17 views

Can I use a subnet mask with ws.origins?

I am trying to run my own geth node, as I am interested in monitoring the txpool's pending and queued transactions. I plan to mostly use a websocket connection from the same server, but it's possible ...
0
votes
0answers
32 views

does geth have timeout options for json and websocket servers?

Does anyone know a way to set a timeout value for hung websocket connections? sometimes i will get a hung connection that never closes and i have no way to kill it. i dont see any timeout values in ...
1
vote
0answers
88 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: {\&...
1
vote
1answer
748 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 ...
0
votes
1answer
61 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....
2
votes
1answer
135 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 ...
0
votes
1answer
58 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/...
1
vote
2answers
36 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 ...
0
votes
1answer
36 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 ...
1
vote
0answers
48 views

What to do to enable Websocket Steam on Ethereum Node Server for NodeJS endpoint API

I have Ethereum node by providing ws and http port access through windows server, I filter the data and get the data I want.I created the node.js api endpoint to provide this data, so I can apply my ...
2
votes
2answers
766 views

Ethereum Wallet - Hangs at startup + 403 ws error

I have installed the Ethereum Wallet, Ethereum-Wallet-win64-0-11-1 (zip file), as described in the book. When I start up Ethereum Wallet (testnet Ropsten, syncmode “light”) the wallet seems to load ...
9
votes
2answers
11k views

How to listen to contract events using ethers.js?

I need to listen to the specific contract events and do some task once the event is emitted. I didn't find proper docs on ethers.js documentation. Can anybody tell me how can I keep listening to my ...
1
vote
1answer
1k views

Websocket provider reconnects every 1 minute

I'm developing an application on a private Ethereum chain and trying to listen to some events. I wrote a basic indexer script for listening to events and writing them in a database. To listen to the ...
1
vote
0answers
13 views

Cannot connect to Azure PoA Websocket

Just like question Connecting to blockchain on azure using web3.js and websocket, I need to use websockets to capture events. I have gotten my http and websocket endpoints from the deployment outputs ...
0
votes
2answers
991 views

What is the websocket URL in Ethereum on Geth?

I've lunched an Ethereum server based on Geth. Now, I need to be notified about all incoming transactions on my generated accounts. In my previous Bitcoin Core server, I had an option in its config ...
2
votes
0answers
33 views

Azure Blockchain Service node properties [closed]

What exactly are Access key 1, Access key 2, Member account, Web socket, DNS, creater account, etc. of a node in Azure Blockchain Service? I am getting confused as to what are these. Also what are the ...
2
votes
0answers
53 views

How to use Truffle HDWallet Provider with WebSocketProvider

Truffle HDWallet Provider works well with HttpProvider, but doesn't work with WebSocketProvider.
1
vote
0answers
179 views

Connection not open on send when subscribing to new block headers

I am running a local ethereum node with the below configuration geth --syncmode "full" --datadir "." --ethash.dagdir "." --cache=4096 --rpc --rpcaddr test.example.com --rpcapi="web3,miner,admin,...
0
votes
1answer
278 views

Erc-20 Token Send Transaction

I want some Information about Erc-20 Transactions. I want to transfer Erc-20Token from first wallet to a second wallet, I have Privet Key, But I want to transfer with Api, So How can I transfer the ...
1
vote
1answer
106 views

Generate new address, Send and Get transaction then Check transaction

I'm just starting in the ethereum and trying to build an app using Web3 and Nodejs. I'll need your lights so I can get any idea to know how to resolve those points: I have my own public address and ...
0
votes
1answer
563 views

geth subscribe newHeads not working

I run geth with this command geth --syncmode "fast" --cache 2048 --datadir /data/ethereum --ws --wsaddr 0.0.0.0 --wsorigins '*' --wsapi 'web3,eth,net,db,personal' --rpc --rpcaddr 0.0.0.0 then i ...
0
votes
0answers
146 views

Events using Infura websockets on rinkeby Web3 1.2.1. Returned values aren't valid, did it run Out of Gas?

I am trying to do a simple event listener with NodeJS and Web3 using an Infura endpoint. I have the correct project-id const Web3 = require('web3'); let web3 = new Web3( // Replace YOUR-PROJECT-ID ...
0
votes
2answers
776 views

TimeoutError when using Infura websocket with web3.py

When I run the following code sometimes it executes successfully, but most of the time it raises a concurrent.futures._base.TimeoutError. What can I do to fix this? Here is the code: infura_url_ws = ...
0
votes
1answer
1k views

How to connect with WebSocket with Web3?

Already referred web3 documentations and other Q-A for web socket connection. Currently using infura as provider.
1
vote
1answer
142 views

Subscribe to events using local geth in light mode?

I've followed this guide to subscribe to events. I succesfully subscribed to the new block headers using Infura provider. But when I try to use local geth node syncing in light mode, it connects, but ...
1
vote
0answers
689 views

Problem connecting web3 via websocket to node with nginx

we are trying to connect to a geth node via WebSockets to be able to subscribe to contract events. This node is created with docker and this docker uses nginx as a proxy. We can connect easily with ...
1
vote
0answers
46 views

Infura websocket API timing out on connect

Has anyone ever had issues with the Infura Websocket API suddenly ceasing to respond. I have been using it to subscribe to event logs, but now the connection to the API is timing out.
1
vote
0answers
261 views

Ocasional connection refused initializing web3

I have an ethereum web application using web3js 1.0.0-beta.34 on a private network. Most of the times everything works fine. Sometimes the connection to the node through a websocket provider fails ...
0
votes
1answer
428 views

Infura Web Sockets doesn't work on Infura

I have a problem with connecting via Websockets to Infura. I am listening on some events from my smart contract, so when some event is dispatched by calling some method from smart contract, I should ...
1
vote
1answer
653 views

Error on WebSocket connection to Infura Ropsten (broken close frame)

I am trying to connect to Ropsten with Web3js (1.0) via Infura using their WebSocket provider but I am getting the following error: WebSocket connection to 'wss://ropsten.infura.io/ws' failed: ...
0
votes
1answer
487 views

geth event newPendingTransactions does not occur

I've got running geth with next command: $ geth --testnet --networkid 3 --verbosity 3 --syncmode light --ipcdisable --ws --wsapi "db,eth,net,web3,personal,txpool,admin,miner" --wsorigins '*' In ...
0
votes
1answer
850 views

How to apply EthFilter to specific address?

In web3.js, we can apply event filter something like below: this.event = this.Contract.events.MyEvent({ filter: { address: "0xAccountAddress" }, }) In Web3J, it is translated to EthFilter ...
1
vote
1answer
466 views

Having issue with Infura mainnet web3 connection and getting info

I have been looking at a tutorial from DappUniversity about Web3... on the introductory video, I have completed all stages fine, but when getting to retriving account balance information from the ...
3
votes
0answers
588 views

ping / pong pattern for infura websocket [closed]

Infura websockets disconnect after an hour of in-activity so they suggest you ping / pong the connection at an interval less then an hour. My problem is I'm new to server-side programming and don't ...
6
votes
0answers
659 views

What is the safest way to use WS-RPC server in geth?

In this answer, it is suggested that it is not safe to use --wsorigins="*" for security reasons. What are the security reasons? => How could I make WS-RPC server connection secure in geth?...
2
votes
0answers
261 views

Cannot Connect to Geth Web Socket from Other PC on LAN

I have a geth node running on one PC, IP 192.168.0.105 and on my main dev machine IP 192.168.0.102, I'm trying to connect to it via web sockets but keep getting connection not open. Both are on the ...
2
votes
1answer
270 views

Connecting to blockchain on azure using web3.js and websocket

right now, I am trying to write a service using web3 which will 'subscribe' to all 'perndingtransactions' on blockchain to perform further actions. web3 documentation says that 'Httpprovider' cant be ...
1
vote
2answers
2k views

TypeError: Cannot set property 'method' of undefined when using WebsocketProvider

I'm using: web3 v0.20.6 web3-providers-ws v1.0.0-beta.34 First question - can web3-providers-ws be used with web3 v0.20.*? Second question (problem) - I get an error when probably trying to send ...
2
votes
3answers
9k views

web3 Websocket connection to infura

I receive this error when I'm trying to connect to the websocket WebSocket connection to 'wss://ropsten.infura.io/ws' failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol'...
0
votes
1answer
1k views

"Connection not open" error when subscribing to address with websocket

I'm trying to subscribe to transactions sent to or from a particular ethereum address. I also want to test this in a local private network, which is why I'm not using etherscan or something like that. ...
0
votes
1answer
228 views

Get a large amount of blocks with web3 (nodejs)

I'm writing a nodejs program that gets a large amount of blocks (>100,000) and looks at each transaction inside to filter / analyse the data. I'm currently using web3 (v1) getBlock function: eth....
0
votes
0answers
166 views

Unable to catch contract event using parity websockets

I have a contract deployed on ropsten which emits event when ether amount is deposited in it. I can see the event appearing in etherscan. this.web3Socket = new Web3(new Web3.providers....
9
votes
1answer
2k views

web3 websocket connection prevents node process from exiting

I have a node js process that creates a web3 websocket connection, like so: web3 = new Web3('ws://localhost:7545') When the process completes, it does not exit, but rather hangs forever with no ...
4
votes
7answers
5k views

Is there any websocket ethereum provider?

Is there any websocket ethereum provider? Except etherscan one. Maybe there are paid wss subscriptions?