StaticnewSet order changed callback, after receiving the order changed event, it will call back to this function.
Subscribe
const {
Config,
TradeContext,
Decimal,
OrderSide,
TimeInForceType,
OrderType,
TopicType,
} = require("longport");
let config = Config.fromEnv();
let ctx = await TradeContext.new(config)
ctx.setOnQuote((_, event) => console.log(event.toString()));
await ctx.subscribe([TopicType.Private]);
Trade context