跳转到主要内容
WSS
通过 Datastream WebSocket 实时流式传输 Solana 钱包中单个代币持仓的 PnL 更新,借助 tradeUpdate 与 balanceUpdate 事件追踪盈亏与持仓变化。

SDK Example

apiKey
type:httpApiKey

API key for authentication. Include your Datastream key in the connection URL: wss://datastream.solanatracker.io/{DATASTREAM_KEY}

joinPnlTokenPosition
type:object

Subscribe to Token Position PnL

leavePnlTokenPosition
type:object

Unsubscribe from token position PnL

pnlTradeUpdateMessage
type:object

Trade update notification

pnlBalanceUpdateMessage
type:object

Balance update notification