Messages
{
"type": "join",
"room": "price:EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump"
}{
"type": "leave",
"room": "price:EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump"
}{
"type": "message",
"room": "price:EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump",
"data": {
"price": 0.000008006,
"price_quote": 0.0000010064,
"pool": "EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump",
"token": "EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump",
"time": 1723728065246
}
}Precios en vivo
Precios de tokens de Solana por pool en vivo
Recibe por WebSocket de Datastream precios en vivo de un pool DEX de Solana concreto para alimentar gráficos por pool y alertas de trading a nivel de pool.
WSS
/
SDK Example
import { Datastream } from '@solana-tracker/data-api';
const dataStream = new Datastream({
wsUrl: 'wss://datastream.solanatracker.io/YOUR_API_KEY',
});
dataStream.on('error', console.error);
await dataStream.connect();
const sub = dataStream.subscribe.price.pool('9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2').on((data) => {
console.log(data);
});
// sub.unsubscribe();
Messages
{
"type": "join",
"room": "price:EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump"
}{
"type": "leave",
"room": "price:EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump"
}{
"type": "message",
"room": "price:EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump",
"data": {
"price": 0.000008006,
"price_quote": 0.0000010064,
"pool": "EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump",
"token": "EWiYmq3nWQpoTkcU4UfGYEoYvDHduDsXhpPvqmoqpump",
"time": 1723728065246
}
}apiKey
type:httpApiKey
API key for authentication. Include your Datastream key in the connection URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
joinPricePool
type:object
Subscribe to pool price updates
leavePricePool
type:object
Unsubscribe from pool price
pricePoolMessage
type:object
Pool price update
¿Esta página le ayudó?