Trades

WS
Real-Time: wss://socket.polygon.io/crypto

Stream trade data for crypto pairs via WebSocket. Each message delivers key trade details (price, size, exchange, conditions, and timestamps) as they occur, enabling users to track market activity, power live dashboards, and inform rapid decision-making.

Use Cases: Live monitoring, algorithmic trading, market analysis, data visualization.

Parameters
ticker
string
required
Specify a crypto pair in the format {from}-{to} or use * to subscribe to all crypto pairs. You can also use a comma separated list to subscribe to multiple crypto pairs. You can retrieve active crypto tickers from our Crypto Tickers API.
Response Attributes
ev
enum (XT)
The event type.
pair
string
The crypto pair.
p
number
The price.
t
integer
The Timestamp in Unix MS.
s
number
The size.
c
array (integer)
The conditions. 0 (or empty array): empty 1: sellside 2: buyside
i
integer
The ID of the trade (optional).
x
integer
The crypto exchange ID. See Exchanges for a list of exchanges and their IDs.
r
integer
The timestamp that the tick was received by Polygon.
Code Examples
Subscription Request
WS
Log in or Sign up to Polygon to customize the websocket code examples. It's free.
Response Object
Did you find this page helpful?
Do you still need help with something?