Built-in Functions
Structures
Ticker
Depth
OrderBook
Trade
Record
Market
Order
Condition
Account
Asset
Position
Funding
Other Structures
Built-in Variables and Constants
Conventions
Exchanges
markdown
Renders Markdown text with headings, lists, bold and tables, for strategy notes and market commentary.
Examples
Builds a note with a heading and a list from account data.
javascript
function main() {
var account = exchange.GetAccount()
if (!account) return
var text = "#### Account overview\n" +
"- Available: **" + _N(account.Balance, 2) + "** USDT\n" +
"- Frozen: " + _N(account.FrozenBalance, 2) + " USDT\n" +
"- Updated: " + _D()
LogStatus({type: "markdown", text: text})
}
python
def main():
account = exchange.GetAccount()
if not account:
return
text = ("#### Account overview\n" +
"- Available: **" + str(_N(account["Balance"], 2)) + "** USDT\n" +
"- Frozen: " + str(_N(account["FrozenBalance"], 2)) + " USDT\n" +
"- Updated: " + _D())
LogStatus({"type": "markdown", "text": text})
rust
fn main() {
let Ok(a) = exchange.GetAccount() else { return };
let text = format!(
"#### Account overview\\n- Available: **{}** USDT\\n- Frozen: {} USDT\\n- Updated: {}",
_N(a.Balance, 2), _N(a.FrozenBalance, 2), _D(None)
);
// Line breaks are the JSON escape \\n inside the JSON string
LogStatus!(format!(r#"{{"type": "markdown", "text": "{}"}}"#, text));
}Attributes
| Name | Type | Description |
type | string | Required. Always |
text | string | Required. Markdown text. |
id | string | Stable identifier. Set it when the number or order of components changes, so refreshes do not rebuild the component. |
span | number | Number of columns it spans in the enclosing |
See Also
Remarks
Plain status bar text is not parsed as Markdown; use this component when you need formatting.