Skip to content

Commit cb54744

Browse files
committed
Added Global Fees API + Websocket Tracking
1 parent 6d0f34e commit cb54744

File tree

3 files changed

+24
-28
lines changed

3 files changed

+24
-28
lines changed

examples/datastream.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -220,29 +220,6 @@ const subscribeToPoolTransactions = (
220220
return subscription;
221221
};
222222

223-
// Subscribe to transactions for a specific wallet
224-
const subscribeToWalletTransactions = (walletAddress: string = WALLET_ADDRESS) => {
225-
const subscription = dataStream.subscribe.tx.wallet(walletAddress).transactions().on((data) => {
226-
console.log(`Wallet ${data.type.toUpperCase()} transaction`);
227-
console.log(`Transaction ID: ${data.tx}`);
228-
console.log(`Amount: ${data.amount}`);
229-
console.log(`Price: $${data.priceUsd}`);
230-
console.log(`Volume: $${data.volume}`);
231-
console.log(`SOL Volume: ${data.solVolume}`);
232-
233-
if (data.token) {
234-
console.log('Token Details:');
235-
console.log(`From: ${data.token.from.name} (${data.token.from.symbol})`);
236-
console.log(`To: ${data.token.to.name} (${data.token.to.symbol})`);
237-
}
238-
239-
console.log(`Time: ${new Date(data.time).toLocaleTimeString()}`);
240-
console.log('---');
241-
});
242-
243-
return subscription;
244-
};
245-
246223

247224
const subscribeToPumpFunCurvePercentage = () => {
248225
const subscription = dataStream.subscribe.curvePercentage('pumpfun', 30);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solana-tracker/data-api",
3-
"version": "0.1.3",
3+
"version": "0.1.4",
44
"description": "Official Solana Tracker Data API client for accessing Solana Data",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",

src/datastream.ts

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1323,11 +1323,11 @@ export interface WalletTransaction {
13231323
type: 'buy' | 'sell';
13241324
wallet: string;
13251325
time: number;
1326-
price: {
1326+
price: {
13271327
quote: number;
13281328
usd: number;
13291329
}
1330-
volume: {
1330+
volume: {
13311331
usd: number;
13321332
sol: number;
13331333
}
@@ -1406,7 +1406,7 @@ export interface Top10HoldersUpdate {
14061406
timestamp: number;
14071407
}
14081408

1409-
export interface Fees {
1409+
export interface Fees {
14101410
photon?: number;
14111411
bloom?: number;
14121412
bullx?: number;
@@ -1428,8 +1428,27 @@ export interface Top10HoldersUpdate {
14281428
[key: string]: number | undefined;
14291429
}
14301430

1431+
export interface TransactionFees {
1432+
photon?: number;
1433+
bloom?: number;
1434+
bullx?: number;
1435+
axiom?: number;
1436+
vector?: number;
1437+
jito?: number;
1438+
'0slot'?: number;
1439+
'helius-sender'?: number;
1440+
nextblock?: number;
1441+
trojan?: number;
1442+
soltradingbot?: number;
1443+
maestro?: number;
1444+
padre?: number;
1445+
network?: number;
1446+
[key: string]: number | undefined;
1447+
}
1448+
14311449
export interface FeesUpdate {
1432-
fees: Fees;
1450+
total: Fees;
1451+
fees: TransactionFees;
14331452
tx: string;
14341453
time: number;
14351454
}

0 commit comments

Comments
 (0)