Appearance
Types
Value types used across the API.
Price
TAO per alpha.
ts
type Price = numberMs
Block timestamp in ms since epoch (UTC).
ts
type Ms = numberBlockNumber
A block height on the chain.
ts
type BlockNumber = numberIntentId
The id trade.buy() / trade.sell() return, e.g. "i3".
ts
type IntentId = stringMode
How the script is being run: drawn on the chart, backtested, paper traded on the live stream, or traded live.
ts
type Mode = "indicator" | "backtest" | "forwardtest" | "live"ActOn
When event.onCandle fires: once the bar closes ("confirmed"), or once its last block is finalized ("final").
ts
type ActOn = "confirmed" | "final"Resolution
Bar size. "1B" makes every block one bar.
ts
type Resolution = | "1B" | "1m" | "3m" | "5m" | "15m" | "30m" | "1h" | "2h" | "4h" | "6h" | "12h" | "1D" | "1W"Side
ts
type Side = "buy" | "sell"Market
A subnet's alpha market, e.g. "ALPHA:61" for subnet 61.
ts
type Market = `ALPHA:${number}`