Questions tagged [websocket]
The websocket tag has no usage guidance.
84
questions
0
votes
0
answers
11
views
how to use infura websocket to get notify receive eth?
i have tried using infura to create transaction, smartcontract, and nft.
but i still lack and get issue to use websocket, to notify in received transaction. i want to use some address maybe 10-20 ...
0
votes
0
answers
8
views
how to access ws connection in nodejs when truffle-config enables websockets
here is my truffle-config.js
module.exports = {
networks: {
development: {
host: "127.0.0.1",
port: 9545,
network_id: "*",
websockets: true
...
0
votes
1
answer
47
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 ...
0
votes
1
answer
103
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 ...
0
votes
0
answers
45
views
How can you listen for certain events to have real-time updating on your front-end?
For example, if using ERC721A there is a _totalMinted() function that returns the current amount of minted tokens. Can you listen for a successful mint and then have your front-end display that value ...
0
votes
1
answer
94
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.
0
votes
0
answers
25
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?
0
votes
0
answers
100
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 ...
1
vote
0
answers
168
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 ...
1
vote
1
answer
102
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 ...
0
votes
0
answers
110
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 ...
0
votes
0
answers
147
views
Trying to use an Alchemy Websockets address to subscribe to an event but it errors out when it tries to update
Here is the script:
const Big = require('big.js');
const blk = require('./blockchain');
const UniswapV2Pair = require('./abi/IUniswapV2Pair.json');
const cc = require('./common_code');
const ...
0
votes
0
answers
173
views
Cannot connect geth via JSON RPC or WebSocket, only via IPC
I run the geth-cli with
$ geth console --mainnet --syncmode "snap" --cache=8192 --datadir "~/.ethereum" --datadir.minfreedisk 30000 --http.corsdomain "*" --ws --http.api ...
0
votes
0
answers
243
views
TypeError: Cannot read property 'callback' of undefined
my code
const providerWs = new ethers.providers.WebSocketProvider('quicknode wss provider');
providerWs.on('pending', async (txHash) => {
try {
const transaction = await ...
0
votes
0
answers
18
views
Track wallet address for new transactions in real time [duplicate]
I'm trying to find the best way of tracking an Ethereum wallet address for any new transactions in real time (or as close to it as possible) and then do some filtering on it.
I've tried using the web3....
0
votes
0
answers
416
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 ...
0
votes
0
answers
28
views
Cannot connect to _provider.on('open') event for checking latency web3js
Im trying to check latency to my node, here's the code :
const checkLatency = async () => {
return new Promise(async function(resolve, reject) {
let connectionStartDate = Date.now();
let ...
0
votes
1
answer
674
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/...
0
votes
0
answers
66
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 = ...
0
votes
0
answers
101
views
Stop the suscription.on() web3 subscription
I am trying to check the first next incoming transactions for a given wallet. I am using a function watchTransaction() only when expecting a transaction. I want to stop once the transaction is ...
0
votes
0
answers
132
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 " ....
0
votes
0
answers
61
views
How instant and up to date are the wesocket event logs when using a light client?
I am trying to listen for event logs from a geth light node hooked up to the BSC mainnet. my observation is that i keep getting events with old block numbers that range from 100 to a 1000 old. My ...
0
votes
0
answers
387
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 ...
2
votes
0
answers
290
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 ...
1
vote
0
answers
240
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
2
answers
76
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....
1
vote
0
answers
287
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 ',
...
1
vote
1
answer
2k
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 ...
1
vote
0
answers
143
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:
{\&...
2
votes
1
answer
3k
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
1
answer
169
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
1
answer
385
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
1
answer
228
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
3
answers
79
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
1
answer
68
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
0
answers
87
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
2
answers
1k
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 ...
26
votes
2
answers
39k
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
1
answer
3k
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
0
answers
19
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
2
answers
2k
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
0
answers
36
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 ...
3
votes
0
answers
126
views
How to use Truffle HDWallet Provider with WebSocketProvider
Truffle HDWallet Provider works well with HttpProvider, but doesn't work with WebSocketProvider.
1
vote
0
answers
259
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
1
answer
357
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
1
answer
172
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
1
answer
872
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
0
answers
199
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 ...
2
votes
4
answers
1k
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
1
answer
3k
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.