Skip to main content

Questions tagged [websocket]

The tag has no usage guidance.

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

web3.js returns my id instead of result on Accountsubscribe so can't unsubscribe

Using the solana/web3.js sdk, when I use connection.onAccountChange which is basically the AccountSubscribe I get as result an id. const subscriptionId = connection.onAccountChange(ata, (info, context)...
Edwin B's user avatar
0 votes
0 answers
27 views

websocket "onAccountChange" is getting historical data

After subscribing to websocket for "onAccountChange" (this is real time changes, no historical data): I am receiving data from accounts that haven't changed in months I am receiving strange ...
J. Pablo García's user avatar
3 votes
1 answer
29 views

Fields meaning in RPC methods with websocket (accountSubscribe)

I'm experimenting with the RPC methods using websockets from solana.py. I didn't find a documentation describing precisely all fields in reply. As an example, AccountSubscribe methods should give the ...
microchip's user avatar
1 vote
1 answer
46 views

How to subscribe efficiently to multiple account using websockets

I would like to subscribe to multiple accounts using websockets. The example provided by the documentation show only the subscription to a log (which is fine) but with only one account. Basically, I ...
microchip's user avatar
0 votes
0 answers
13 views

Websocket and Pubsub client fails with senderror

PubsubClient::logs_subscribe fails randomly on websocket and its hard to debug. With nodeJS this works. websocket fails with receive error: "SendError(..)" use solana_client::pubsub_client::...
RParadox's user avatar
  • 101
0 votes
0 answers
28 views

Use websocket 'accountSubscribe' to get SWAP token address

hello i'm trying to use websocket's 'accountSubscribe' to get SWAP token address. I establish ws connection, use use 'accountSubscribe' and as there is a signal i use another api to check what swap ...
max's user avatar
  • 1
0 votes
1 answer
55 views

Title: Error -32601 "Method not found" When Calling `getAccountInfo` in JSON-RPC API

I'm encountering an issue with the JSON-RPC API when trying to use the getAccountInfo method. Despite using the correct method structure (as I have successfully used similar structures for other ...
Nerevaine's user avatar
  • 159
0 votes
1 answer
59 views

How to get inputs, outputs and amounts from logs?

If I subscribe to the logs event, I get logs like this: { "jsonrpc":"2.0", "method":"logsNotification", "params":{ "result":{ ...
user80100's user avatar
0 votes
1 answer
25 views

Does logsSubscribe only send notifications when the mentions address is logged?

https://solana.com/docs/rpc/websocket/logssubscribe I was looking through this and I saw mentions: [ ] - array containing a single Pubkey (as base-58 encoded string); if present, subscribe to only ...
qqqqqqqq's user avatar
0 votes
1 answer
108 views

How to Use WebSockets to Check if a Token Mint Address is Tradable on Raydium?

Does anyone here know how to check if the given token mint address is already tradable using WebSocket? My current code polls the token holders and checks if Raydium already exists as a holder. But it ...
Syntax Surge's user avatar
1 vote
1 answer
47 views

Can programSubscribe capture accounts that are closing?

An example of parsed account data from programSubscribe: { "info": { "isNative": false, "mint": "EePJGdJHNn8DunCcQsLFBtGpkg9pPoZDV6JiVCVSTkib", &...
Nicholas's user avatar
  • 481
0 votes
1 answer
186 views

Specific events from Token Program via Web Socket

I'm attempting to use the programSubscribe method to listen for specific types of Token Program events, namely "initializeMint". Essentially, I want to know about the creation of token ...
MolonLabe's user avatar
0 votes
0 answers
198 views

Decode data returned by programSubscribe

I can't figure out how to decode the 'data' received when subscribed (via websocket) to the Jupiter Limit Order Program (jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu). I'm using the program's IDL. This ...
TheLastSamurai's user avatar
3 votes
1 answer
85 views

Will accountSubscribe and programSubscribe repeatedly push an account within the same slot?

If I modify account data more than once in one transaction, and I subscribe this account throw accountSubscribe or programSubscribe. If the transaction has been included in one block, could I receive ...
nerver fork's user avatar
0 votes
2 answers
448 views

Get latest transactions using Solana RPC

I have looked a lot into RPC and WSS methods at the solana documentation but apart from the still under development blockSubscribe method (which doesn't work for most solana RPCs out there) I have ...
Zero's user avatar
  • 123
0 votes
1 answer
437 views

How to get new SPL transfers for an account

I intend to get the newest SPL transfers that happen in an account and have tried the WSS methods like programSubscribe and accountSubscribe on the Raydium Authority V4 program account. socket....
Zero's user avatar
  • 123
0 votes
1 answer
143 views

Is it possible for LogSubscribe wss to miss out on new logs from the tracked addresses?

I tried to use the log subscribe wss to track activities for a given address. I noticed that sometimes it would not push me all the confirmed log events. Is it because of the node that I'm using isn't ...
pythm's user avatar
  • 1
0 votes
1 answer
138 views

Solana py - Websocket Subscription to GetTokenAccountBalance

Based on my research, I came to know that encoding = "base64" would solve the error "solders.SerdeJSONError: a list or single element". But when we try to subscribe to ...
Praveen's user avatar
2 votes
1 answer
107 views

Transaction ID through Websocket

Is it possible to receive the latest transaction id from a wallet using websocket?
user7771's user avatar
2 votes
1 answer
323 views

Issue with LogSubscribe

My end goal is to get all new tokens being created, currently am doing this by using logSubscribe to the Token Program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) and filtering transactions. The ...
Jacobfinn123's user avatar
0 votes
2 answers
282 views

How does the filter option work?

If I want to use the WS-RPC to fetch tx's that have been made using a program. And if I only want tx's that are 50 bytes long then I send the WS server the following, right? jsonrpc: '2.0',...
Eric Goerens's user avatar
1 vote
1 answer
2k views

How to get live transactions through websockets?

Is there any method I can subscribe to in order to get live transactions data through websockets? I tried with logsSubscribe but it doesn't seem to be what I'm looking for.
user80100's user avatar
1 vote
1 answer
829 views

How to detect buy transactions on solana with websocket

I need to detect buy transactions on Solana, how can I do this? Does anyone have an example of how it could work? I created something, but without success so far, my biggest difficulty is identifying ...
debora's user avatar
  • 11
1 vote
0 answers
1k views

How can I listen to burn or token LP lock events on sol chain

I have been trying to get onchain events or messages regarding to token LP lock and burns, I have tried using the json rpc api, I listened to the response for hours but i couldn't find any burn or ...
Jack Bryan's user avatar
1 vote
0 answers
139 views

Websocket readyState 2

I've built a small program that monitors for new transactions on an address and then uses signatureSubscribe to watch for transaction confirmation. After running the program for a while, it will ...
Squirrel's user avatar
0 votes
1 answer
484 views

How can I get a pro-apis key for test?

How can I get a pro-apis key for test? I want to use these apis : https://pro-api.solscan.io/pro-api-docs/v1.0. Actually, I want to fillter the accounts' transfers at websocket or https. when I use ...
Ricky's user avatar
  • 1
1 vote
0 answers
33 views

Geyser closed account notifications

When an account is closed, the notification that comes from the geyser plugins account_update method includes the account with owner set to System Program - regardless of who the owner was before it ...
liamvovk's user avatar
  • 168
2 votes
1 answer
1k views

WebSocket connection failed

What is the correct URL to use for wss connection? I'm getting this error: websocket.browser.js:47 WebSocket connection to 'wss://api.mainnet-beta.solana.com/' failed My code used to work fine with ...
Philip Rego's user avatar
0 votes
0 answers
60 views

How can I listen to a change in ATA's balance for multiple accounts in my database?

How can I listen to a change in ATA's balance for multiple accounts in my database? I am trying to listen to all solana addresses and their ATA's to check for a change in their balance when a user ...
Ukpeh Michael's user avatar
2 votes
0 answers
482 views

Websocket programSubscribe and signatureSubscribe crash intermittent (WebSocket is not open: readyState 0 (CONNECTING)) [closed]

I'm having intermittent issues with a Node.js app where websockets listening to program or signature changes completely stop working and not recover. I'm using @solana/web3.js onProgramAccountChange/...
Omega's user avatar
  • 761
5 votes
2 answers
839 views

Error on connection.confirmTransaction: ws error

Problem Hello. I got a problem only on mainnet-beta. Everything is working fine on devnet. Right after my connection.sendTransaction, I'm doing a connection.confirmTransaction this way: const ...
Julien's user avatar
  • 51
1 vote
0 answers
188 views

Solana RPC Websocket Proxy Setup

I am working on solana node. I have two node running on big servers. I made some endpoints on my rpc node using express node JS. But i am facing an issue of web socket connectivity. Is there any way ...
Hussam Mustafa's user avatar
2 votes
1 answer
396 views

Websocket or Geyser to monitor many accounts

I'm looking to monitor 500+ accounts to do periodical operations and use the most recent data when there is a change on them (processed commitment). I'm wondering if websockets are actually the best ...
Ennio's user avatar
  • 21
1 vote
0 answers
234 views

token program onProgramAccountChange returns non-changed token accounts

A subscription to onProgramAccountChange with the tokenProgram returns token accounts for which the data did not change. For example ey66efq9ZyxhwLjCbnX9D7Nj5hre9DNrNRyxigUwgJw last transaction is a ...
Tomvkgames's user avatar
1 vote
0 answers
47 views

WS sometimes not dispatching log subscriptions?

I'm using SolanaPy's async websocket. I'm tracking one Solana wallet and one of it's token accounts. For some reason sometimes I don't get a notification for transactions.
Pirulax's user avatar
  • 21
1 vote
1 answer
126 views

Sometimes receiving duplicate logs using solana_client::nonblocking::pubsub_client::PubsubClient

I am using solana_client v1.10.34 nonblocking PubsubClient to subscribe to program logs and I am sometimes seeing duplicate logs with the same metadata but 1 slot apart. Is this a bug? Ps: Must use ...
Jayyunit's user avatar
2 votes
1 answer
401 views

Latency is RPC response and websocket

I have a websocket which points at my wallet, And I also have a websocket setup to get the latest event on my wallet. I have tried sending an airdrop from CLI tool : link The moment the transaction ...
Reza Aslejeddian's user avatar
1 vote
1 answer
818 views

How do I use "onAccountChange" to subscribe to a Solana web socket?

const [reloadMessageList, setReloadMessageList] = useState(false); useEffect(() => { fetchChatMessages().then(() => {}); }, [reloadMessageList]); const connection = new Connection(...
user2892730's user avatar
1 vote
0 answers
103 views

Severe latency in Solana web3 app WebSocket call [closed]

I'm working on a Solana web3 app using the @solana/wallet-adapter-react package. The function calls a contract that modifies some accounts. It then takes the transaction ID, awaits confirmation, (with ...
Andrew's user avatar
  • 11
1 vote
0 answers
114 views

RPC websocket keeps skeeping transactions

Hello guys this my first ever question here. I am currently working on NFTs market analysis project and trying to listen to transactions that are happening on NFTs marketplaces. For example i am ...
Seif Eddine Mejri's user avatar
2 votes
1 answer
474 views

Do I need a validator or RPC node in order to use Geyser?

I want to use Geyser plugins but I need to know do I need a power full computer in order to run a validator or RPC node? if yes what are the hardware requirements ? The estimated requests per month is ...
Reza Aslejeddian's user avatar
1 vote
1 answer
154 views

Meaning of slotSubscribe

What does the slot in slotSubscribe actually mean? It is not processed, confirmed, or finalized from what I can tell. Edit: The official documentation is not useful.
Heisenberg's user avatar
4 votes
2 answers
119 views

What is the lifecycle state of a transaction sent by a RPC websocket server?

Let's say Bob is connected to the mainnet-beta RPC WebSocket, listening to Alice wallet. If Alice creates a transaction from her client, and send it to mainnet-beta RPC. Does mainnet-beta: directly ...
mehh's user avatar
  • 117