For the complete documentation index, see llms.txt. This page is also available as Markdown.

Candles

Real-time OHLCV candles for futures pairs.

Use this stream to keep a chart live: it pushes the current (open) candle as trades arrive and a final frame when a candle closes.

Endpoint

wss://futures-marketdata-service.outpoll.com/ws/candles

Authentication

No authentication required.

Message Envelope

Field
Type
Description

pi

integer

Pair ID

iv

string

Candle interval

t

integer

Candle open time, epoch ms

o

number

Open price

h

number

High price

lo

number

Low price

c

number

Close (latest) price

v

number

Volume

cl

boolean

true = candle is closed and final; false = candle is open and changing

Message Types

Type
Direction
Description

subscribe / unsubscribe

Client → Server

Start or stop a pair at an interval

Candle

Server → Client

Open candle update (cl: false) or final candle (cl: true)

Error

Server → Client

{"er", "msg"} — see Errors

ping / pong

Both

Plain-text keep-alive

Subscribe

Field
Type
Required
Description

act

string

Yes

subscribe

pi / ps

integer / array

Yes

Pair ID, or list of pair IDs; iv applies to every pair in the frame

iv

string

No

Interval, default 1m

Supported intervals (case-sensitive):

iv

Candle length

1m

1 minute

5m

5 minutes

15m

15 minutes

30m

30 minutes

1h

1 hour

4h

4 hours

6h

6 hours

1d

1 day

1w

1 week, opens Monday 00:00 UTC

1mo

1 calendar month, opens on the 1st, 00:00 UTC

  • One connection follows one interval per pair. Subscribing again to the same pair with a different iv switches the interval. To watch several intervals of one pair, open one connection per interval.

  • all: true is not supported on this stream; subscribe by pair ID.

Server confirmation: there is no confirmation frame. Right after subscribing you receive the pair's most recent candle at that interval (sent with cl: false). Live updates follow.

Candle Lifecycle

  • All candle boundaries are UTC. t is the open time of the candle (inclusive).

  • While a candle is open, frames with cl: false carry its running values. Updates are throttled, so not every trade produces a frame.

  • When the first trade of the next period arrives, the server sends the finished candle once with cl: true, then the new candle with cl: false.

  • Match frames to your chart by t: a frame with an existing t replaces that candle, a new t starts a new one.

  • On a pair with no trades, a candle stays open on the stream until the next trade; use the time to decide that a period has ended.

  • For history, load candles over REST and then apply this stream on top.

Candle Payload

Field
Type
Description

pi

integer

Pair ID

iv

string

Interval

t

integer

Open time, epoch ms, UTC

o

number

Open price

h

number

High price

lo

number

Low price

c

number

Close price; while open, the latest trade price

v

number

Volume in the base coin

cl

boolean

true = final, false = open

Python Example

Was this helpful?