Skip to main content

subscribe_sol_price - live SOL/USD

A single global feed of the current SOL/USD price, derived from the deepest on-chain SOL/USDC market. The server emits sol_price whenever the rate moves. This is the same rate used to fill priceUSD / mcapUSD on subscribe, exposed on its own so you can convert WSOL-quoted values yourself.

Takes no arguments. Free - never metered.

ChannelSocket.IO event
Authauth.api_key in the handshake
Emitssol_price

Example

import { io } from "socket.io-client";

const socket = io("https://api.pumpdata.fun", {
auth: { api_key: "pd_xxxxxxxx…" },
});

socket.on("sol_price", ({ price }) => {
console.log(`SOL is $${price}`);
});

socket.emit("subscribe_sol_price", (ack) => {
// ack.snapshot is the current value (or null if not known yet)
console.log("subscribed:", ack);
});

// later, to stop: socket.emit("unsubscribe_sol_price");

Response - sol_price

{
"price": 182.45,
"time": 1779812600
}

price is USD per SOL; time is the unix second of the update. On subscribe, the current snapshot is sent immediately (and also returned as ack.snapshot) so you have a value without waiting for the next move.

Try it

Notes

  • One global value - there is no mint / pool argument.
  • Free: subscribing and every sol_price event are never billed.
  • Use it to convert any WSOL-quoted price to dollars yourself, or just read priceUSD / mcapUSD straight off subscribe.