ChartnautDocs

CreateSession

object
userstringRequired

usr_<id> or ext:<ref>.

namestring

Shown to the user in Chartnaut. Defaults to "<your partner name> session".

At most 120 characters
instrumentsarray of stringRequired

Markets by symbol as in the Chartnaut catalogue (e.g. EURUSD, NAS100); an alias or Chartnaut's numeric instrument id also works. No market twice. Read back as display symbols. The session's symbol picker is held to these.

1 to 10 items
startstring

Where the replay begins: a UTC date (2026-09-01, from 00:00 UTC) or an RFC 3339 time. In the past, and inside the user's plan window. Required unless you give day.

endstring

Optional. Where the replay stops: a UTC date (through the end of that day) or an RFC 3339 time, after start and not in the future. Leave it out and the session plays on to the latest market data.

daystring

Shorthand for exactly one day: a UTC date (the whole UTC day) or an RFC 3339 time (the 24 hours from it). Give start (and end) or day, not both.

starting_balancenumberRequired

Required; there is no default.

More than 0, at most 1,000,000,000
currencystring

A three-letter code; read back in upper case.

Default USDPattern ^[A-Za-z]{3}$
leveragenumber
Default 100More than 0, at most 10,000
commissionobject · Commission

Charged per side on every market: fixed per unit (lot, contract, share; 0–1,000), or percentage of the side's notional (0–100).

Show fields
typestringRequired
One of fixed percentage
valuenumberRequired
At least 0
time_cap_minutesinteger

Minutes of play the user gets, from when a page first opens the session, before it ends on its own. 0: no cap.

Default 00 to 10,080
blindboolean

Hide the market, the date and prices: your setting; a display mode, not a security boundary.

Default false
allow_skipboolean

Whether the user may skip forward (jump) in time.

Default true
rulesone of 2 types · RulesInput

Inline rules, copied onto the session or account at create and fixed after that. Either a list of rules, or { "day_reset": {...}, "rules": [...] } to move the trading day (one per rule set; default 17:00 America/New_York, the FX rollover, which follows US daylight saving). At most 50 rules. Checked in whole cents.

on_breach:

  • record (default): store the breach and send rule.breached; nothing else.
  • block_order: also refuse new orders (exits stay allowed). A daily_loss block lasts until the next day reset; any other rule's lasts for good. The status stays active.
  • close_and_end: also close everything and end it; the status becomes breached.

A profit target has no on_breach: reaching it closes everything and ends as completed_to_target. Every breach acts as its rule says. Only if Chartnaut pauses rule actions for you in an emergency are breaches stored with action_applied: false, and nothing is done.

Show options

One of

array of object · Rule
idstring

Your name for the rule; defaults to its type (then type_2, …). Breaches name it.

Pattern ^[A-Za-z0-9_.:-]{1,64}$
typestringRequired
One of daily_loss max_drawdown max_position_size max_open_positions profit_target slippage

One of

daily_loss
type"daily_loss"Required
limitone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
basisstring

Measured from the start-of-day balance or equity.

One of balance equityDefault balance
on_breachstring
One of record block_order close_and_endDefault record
max_drawdown
type"max_drawdown"Required
limitone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
modestring

fixed from the starting balance; trailing from the peak.

One of fixed trailingDefault fixed
peakstring

Trailing only: what the peak follows (equity is updated on every price change).

One of equity balanceDefault equity
stop_at_starting_balanceboolean

Trailing only: the floor stops rising once it reaches the starting balance.

Default false
on_breachstring
One of record block_order close_and_endDefault record
max_position_size
type"max_position_size"Required
limitone of 2 typesRequired

The largest position per market, in units as the platform shows them (lots, contracts, coins, shares), up to three decimals: a number or {"units": n}.

Show options

One of

number
More than 0
With units
unitsnumberRequired
More than 0
on_breachstring
One of record block_order close_and_endDefault record
max_open_positions
type"max_open_positions"Required
limitone of 2 typesRequired
Show options

One of

integer
At least 1
With count
countintegerRequired
At least 1
on_breachstring
One of record block_order close_and_endDefault record
profit_target
type"profit_target"Required
targetone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
basisstring

Reached when equity hits it, or when an exit brings the closed balance to it. The recorded result is the closed balance.

One of equity balanceDefault equity
slippage
type"slippage"Required
ticksintegerRequired

Every market and stop fill moves this many ticks against the trader. Limits never slip. A cost, never a breach.

0 to 10,000
RuleSet

The canonical form, returned on read with every default filled in and every id present.

day_resetobject
Show fields
timestring
Default 17:00Pattern ^[0-2][0-9]:[0-5][0-9]$
tzstring

An IANA time zone.

Default America/New_York
rulesarray of object · Rule
At most 50 items
Show item fields
idstring

Your name for the rule; defaults to its type (then type_2, …). Breaches name it.

Pattern ^[A-Za-z0-9_.:-]{1,64}$
typestringRequired
One of daily_loss max_drawdown max_position_size max_open_positions profit_target slippage

One of

daily_loss
type"daily_loss"Required
limitone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
basisstring

Measured from the start-of-day balance or equity.

One of balance equityDefault balance
on_breachstring
One of record block_order close_and_endDefault record
max_drawdown
type"max_drawdown"Required
limitone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
modestring

fixed from the starting balance; trailing from the peak.

One of fixed trailingDefault fixed
peakstring

Trailing only: what the peak follows (equity is updated on every price change).

One of equity balanceDefault equity
stop_at_starting_balanceboolean

Trailing only: the floor stops rising once it reaches the starting balance.

Default false
on_breachstring
One of record block_order close_and_endDefault record
max_position_size
type"max_position_size"Required
limitone of 2 typesRequired

The largest position per market, in units as the platform shows them (lots, contracts, coins, shares), up to three decimals: a number or {"units": n}.

Show options

One of

number
More than 0
With units
unitsnumberRequired
More than 0
on_breachstring
One of record block_order close_and_endDefault record
max_open_positions
type"max_open_positions"Required
limitone of 2 typesRequired
Show options

One of

integer
At least 1
With count
countintegerRequired
At least 1
on_breachstring
One of record block_order close_and_endDefault record
profit_target
type"profit_target"Required
targetone of 3 types · MoneyLimitRequired

An amount (a bare number, or {"amount": n}), or {"percent": n} of the starting balance.

Show options

One of

number
More than 0
With amount
amountnumberRequired
More than 0
With percent
percentnumberRequired
More than 0, at most 100
basisstring

Reached when equity hits it, or when an exit brings the closed balance to it. The recorded result is the closed balance.

One of equity balanceDefault equity
slippage
type"slippage"Required
ticksintegerRequired

Every market and stop fill moves this many ticks against the trader. Limits never slip. A cost, never a breach.

0 to 10,000
external_refstring

Your id for the session; unique per partner (409 conflict with details.existing_id on reuse).

1 to 200 characters
labelsmap of string · Labels

A session's labels: up to 20; keys 1–64 letters, digits or _ . : -; string values up to 200 characters. Never interpreted; filter on them with label.<key>=<value>.

page_controlstring · PageControl

What the developer's page may drive in this session through the terminal SDK: none (the default), replay (play, pause, step, speed, jump, hold) or replay_and_orders (also place orders).

One of none replay replay_and_ordersDefault none

Used by#