Bentrix Docs
HomePricingDashboard

Go: replay

Every method of client.Replay in the Go SDK.

Pause#

Pause a workbench's replay · tool replay_pause

scope: labplan: plussince 1.0.0

Pauses a laboratory workbench's replay where it stands. Answers the workbench.

Declaration

client.Replay
func (a *ReplayAPI) Pause(ctx context.Context, args ReplayPauseArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):

{
  "bounds": {
    "from_ms": 1790812800000,
    "to_ms": 1793491200000
  },
  "charts": [
    {
      "market": "SYN-DOCS2",
      "timeframe": "M1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-4"
    },
    {
      "market": "SYN-DOCS",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-5"
    },
    {
      "market": "SYN-DOCS2",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-7"
    }
  ],
  "cursor_ms": 1791154859967,
  "door": null,
  "engine": "ready",
  "hidden_markets": [],
  "live": false,
  "markets": [
    "SYN-DOCS",
    "SYN-DOCS2"
  ],
  "name": "Run 1",
  "playing": false,
  "refusal": null,
  "tick_model": "real",
  "uri": "bentrix://lab/lab-1/bench/bench-2",
  "zone": "utc"
}

Example

client.Replay.Pause(ctx, mcp.ReplayPauseArgs{Bench: bench})

Play#

Play a workbench's replay · tool replay_play

scope: labplan: plussince 1.0.0

Plays a laboratory workbench's replay at its speed, in the background if it is not the one shown. Answers the workbench; a refusal (a restart over an open book) is said in refusal and door.

Declaration

client.Replay
func (a *ReplayAPI) Play(ctx context.Context, args ReplayPlayArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):

{
  "bounds": {
    "from_ms": 1790812800000,
    "to_ms": 1793491200000
  },
  "charts": [
    {
      "market": "SYN-DOCS2",
      "timeframe": "M1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-4"
    },
    {
      "market": "SYN-DOCS",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-5"
    },
    {
      "market": "SYN-DOCS2",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-7"
    }
  ],
  "cursor_ms": 1791154800000,
  "door": null,
  "engine": "ready",
  "hidden_markets": [],
  "live": false,
  "markets": [
    "SYN-DOCS",
    "SYN-DOCS2"
  ],
  "name": "Run 1",
  "playing": true,
  "refusal": null,
  "tick_model": "real",
  "uri": "bentrix://lab/lab-1/bench/bench-2",
  "zone": "utc"
}

Example

client.Replay.Play(ctx, mcp.ReplayPlayArgs{Bench: bench})

Seek#

Stand a workbench at a moment · tool replay_seek

scope: labplan: plussince 1.0.0

Stands a laboratory workbench's clock at a moment inside its days. Back over a deal it stops with refusal and door; undo_deals true undoes what lay after. Answers the workbench at its new moment.

Declaration

client.Replay
func (a *ReplayAPI) Seek(ctx context.Context, args ReplaySeekArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired
ToMsint64requiredThe moment to stand at, UTC milliseconds, inside the bench's days.
UndoDeals*booloptionalA move back over a deal is refused with a door; true takes the door and undoes it.

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):

{
  "bounds": {
    "from_ms": 1790812800000,
    "to_ms": 1793491200000
  },
  "charts": [
    {
      "market": "SYN-DOCS2",
      "timeframe": "M1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-4"
    },
    {
      "market": "SYN-DOCS",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-5"
    },
    {
      "market": "SYN-DOCS2",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-7"
    }
  ],
  "cursor_ms": 1793397599999,
  "door": {
    "deals": 6,
    "requests": 4,
    "to_ms": 1791151200000
  },
  "engine": "ready",
  "hidden_markets": [],
  "live": false,
  "markets": [
    "SYN-DOCS",
    "SYN-DOCS2"
  ],
  "name": "Run 1",
  "playing": false,
  "refusal": "seek refused: going back to 2026-10-04 would undo 6 deal(s) and 4 request(s) made after it — take the rewind to undo them, or play forward",
  "tick_model": "real",
  "uri": "bentrix://lab/lab-1/bench/bench-2",
  "zone": "utc"
}

Example

client.Replay.Seek(ctx, mcp.ReplaySeekArgs{Bench: bench, ToMs: 1791151200000})

SetSpeed#

Set a workbench's replay speed · tool replay_set_speed

scope: labplan: plussince 1.0.0

