Skip to main content

Segmentation

objectrequired
Constant value: segmentation
idstringrequired

Possible values: Value must match regular expression ^seg_[0-9A-Za-z]+$

seriesstringrequired
profile_versionstring

The profile version used. The same bars with the same version give the same segments, always.

Example: standard@2026-11
time_unitTimeUnit

The unit of every time in the request and the answer, since the Unix epoch, UTC. In JSON, us and ns times are strings of digits; ms times are integers.

Possible values: [ms, us, ns]

Default value: ms
barsintegerrequired

Bars the series had after any samples were turned into bars.

depthintegerrequired

Levels above the bars.

segments object[]required

Every segment above the bars, parent before child.

  • Array [
  • idstringrequired

    h@<open_time>. The same segment has the same id in a segmentation and in every extension that names it, so a store keyed on it updates in place.

    Possible values: Value must match regular expression ^h[0-9]+@[0-9]+$

    parentstring | nullnullablerequired

    The id of the segment one level up that contains this one; null at the top.

    heightintegerrequired

    The level: 1 is the finest segments above the bars, larger is coarser.

    Possible values: >= 1

    orderintegerrequired

    Position among its siblings, in time order.

    Possible values: >= 0

    barsintegerrequired

    How many bars it covers.

    Possible values: >= 1

    open_time objectrequired
    oneOf
    integer

    Possible values: >= 0

    opennumberrequired
    high_time objectrequired
    oneOf
    integer

    Possible values: >= 0

    highnumberrequired
    low_time objectrequired
    oneOf
    integer

    Possible values: >= 0

    lownumberrequired
    close_time objectrequired
    oneOf
    integer

    Possible values: >= 0

    closenumberrequired
    provisionalbooleanrequired

    True for the open right edge: it may still grow, and its close may move. Every other segment is final.

  • ]
  • edgeEdge

    With return_edge, the edge to carry on from with POST /v1/segmentations/extend.

    Possible values: <= 65536 characters, Value must match regular expression ^pne1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$

    edge_last_close_time object
    oneOf
    integer
    usage objectrequired
    samples_billedintegerrequired
    cost_usdnumberrequired
    Segmentation
    {
    "id": "string",
    "series": "string",
    "profile_version": "standard@2026-11",
    "time_unit": "ms",
    "bars": 0,
    "depth": 0,
    "segments": [
    {
    "id": "string",
    "parent": "string",
    "height": 0,
    "order": 0,
    "bars": 0,
    "open_time": 0,
    "open": 0,
    "high_time": 0,
    "high": 0,
    "low_time": 0,
    "low": 0,
    "close_time": 0,
    "close": 0,
    "provisional": true
    }
    ],
    "edge": "string",
    "edge_last_close_time": 0,
    "usage": {
    "samples_billed": 0,
    "cost_usd": 0
    }
    }