DoQuant
English

Harbor SDK

ui

rt.setUi draws strategy state on the instance. Pass a full description each time. The platform replaces the previous one.

FieldContents
cardsMetric cards. kind is metric, with id, label, and value
chartsA line. id, label, and points of time and value
fieldsRead-only fields. id, label, and value
buttonsButtons. id and label. danger: true asks the platform to confirm again

The strategy supplies label and value. The platform does not translate copy the strategy wrote. Do not rely on button text alone for a dangerous action. A danger button gets a second confirmation.

rt.setUi({
  cards: [{ kind: "metric", id: "px", label: "最新价", value: ticker.last }],
  charts: [],
  fields: [],
  buttons: [{ kind: "button", id: "stop", label: "停止", danger: true }],
});