Update Polymarket documentation - March 30, 2026
Updated 229 documentation pages reflecting latest official docs changes: - API Reference: authentication, rate-limits, clients-sdks, market-data endpoints - Developers: CLOB, Gamma Markets, RTDS, Sports Websocket, Builders, CTF - Trading: fees, bridge, orders, orderbook, clients - Polymarket Learn: get-started guides, deposits, trading - Builders: tiers, api-keys, profile, examples, order-attribution - Quickstart: overview, first-order, websocket guides - Concepts: markets-events, prices-orderbook, resolution - Market Makers: getting-started, trading, liquidity-rewards - Resources: error-codes, contract-addresses, blockchain-data
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
|
||||
# Real-Time Data Socket
|
||||
|
||||
> Stream comments and crypto prices via WebSocket
|
||||
> Stream comments, crypto prices, and equity prices via WebSocket
|
||||
|
||||
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for **comments** and **crypto prices**.
|
||||
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for **comments**, **crypto prices**, and **equity prices**.
|
||||
|
||||
<Card title="TypeScript client" icon="github" href="https://github.com/Polymarket/real-time-data-client">
|
||||
Official RTDS TypeScript client (`real-time-data-client`).
|
||||
@@ -59,18 +59,18 @@ All messages follow this structure:
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | ----------------------------------------------------------- |
|
||||
| `topic` | string | The subscription topic (e.g., `crypto_prices`, `comments`) |
|
||||
| `type` | string | The message type/event (e.g., `update`, `reaction_created`) |
|
||||
| `timestamp` | number | Unix timestamp in milliseconds when the message was sent |
|
||||
| `payload` | object | Event-specific data object |
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | --------------------------------------------------------------------------- |
|
||||
| `topic` | string | The subscription topic (e.g., `crypto_prices`, `equity_prices`, `comments`) |
|
||||
| `type` | string | The message type/event (e.g., `update`, `reaction_created`) |
|
||||
| `timestamp` | number | Unix timestamp in milliseconds when the message was sent |
|
||||
| `payload` | object | Event-specific data object |
|
||||
|
||||
## Crypto Prices
|
||||
|
||||
Real-time cryptocurrency price data from two sources: **Binance** and **Chainlink**. No authentication required.
|
||||
|
||||
### Binance Source (`crypto_prices`)
|
||||
### Binance Source
|
||||
|
||||
Subscribe to all symbols:
|
||||
|
||||
@@ -133,7 +133,7 @@ Symbols use lowercase concatenated format (e.g., `solusdt`, `btcusdt`).
|
||||
}
|
||||
```
|
||||
|
||||
### Chainlink Source (`crypto_prices_chainlink`)
|
||||
### Chainlink Source
|
||||
|
||||
<Tip>
|
||||
**Trading 15m Crypto Markets?** Get a sponsored Chainlink API key with onboarding support from Chainlink. Fill out [this form](https://pm-ds-request.streams.chain.link/).
|
||||
@@ -225,6 +225,191 @@ Symbols use slash-separated format (e.g., `eth/usd`, `btc/usd`).
|
||||
* `sol/usd` — Solana to USD
|
||||
* `xrp/usd` — XRP to USD
|
||||
|
||||
## Equity Prices
|
||||
|
||||
Real-time price data for stocks, ETFs, forex pairs, precious metals, and commodities sourced from **Pyth Network**. No authentication required.
|
||||
|
||||
<Tip>
|
||||
**Trading Equity Markets?** Get a Pyth Network data feed - first 30 days free, then \$99/month. [Subscribe here](https://buy.stripe.com/cNi8wPeiq76FgQrbsD4ZG09).
|
||||
</Tip>
|
||||
|
||||
All asset classes stream through a single `equity_prices` topic. When you subscribe with a symbol filter, the server sends a historical snapshot (last 2 minutes of data), then continues streaming live updates.
|
||||
|
||||
### Subscribe
|
||||
|
||||
Subscribe to a specific symbol with a JSON filter:
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"filters": "{\"symbol\":\"AAPL\"}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Subscribe to multiple symbols across asset classes:
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"AAPL\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"EURUSD\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"XAUUSD\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"WTI\"}" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Use `type: "*"` to receive all message types (live updates and snapshots):
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "*",
|
||||
"filters": "{\"symbol\":\"GOOGL\"}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Filter values are case-insensitive on subscribe, but the `symbol` field in payloads is always returned lowercase.
|
||||
|
||||
### Live Price Update
|
||||
|
||||
**Apple stock update:**
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"timestamp": 1711382400000,
|
||||
"payload": {
|
||||
"symbol": "aapl",
|
||||
"value": 198.45,
|
||||
"full_accuracy_value": "198.4523",
|
||||
"timestamp": 1711382400000,
|
||||
"received_at": 1711382400005
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Gold price update (market closed):**
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"timestamp": 1711400000000,
|
||||
"payload": {
|
||||
"symbol": "xauusd",
|
||||
"value": 2175.30,
|
||||
"full_accuracy_value": "2175.3012",
|
||||
"timestamp": 1711399000000,
|
||||
"received_at": 1711400000002,
|
||||
"is_carried_forward": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Historical Snapshot
|
||||
|
||||
On subscribe, the server delivers a backfill of the last 2 minutes of price data. Use the `type` field to distinguish: `"subscribe"` for the initial snapshot vs `"update"` for live ticks.
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "subscribe",
|
||||
"timestamp": 1711382400000,
|
||||
"payload": {
|
||||
"symbol": "aapl",
|
||||
"data": [
|
||||
{ "timestamp": 1711382280000, "value": 198.30 },
|
||||
{ "timestamp": 1711382281000, "value": 198.32 },
|
||||
{ "timestamp": 1711382340000, "value": 198.41 }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Equity Price Payload Fields
|
||||
|
||||
| Field | Type | Description |
|
||||
| --------------------- | ------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `symbol` | string | Lowercase symbol identifier (e.g., `aapl`, `eurusd`, `xauusd`) |
|
||||
| `value` | number | Spot price as a float |
|
||||
| `full_accuracy_value` | string | Full-precision price as a string |
|
||||
| `timestamp` | number | Price measurement timestamp in Unix milliseconds |
|
||||
| `received_at` | number | When the system received the price, in Unix milliseconds. Only present when non-zero. |
|
||||
| `is_carried_forward` | boolean | `true` when the market session is closed and the value is the last known price. Only present when `true`. |
|
||||
|
||||
### Supported Symbols
|
||||
|
||||
**Stocks:**
|
||||
|
||||
| Symbol | Name |
|
||||
| ------- | -------------- |
|
||||
| `AAPL` | Apple |
|
||||
| `TSLA` | Tesla |
|
||||
| `MSFT` | Microsoft |
|
||||
| `GOOGL` | Alphabet |
|
||||
| `AMZN` | Amazon |
|
||||
| `META` | Meta Platforms |
|
||||
| `NVDA` | NVIDIA |
|
||||
| `NFLX` | Netflix |
|
||||
| `PLTR` | Palantir |
|
||||
| `OPEN` | Opendoor |
|
||||
| `RKLB` | Rocket Lab |
|
||||
| `ABNB` | Airbnb |
|
||||
| `COIN` | Coinbase |
|
||||
| `HOOD` | Robinhood |
|
||||
|
||||
**ETFs:**
|
||||
|
||||
| Symbol | Name |
|
||||
| ------ | ------------------------------------ |
|
||||
| `QQQ` | Invesco QQQ ETF |
|
||||
| `SPY` | S\&P 500 ETF |
|
||||
| `EWY` | iShares MSCI South Korea ETF |
|
||||
| `VXX` | Barclays iPath Series B S\&P 500 VIX |
|
||||
|
||||
**Forex:**
|
||||
|
||||
| Symbol | Pair |
|
||||
| -------- | ---------------------------- |
|
||||
| `EURUSD` | Euro / US Dollar |
|
||||
| `GBPUSD` | British Pound / US Dollar |
|
||||
| `USDCAD` | US Dollar / Canadian Dollar |
|
||||
| `USDJPY` | US Dollar / Japanese Yen |
|
||||
| `USDKRW` | US Dollar / South Korean Won |
|
||||
|
||||
**Precious Metals:**
|
||||
|
||||
| Symbol | Name |
|
||||
| -------- | ------ |
|
||||
| `XAUUSD` | Gold |
|
||||
| `XAGUSD` | Silver |
|
||||
|
||||
**Commodities** (rolling front-month futures):
|
||||
|
||||
| Symbol | Name |
|
||||
| ------ | --------------- |
|
||||
| `WTI` | Crude Oil (WTI) |
|
||||
| `CC` | Cocoa |
|
||||
| `NGD` | Natural Gas |
|
||||
|
||||
### Market Hours
|
||||
|
||||
When a market session is closed, the stream continues with the last known price and `is_carried_forward: true`. This lets you distinguish stale prices from live ticks. Update frequency is sub-second (up to 5 per second per feed) during market hours.
|
||||
|
||||
## Comments
|
||||
|
||||
Real-time comment events on the Polymarket platform, including new comments, replies, reactions, and removals. May require Gamma authentication for user-specific data.
|
||||
@@ -359,3 +544,6 @@ Comments support nested threading:
|
||||
<Accordion title="Authentication failures">
|
||||
If subscribing to user-specific streams, ensure your `gamma_auth` object includes a valid wallet `address`. Authentication failures will prevent subscription to protected topics.
|
||||
</Accordion>
|
||||
|
||||
|
||||
Built with [Mintlify](https://mintlify.com).
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
# Real-Time Data Socket
|
||||
|
||||
> Stream comments and crypto prices via WebSocket
|
||||
> Stream comments, crypto prices, and equity prices via WebSocket
|
||||
|
||||
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for **comments** and **crypto prices**.
|
||||
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for **comments**, **crypto prices**, and **equity prices**.
|
||||
|
||||
<Card title="TypeScript client" icon="github" href="https://github.com/Polymarket/real-time-data-client">
|
||||
Official RTDS TypeScript client (`real-time-data-client`).
|
||||
@@ -59,18 +59,18 @@ All messages follow this structure:
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | ----------------------------------------------------------- |
|
||||
| `topic` | string | The subscription topic (e.g., `crypto_prices`, `comments`) |
|
||||
| `type` | string | The message type/event (e.g., `update`, `reaction_created`) |
|
||||
| `timestamp` | number | Unix timestamp in milliseconds when the message was sent |
|
||||
| `payload` | object | Event-specific data object |
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | --------------------------------------------------------------------------- |
|
||||
| `topic` | string | The subscription topic (e.g., `crypto_prices`, `equity_prices`, `comments`) |
|
||||
| `type` | string | The message type/event (e.g., `update`, `reaction_created`) |
|
||||
| `timestamp` | number | Unix timestamp in milliseconds when the message was sent |
|
||||
| `payload` | object | Event-specific data object |
|
||||
|
||||
## Crypto Prices
|
||||
|
||||
Real-time cryptocurrency price data from two sources: **Binance** and **Chainlink**. No authentication required.
|
||||
|
||||
### Binance Source (`crypto_prices`)
|
||||
### Binance Source
|
||||
|
||||
Subscribe to all symbols:
|
||||
|
||||
@@ -133,7 +133,7 @@ Symbols use lowercase concatenated format (e.g., `solusdt`, `btcusdt`).
|
||||
}
|
||||
```
|
||||
|
||||
### Chainlink Source (`crypto_prices_chainlink`)
|
||||
### Chainlink Source
|
||||
|
||||
<Tip>
|
||||
**Trading 15m Crypto Markets?** Get a sponsored Chainlink API key with onboarding support from Chainlink. Fill out [this form](https://pm-ds-request.streams.chain.link/).
|
||||
@@ -225,6 +225,191 @@ Symbols use slash-separated format (e.g., `eth/usd`, `btc/usd`).
|
||||
* `sol/usd` — Solana to USD
|
||||
* `xrp/usd` — XRP to USD
|
||||
|
||||
## Equity Prices
|
||||
|
||||
Real-time price data for stocks, ETFs, forex pairs, precious metals, and commodities sourced from **Pyth Network**. No authentication required.
|
||||
|
||||
<Tip>
|
||||
**Trading Equity Markets?** Get a Pyth Network data feed - first 30 days free, then \$99/month. [Subscribe here](https://buy.stripe.com/cNi8wPeiq76FgQrbsD4ZG09).
|
||||
</Tip>
|
||||
|
||||
All asset classes stream through a single `equity_prices` topic. When you subscribe with a symbol filter, the server sends a historical snapshot (last 2 minutes of data), then continues streaming live updates.
|
||||
|
||||
### Subscribe
|
||||
|
||||
Subscribe to a specific symbol with a JSON filter:
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"filters": "{\"symbol\":\"AAPL\"}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Subscribe to multiple symbols across asset classes:
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"AAPL\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"EURUSD\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"XAUUSD\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"WTI\"}" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Use `type: "*"` to receive all message types (live updates and snapshots):
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "*",
|
||||
"filters": "{\"symbol\":\"GOOGL\"}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Filter values are case-insensitive on subscribe, but the `symbol` field in payloads is always returned lowercase.
|
||||
|
||||
### Live Price Update
|
||||
|
||||
**Apple stock update:**
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"timestamp": 1711382400000,
|
||||
"payload": {
|
||||
"symbol": "aapl",
|
||||
"value": 198.45,
|
||||
"full_accuracy_value": "198.4523",
|
||||
"timestamp": 1711382400000,
|
||||
"received_at": 1711382400005
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Gold price update (market closed):**
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"timestamp": 1711400000000,
|
||||
"payload": {
|
||||
"symbol": "xauusd",
|
||||
"value": 2175.30,
|
||||
"full_accuracy_value": "2175.3012",
|
||||
"timestamp": 1711399000000,
|
||||
"received_at": 1711400000002,
|
||||
"is_carried_forward": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Historical Snapshot
|
||||
|
||||
On subscribe, the server delivers a backfill of the last 2 minutes of price data. Use the `type` field to distinguish: `"subscribe"` for the initial snapshot vs `"update"` for live ticks.
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "subscribe",
|
||||
"timestamp": 1711382400000,
|
||||
"payload": {
|
||||
"symbol": "aapl",
|
||||
"data": [
|
||||
{ "timestamp": 1711382280000, "value": 198.30 },
|
||||
{ "timestamp": 1711382281000, "value": 198.32 },
|
||||
{ "timestamp": 1711382340000, "value": 198.41 }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Equity Price Payload Fields
|
||||
|
||||
| Field | Type | Description |
|
||||
| --------------------- | ------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `symbol` | string | Lowercase symbol identifier (e.g., `aapl`, `eurusd`, `xauusd`) |
|
||||
| `value` | number | Spot price as a float |
|
||||
| `full_accuracy_value` | string | Full-precision price as a string |
|
||||
| `timestamp` | number | Price measurement timestamp in Unix milliseconds |
|
||||
| `received_at` | number | When the system received the price, in Unix milliseconds. Only present when non-zero. |
|
||||
| `is_carried_forward` | boolean | `true` when the market session is closed and the value is the last known price. Only present when `true`. |
|
||||
|
||||
### Supported Symbols
|
||||
|
||||
**Stocks:**
|
||||
|
||||
| Symbol | Name |
|
||||
| ------- | -------------- |
|
||||
| `AAPL` | Apple |
|
||||
| `TSLA` | Tesla |
|
||||
| `MSFT` | Microsoft |
|
||||
| `GOOGL` | Alphabet |
|
||||
| `AMZN` | Amazon |
|
||||
| `META` | Meta Platforms |
|
||||
| `NVDA` | NVIDIA |
|
||||
| `NFLX` | Netflix |
|
||||
| `PLTR` | Palantir |
|
||||
| `OPEN` | Opendoor |
|
||||
| `RKLB` | Rocket Lab |
|
||||
| `ABNB` | Airbnb |
|
||||
| `COIN` | Coinbase |
|
||||
| `HOOD` | Robinhood |
|
||||
|
||||
**ETFs:**
|
||||
|
||||
| Symbol | Name |
|
||||
| ------ | ------------------------------------ |
|
||||
| `QQQ` | Invesco QQQ ETF |
|
||||
| `SPY` | S\&P 500 ETF |
|
||||
| `EWY` | iShares MSCI South Korea ETF |
|
||||
| `VXX` | Barclays iPath Series B S\&P 500 VIX |
|
||||
|
||||
**Forex:**
|
||||
|
||||
| Symbol | Pair |
|
||||
| -------- | ---------------------------- |
|
||||
| `EURUSD` | Euro / US Dollar |
|
||||
| `GBPUSD` | British Pound / US Dollar |
|
||||
| `USDCAD` | US Dollar / Canadian Dollar |
|
||||
| `USDJPY` | US Dollar / Japanese Yen |
|
||||
| `USDKRW` | US Dollar / South Korean Won |
|
||||
|
||||
**Precious Metals:**
|
||||
|
||||
| Symbol | Name |
|
||||
| -------- | ------ |
|
||||
| `XAUUSD` | Gold |
|
||||
| `XAGUSD` | Silver |
|
||||
|
||||
**Commodities** (rolling front-month futures):
|
||||
|
||||
| Symbol | Name |
|
||||
| ------ | --------------- |
|
||||
| `WTI` | Crude Oil (WTI) |
|
||||
| `CC` | Cocoa |
|
||||
| `NGD` | Natural Gas |
|
||||
|
||||
### Market Hours
|
||||
|
||||
When a market session is closed, the stream continues with the last known price and `is_carried_forward: true`. This lets you distinguish stale prices from live ticks. Update frequency is sub-second (up to 5 per second per feed) during market hours.
|
||||
|
||||
## Comments
|
||||
|
||||
Real-time comment events on the Polymarket platform, including new comments, replies, reactions, and removals. May require Gamma authentication for user-specific data.
|
||||
@@ -359,3 +544,6 @@ Comments support nested threading:
|
||||
<Accordion title="Authentication failures">
|
||||
If subscribing to user-specific streams, ensure your `gamma_auth` object includes a valid wallet `address`. Authentication failures will prevent subscription to protected topics.
|
||||
</Accordion>
|
||||
|
||||
|
||||
Built with [Mintlify](https://mintlify.com).
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
# Real-Time Data Socket
|
||||
|
||||
> Stream comments and crypto prices via WebSocket
|
||||
> Stream comments, crypto prices, and equity prices via WebSocket
|
||||
|
||||
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for **comments** and **crypto prices**.
|
||||
The Polymarket Real-Time Data Socket (RTDS) is a WebSocket-based streaming service that provides real-time updates for **comments**, **crypto prices**, and **equity prices**.
|
||||
|
||||
<Card title="TypeScript client" icon="github" href="https://github.com/Polymarket/real-time-data-client">
|
||||
Official RTDS TypeScript client (`real-time-data-client`).
|
||||
@@ -59,18 +59,18 @@ All messages follow this structure:
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | ----------------------------------------------------------- |
|
||||
| `topic` | string | The subscription topic (e.g., `crypto_prices`, `comments`) |
|
||||
| `type` | string | The message type/event (e.g., `update`, `reaction_created`) |
|
||||
| `timestamp` | number | Unix timestamp in milliseconds when the message was sent |
|
||||
| `payload` | object | Event-specific data object |
|
||||
| Field | Type | Description |
|
||||
| ----------- | ------ | --------------------------------------------------------------------------- |
|
||||
| `topic` | string | The subscription topic (e.g., `crypto_prices`, `equity_prices`, `comments`) |
|
||||
| `type` | string | The message type/event (e.g., `update`, `reaction_created`) |
|
||||
| `timestamp` | number | Unix timestamp in milliseconds when the message was sent |
|
||||
| `payload` | object | Event-specific data object |
|
||||
|
||||
## Crypto Prices
|
||||
|
||||
Real-time cryptocurrency price data from two sources: **Binance** and **Chainlink**. No authentication required.
|
||||
|
||||
### Binance Source (`crypto_prices`)
|
||||
### Binance Source
|
||||
|
||||
Subscribe to all symbols:
|
||||
|
||||
@@ -133,7 +133,7 @@ Symbols use lowercase concatenated format (e.g., `solusdt`, `btcusdt`).
|
||||
}
|
||||
```
|
||||
|
||||
### Chainlink Source (`crypto_prices_chainlink`)
|
||||
### Chainlink Source
|
||||
|
||||
<Tip>
|
||||
**Trading 15m Crypto Markets?** Get a sponsored Chainlink API key with onboarding support from Chainlink. Fill out [this form](https://pm-ds-request.streams.chain.link/).
|
||||
@@ -225,6 +225,191 @@ Symbols use slash-separated format (e.g., `eth/usd`, `btc/usd`).
|
||||
* `sol/usd` — Solana to USD
|
||||
* `xrp/usd` — XRP to USD
|
||||
|
||||
## Equity Prices
|
||||
|
||||
Real-time price data for stocks, ETFs, forex pairs, precious metals, and commodities sourced from **Pyth Network**. No authentication required.
|
||||
|
||||
<Tip>
|
||||
**Trading Equity Markets?** Get a Pyth Network data feed - first 30 days free, then \$99/month. [Subscribe here](https://buy.stripe.com/cNi8wPeiq76FgQrbsD4ZG09).
|
||||
</Tip>
|
||||
|
||||
All asset classes stream through a single `equity_prices` topic. When you subscribe with a symbol filter, the server sends a historical snapshot (last 2 minutes of data), then continues streaming live updates.
|
||||
|
||||
### Subscribe
|
||||
|
||||
Subscribe to a specific symbol with a JSON filter:
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"filters": "{\"symbol\":\"AAPL\"}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Subscribe to multiple symbols across asset classes:
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"AAPL\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"EURUSD\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"XAUUSD\"}" },
|
||||
{ "topic": "equity_prices", "type": "update", "filters": "{\"symbol\":\"WTI\"}" }
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Use `type: "*"` to receive all message types (live updates and snapshots):
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"action": "subscribe",
|
||||
"subscriptions": [
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "*",
|
||||
"filters": "{\"symbol\":\"GOOGL\"}"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
Filter values are case-insensitive on subscribe, but the `symbol` field in payloads is always returned lowercase.
|
||||
|
||||
### Live Price Update
|
||||
|
||||
**Apple stock update:**
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"timestamp": 1711382400000,
|
||||
"payload": {
|
||||
"symbol": "aapl",
|
||||
"value": 198.45,
|
||||
"full_accuracy_value": "198.4523",
|
||||
"timestamp": 1711382400000,
|
||||
"received_at": 1711382400005
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Gold price update (market closed):**
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "update",
|
||||
"timestamp": 1711400000000,
|
||||
"payload": {
|
||||
"symbol": "xauusd",
|
||||
"value": 2175.30,
|
||||
"full_accuracy_value": "2175.3012",
|
||||
"timestamp": 1711399000000,
|
||||
"received_at": 1711400000002,
|
||||
"is_carried_forward": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Historical Snapshot
|
||||
|
||||
On subscribe, the server delivers a backfill of the last 2 minutes of price data. Use the `type` field to distinguish: `"subscribe"` for the initial snapshot vs `"update"` for live ticks.
|
||||
|
||||
```json theme={null}
|
||||
{
|
||||
"topic": "equity_prices",
|
||||
"type": "subscribe",
|
||||
"timestamp": 1711382400000,
|
||||
"payload": {
|
||||
"symbol": "aapl",
|
||||
"data": [
|
||||
{ "timestamp": 1711382280000, "value": 198.30 },
|
||||
{ "timestamp": 1711382281000, "value": 198.32 },
|
||||
{ "timestamp": 1711382340000, "value": 198.41 }
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Equity Price Payload Fields
|
||||
|
||||
| Field | Type | Description |
|
||||
| --------------------- | ------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| `symbol` | string | Lowercase symbol identifier (e.g., `aapl`, `eurusd`, `xauusd`) |
|
||||
| `value` | number | Spot price as a float |
|
||||
| `full_accuracy_value` | string | Full-precision price as a string |
|
||||
| `timestamp` | number | Price measurement timestamp in Unix milliseconds |
|
||||
| `received_at` | number | When the system received the price, in Unix milliseconds. Only present when non-zero. |
|
||||
| `is_carried_forward` | boolean | `true` when the market session is closed and the value is the last known price. Only present when `true`. |
|
||||
|
||||
### Supported Symbols
|
||||
|
||||
**Stocks:**
|
||||
|
||||
| Symbol | Name |
|
||||
| ------- | -------------- |
|
||||
| `AAPL` | Apple |
|
||||
| `TSLA` | Tesla |
|
||||
| `MSFT` | Microsoft |
|
||||
| `GOOGL` | Alphabet |
|
||||
| `AMZN` | Amazon |
|
||||
| `META` | Meta Platforms |
|
||||
| `NVDA` | NVIDIA |
|
||||
| `NFLX` | Netflix |
|
||||
| `PLTR` | Palantir |
|
||||
| `OPEN` | Opendoor |
|
||||
| `RKLB` | Rocket Lab |
|
||||
| `ABNB` | Airbnb |
|
||||
| `COIN` | Coinbase |
|
||||
| `HOOD` | Robinhood |
|
||||
|
||||
**ETFs:**
|
||||
|
||||
| Symbol | Name |
|
||||
| ------ | ------------------------------------ |
|
||||
| `QQQ` | Invesco QQQ ETF |
|
||||
| `SPY` | S\&P 500 ETF |
|
||||
| `EWY` | iShares MSCI South Korea ETF |
|
||||
| `VXX` | Barclays iPath Series B S\&P 500 VIX |
|
||||
|
||||
**Forex:**
|
||||
|
||||
| Symbol | Pair |
|
||||
| -------- | ---------------------------- |
|
||||
| `EURUSD` | Euro / US Dollar |
|
||||
| `GBPUSD` | British Pound / US Dollar |
|
||||
| `USDCAD` | US Dollar / Canadian Dollar |
|
||||
| `USDJPY` | US Dollar / Japanese Yen |
|
||||
| `USDKRW` | US Dollar / South Korean Won |
|
||||
|
||||
**Precious Metals:**
|
||||
|
||||
| Symbol | Name |
|
||||
| -------- | ------ |
|
||||
| `XAUUSD` | Gold |
|
||||
| `XAGUSD` | Silver |
|
||||
|
||||
**Commodities** (rolling front-month futures):
|
||||
|
||||
| Symbol | Name |
|
||||
| ------ | --------------- |
|
||||
| `WTI` | Crude Oil (WTI) |
|
||||
| `CC` | Cocoa |
|
||||
| `NGD` | Natural Gas |
|
||||
|
||||
### Market Hours
|
||||
|
||||
When a market session is closed, the stream continues with the last known price and `is_carried_forward: true`. This lets you distinguish stale prices from live ticks. Update frequency is sub-second (up to 5 per second per feed) during market hours.
|
||||
|
||||
## Comments
|
||||
|
||||
Real-time comment events on the Polymarket platform, including new comments, replies, reactions, and removals. May require Gamma authentication for user-specific data.
|
||||
@@ -359,3 +544,6 @@ Comments support nested threading:
|
||||
<Accordion title="Authentication failures">
|
||||
If subscribing to user-specific streams, ensure your `gamma_auth` object includes a valid wallet `address`. Authentication failures will prevent subscription to protected topics.
|
||||
</Accordion>
|
||||
|
||||
|
||||
Built with [Mintlify](https://mintlify.com).
|
||||
Reference in New Issue
Block a user