Sets how fast a laboratory workbench's replay plays, one of the speeds the Replay widget offers. Answers the workbench.

Declaration

client.Replay
func (a *ReplayAPI) SetSpeed(ctx context.Context, args ReplaySetSpeedArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired
Speedint64requiredTimes real time: 1, 60, 720, 1800 or 3600 — the speeds the Replay widget offers.

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):

{
  "bounds": {
    "from_ms": 1790812800000,
    "to_ms": 1793491200000
  },
  "charts": [
    {
      "market": "SYN-DOCS2",
      "timeframe": "M1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-4"
    },
    {
      "market": "SYN-DOCS",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-5"
    },
    {
      "market": "SYN-DOCS2",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-7"
    }
  ],
  "cursor_ms": 1791154800000,
  "door": null,
  "engine": "ready",
  "hidden_markets": [],
  "live": false,
  "markets": [
    "SYN-DOCS",
    "SYN-DOCS2"
  ],
  "name": "Run 1",
  "playing": false,
  "refusal": null,
  "speed": 60.0,
  "tick_model": "real",
  "uri": "bentrix://lab/lab-1/bench/bench-2",
  "zone": "utc"
}

Example

client.Replay.SetSpeed(ctx, mcp.ReplaySetSpeedArgs{Bench: bench, Speed: 60})

Step#

Step a workbench's replay · tool replay_step

scope: labplan: plussince 1.0.0

Moves a laboratory workbench's clock by n ticks, n candles or n elements of its chart built by price or activity (bricks, lines, columns, bars), forward or back, as the Step and Back buttons, the candle keys and the clock line do. A step back over a deal stops with refusal and door; undo_deals true takes the door. Answers the workbench at its new moment.

Declaration

client.Replay
func (a *ReplayAPI) Step(ctx context.Context, args ReplayStepArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired
Back*booloptionalBack rather than forward.
N*int64optionalHow many, at most 1000.
Timeframe*stringoptionalA candle step's interval label (M1, H1, …).
UndoDeals*booloptionalA step back over a deal is refused with a door; true takes the door and undoes it.
Unit*stringoptional

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Recorded from a running Bentrix 0.1.382 on a laboratory of generated markets (long lists cut to their first rows):

{
  "bounds": {
    "from_ms": 1790812800000,
    "to_ms": 1793491200000
  },
  "charts": [
    {
      "market": "SYN-DOCS2",
      "timeframe": "M1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-4"
    },
    {
      "market": "SYN-DOCS",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-5"
    },
    {
      "market": "SYN-DOCS2",
      "timeframe": "H1",
      "uri": "bentrix://lab/lab-1/bench/bench-2/chart/chart-7"
    }
  ],
  "cursor_ms": 1791892800000,
  "door": null,
  "engine": "ready",
  "hidden_markets": [],
  "live": false,
  "markets": [
    "SYN-DOCS",
    "SYN-DOCS2"
  ],
  "name": "Run 1",
  "playing": false,
  "refusal": null,
  "tick_model": "real",
  "uri": "bentrix://lab/lab-1/bench/bench-2",
  "zone": "utc"
}

Example

client.Replay.Step(ctx, mcp.ReplayStepArgs{Bench: bench})

ToEnd#

Take a workbench to its end · tool replay_to_end

scope: labplan: plussince 1.0.0

Takes a laboratory workbench's clock to the last moment of its days, as the end button does. Answers the workbench.

Declaration

client.Replay
func (a *ReplayAPI) ToEnd(ctx context.Context, args ReplayToEndArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Answers the workbench.

Example

client.Replay.ToEnd(ctx, mcp.ReplayToEndArgs{Bench: bench})

ToStart#

Take a workbench back to its start · tool replay_to_start

scope: labplan: plussince 1.0.0

Takes a laboratory workbench's clock back to the first moment of its days, as the start button does. Over deals it stops with refusal and door. Answers the workbench.

Declaration

client.Replay
func (a *ReplayAPI) ToStart(ctx context.Context, args ReplayToStartArgs) (any, error)

Parameters

NameTypeWhat it is
Benchstringrequired

Returns

(any, error) — the tool’s answer as maps and slices (any).

What it answers

Answers the workbench.

Example

client.Replay.ToStart(ctx, mcp.ReplayToStartArgs{Bench: bench})

Bentrix 0.1.382Every number, name and default on these pages is read from the application itself.What is comingWhat changed