#
Transactions
#
GET /solana/firehose
Firehose
This is a firehose endpoint and requires a Tier 1 plan to access due to the large volume of objects emitted.
Uses Websockets to retrieve transaction objects from a selected smart contract.
Available smart contracts:
- pump.fun
6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P
Available filters:
spam: Emits non spammy objects (transactions where both SOL and tokens have been echanged)
import WebSocket from 'ws';
const ws = new WebSocket(`wss://api.coinfactory.io/solana/firehose?auth={key}`);
ws.addEventListener('open', function open() {
ws.send(JSON.stringify({
"action": "subscribe",
"programs": ["6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"],
"filter": {
"min": 100000 // lamports
}
}));
});
ws.addEventListener('message', (data) => {
console.log(data);
});