Messages
{
"type": "join",
"room": "pm:crypto:btc:prices"
}{
"type": "leave",
"room": "pm:crypto:btc:prices"
}{
"type": "message",
"room": "pm:crypto:btc:prices",
"data": {
"type": "trade",
"channel": "trades",
"exchange": "polymarket",
"marketId": "1234567890",
"timestamp": 1785347120123
}
}Prediction Markets — Crypto
Canal de precios de subyacentes crypto por WebSocket
Recibe los mismos ticks de Chainlink por activo que la sala de subyacentes crypto, por WebSocket de Datastream, limitados al canal prices, para gráficos up/down.
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.pm.crypto('btc').prices().on((data) => {
console.log(data);
});
// sub.unsubscribe();
Messages
{
"type": "join",
"room": "pm:crypto:btc:prices"
}{
"type": "leave",
"room": "pm:crypto:btc:prices"
}{
"type": "message",
"room": "pm:crypto:btc:prices",
"data": {
"type": "trade",
"channel": "trades",
"exchange": "polymarket",
"marketId": "1234567890",
"timestamp": 1785347120123
}
}apiKey
type:httpApiKey
API key for authentication. Include your Datastream key in the connection URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}
joinCryptoUnderlyingPrices
type:object
Subscribe to Chainlink underlying price ticks (prices alias)
leaveCryptoUnderlyingPrices
type:object
Unsubscribe from Crypto Underlying Prices
cryptoUnderlyingPricesMessage
type:object
Crypto Underlying Prices update
¿Esta página le ayudó?