Appearance
barstate and runtime
Where the script is in the data, and how it was started.
| Name | Description |
|---|---|
barstate.isConfirmed | The current bar has closed. |
barstate.isFinal | The current bar's last block is finalized. |
barstate.isFirst | The current bar is the first bar of the run. |
barstate.isLast | The current bar is the newest the runtime has received (true while each bar is processed). |
barstate.isRealtime | false while the runtime replays history; true for bars and blocks that arrive live after the replay. |
barstate.index | Index of the current bar, from 0. |
runtime.mode | How the script is being run. |
runtime.market | The market the script runs on. |
runtime.resolution | The bar size the script runs at. |
runtime.blockTimeMs | Target block time of the chain in ms (12,000 on Bittensor). |
runtime.version | The runtime's version, e.g. |
barstate
barstate.isConfirmed
ts
barstate.isConfirmed: booleanThe current bar has closed.
barstate.isFinal
ts
barstate.isFinal: booleanThe current bar's last block is finalized.
barstate.isFirst
ts
barstate.isFirst: booleanThe current bar is the first bar of the run.
barstate.isLast
ts
barstate.isLast: booleanThe current bar is the newest the runtime has received (true while each bar is processed).
barstate.isRealtime
ts
barstate.isRealtime: booleanfalse while the runtime replays history; true for bars and blocks that arrive live after the replay. Always false in a backtest.
barstate.index
ts
barstate.index: numberIndex of the current bar, from 0.
runtime
runtime.mode
ts
runtime.mode: ModeHow the script is being run.
Types: Mode
runtime.market
ts
runtime.market: MarketThe market the script runs on.
Types: Market
runtime.resolution
ts
runtime.resolution: ResolutionThe bar size the script runs at.
Types: Resolution
runtime.blockTimeMs
ts
runtime.blockTimeMs: numberTarget block time of the chain in ms (12,000 on Bittensor).
runtime.version
ts
runtime.version: stringThe runtime's version, e.g. "0.2.0".
