subscribe_wallet_trades - every transaction a wallet signs
Name the wallets you track and you get every transaction each one signs, as it lands. By default, its launchpad transactions: trades, launches, liquidity and fee claims, as the Advanced Data Stream describes them, with what the transaction paid and what moved in and out of the wallet. With allTransactions: true you get everything else it signs too: SOL and token transfers, account closes, anything. With details: true each one comes with the whole transaction: every account, every instruction with the inner ones and the common programs decoded (system, token, associated token account, compute budget, memo), every balance change and the logs. Server emits wallet_transaction, and wallet_trades_status when a wallet cannot be followed.
Only transactions the wallet signed: SOL someone else sends to it, or a trade a relayer signs for it, is not one of them. It is live: nothing from before you subscribe.
| Channel | Socket.IO event |
| Auth | none needed for 1 wallet; your plan's key for more |
| Emits | wallet_transaction, wallet_trades_status |
| Wallets | 1 on Free, 25 on Lite, 250 on Developer, 1,000 on Professional |
Example
- JavaScript
- Python
import { io } from "socket.io-client";
const socket = io("https://sol.shrine.trade", { auth: { api_key: "sk_…" } });
socket.on("wallet_transaction", (tx) => {
for (const e of tx.events) {
if (e.action === "buy" || e.action === "sell") console.log(tx.wallet, e.action, e.mint, e.quoteAmount, e.protocol);
}
if (!tx.launchpad) console.log(tx.wallet, "other", tx.programs, tx.solChangeLamports / 1e9, "SOL");
});
socket.on("wallet_trades_status", (s) => console.log(s.wallet, s.status, s.reason ?? ""));
socket.emit(
"subscribe_wallet_trades",
{
wallets: ["9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG", "5Ln2…Qe7d"],
allTransactions: true, // SOL transfers and the rest too
details: false, // true: every account, instruction and log
},
(ack) => console.log(ack.wallets.length, "wallets followed"),
);
// later: socket.emit("unsubscribe_wallet_trades", { wallets: ["5Ln2…Qe7d"] });
import socketio
sio = socketio.Client()
@sio.on("wallet_transaction")
def on_tx(tx):
for e in tx["events"]:
if e["action"] in ("buy", "sell"):
print(tx["wallet"], e["action"], e.get("mint"), e.get("quoteAmount"))
if not tx["launchpad"]:
print(tx["wallet"], "other", tx["programs"], tx["solChangeLamports"] / 1e9, "SOL")
@sio.on("wallet_trades_status")
def on_status(s):
print(s["wallet"], s["status"], s.get("reason", ""))
sio.connect("https://sol.shrine.trade", auth={"api_key": "sk_…"})
sio.emit("subscribe_wallet_trades", {
"wallets": ["9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG"],
"allTransactions": True,
"details": True,
}, callback=lambda ack: print(ack["wallets"]))
sio.wait()
Options
| Option | Default | |
|---|---|---|
wallets | required | The wallets to follow: a list, or a comma-separated string. wallet works for one. Up to 1,000 in one call. |
allTransactions | false | Every transaction the wallets sign, not only the ones with launchpad events: SOL and token transfers, account closes, swaps on venues we do not index, anything. |
details | false | The whole transaction under details, see below. |
The options apply to the wallets named in the call. Subscribing again with a wallet you already follow changes its options; new wallets are added to the ones you have. Asking for more wallets than your plan has left refuses the whole call, and nothing is added.
Ack
{
"ok": true,
"added": ["9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG"],
"options": { "details": false, "allTransactions": true },
"wallets": ["9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG", "5Ln2…Qe7d"],
"notices": []
}
added- the wallets this call added;wallets- every wallet this socket follows.notices- a wallet among them that is paused or refused right now, as the status said it.
Response - wallet_transaction
One message per transaction and followed wallet that signed it.
{
"wallet": "9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG",
"signature": "4tx…",
"block": 447483507,
"txIndex": 412,
"timestamp": 1790000012,
"signers": ["9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG"],
"launchpad": true,
"programs": ["ComputeBudget111111111111111111111111111111", "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"],
"computeUnitPrice": 1000000, "computeUnitLimit": 150000, "priorityFeeLamports": 150000,
"tipLamports": 1000000, "txFeeLamports": 155000, "computeUnitsConsumed": 87412,
"solChangeLamports": -517155000,
"tokenChanges": [
{ "mint": "Gc6r…pump", "account": "7Hq…", "decimals": 6, "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"change": 31952.74, "changeRaw": "31952740000", "balance": 31952.74, "balanceRaw": "31952740000" }
],
"events": [
{ "action": "buy", "protocol": "PUMPFUN", "mint": "Gc6r…pump", "pool": "…", "tokenAmount": 31952.74, "quoteAmount": 0.5, "price": 0.0000156,
"tradersInvolved": ["9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG"], "breakdown": [ … ], "…": "…" }
]
}
| Field | |
|---|---|
wallet | The followed wallet that signed it. |
signature, block, txIndex | The transaction, its slot and its place in the block. |
timestamp | The chain's time for the slot, in seconds. |
signers | Every signer of the transaction, the fee payer first. |
launchpad | true when it has launchpad events. Without allTransactions you only get these. |
programs | The programs its instructions call, in order, each once. |
computeUnitPrice … computeUnitsConsumed | What it paid to land, as on the Advanced Data Stream. |
solChangeLamports | The wallet's SOL balance after minus before, the fee included. |
tokenChanges | Each token account of the wallet whose balance moved: change and balance in whole tokens, changeRaw and balanceRaw exact, in the mint's smallest unit. An account opened in the transaction shows its whole balance as the change; one closed shows balance 0. |
events | Its events exactly as the Advanced Data Stream sends them: trades with the per-swap breakdown, reserves and fees, launches, migrations, liquidity, fee claims. Empty when it has none. |
details | Only with details: true. |
Details
"details": {
"version": 0,
"recentBlockhash": "…",
"feeLamports": 155000,
"accounts": [
{ "address": "9AiX…", "signer": true, "writable": true, "source": "message" },
{ "address": "7Hq…", "signer": false, "writable": true, "source": "lookupTable" }
],
"addressTableLookups": [{ "table": "…", "writableIndexes": [3], "readonlyIndexes": [0, 1] }],
"instructions": [
{
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"accounts": ["9AiX…", "7Hq…", "9AiX…", "Gc6r…pump", "11111111111111111111111111111111", "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"],
"data": "2",
"parsed": { "program": "spl-associated-token-account", "type": "createIdempotent",
"info": { "source": "9AiX…", "account": "7Hq…", "wallet": "9AiX…", "mint": "Gc6r…pump", "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" } },
"inner": [
{ "programId": "11111111111111111111111111111111", "accounts": ["9AiX…", "7Hq…"], "data": "…", "stackHeight": 2,
"parsed": { "program": "system", "type": "createAccount", "info": { "source": "9AiX…", "newAccount": "7Hq…", "lamports": 2039280, "space": 165, "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" } } }
]
}
],
"solChanges": [{ "address": "9AiX…", "preLamports": 2100000000, "postLamports": 1582845000, "changeLamports": -517155000 }],
"tokenChanges": [{ "account": "7Hq…", "owner": "9AiX…", "mint": "Gc6r…pump", "decimals": 6, "tokenProgram": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
"preRaw": "0", "postRaw": "31952740000", "change": 31952.74, "changeRaw": "31952740000" }],
"logs": ["Program ComputeBudget111111111111111111111111111111 invoke [1]", "…"]
}
| Field | |
|---|---|
version | "legacy" or 0. |
accounts | Every account in the order instructions index them: the message's own, then those loaded from lookup tables (writable, then read-only). source says which. |
addressTableLookups | The lookup tables used and the indexes taken from each. |
instructions | Each instruction: programId, accounts as addresses, data in base58, and inner, the instructions it called, with their stackHeight. Instructions of the system, SPL Token, Token-2022, associated token account, compute budget and memo programs also carry parsed: the instruction's name under type and its accounts and amounts under info (token amounts as strings, in the smallest unit). |
solChanges | Every account whose SOL balance moved, in lamports. |
tokenChanges | Every token account whose balance moved, whoever owns it. |
logs | The program logs, null when the node kept none. |
Status
{ "wallet": "9AiX…", "status": "paused", "reason": "busy", "untilMs": 1790000612000 }
{ "wallet": "9AiX…", "status": "resumed" }
{ "wallet": "Ft3Q…", "status": "refused", "reason": "not_a_wallet" }
These concern allTransactions only, the part that follows the wallet everywhere on chain. Its launchpad transactions are unaffected and keep coming.
refused- the address cannot be followed there:not_a_wallet(it is off the curve, a program-derived address, which never signs a transaction),tip_accountorprogram(a program or account in a large share of all transactions).paused- the address was in more than 200 transactions in 10 seconds that it did not sign, which a pool, a fee wallet or a program is: its other transactions are left out untiluntilMs(10 minutes), thenresumed.
A wallet that only signs, however busy, is never paused.
Unsubscribe
socket.emit("unsubscribe_wallet_trades", { wallets: ["9AiX…"] }, (ack) => console.log(ack.wallets));
socket.emit("unsubscribe_wallet_trades", {}); // every wallet on this socket
Errors
error | When |
|---|---|
invalid_request | No wallets, one that is not a Solana address, or more than 1,000 in one call (message says which). |
limit_exceeded | More wallets than your plan has left, across all your sockets (plan, message, upgrade). Unsubscribe some first. |
If you do not pass an ack callback, the error is emitted as a subscription_error event instead. See when you reach a limit for the shape.
Try it
Notes
- Free:
wallet_transactionandwallet_trades_statusare never billed. - Wallets per plan, counted across all your sockets (per key, or per address without one): 1 on Free, 25 on Lite, 250 on Developer and 1,000 on Professional. The wallet stream has its own wallets, the same number.
- Failed transactions are not sent.
- A transaction two of your wallets signed comes once for each, with its own
wallet. - Transactions go out as soon as their block is seen, before the network confirms it. Now and then a block is dropped and its transactions land again in a later one: the same
signaturethen comes twice, with a differentblock. Where it must be exact, check the transaction once its block is confirmed. - The launchpads and venues in
eventsare the Advanced Data Stream's. - Every trade of the tokens a wallet trades, by anyone, rather than its own transactions? Use
subscribe_wallet.
LimitsFree 1 walletLite 25 walletsDeveloper 250 walletsProfessional 1,000 walletsSee plans →