request method
Send a command (op
) and optional arguments to Bybit over the websocket
Implementation
void request({required String op, List<String>? args}) {
var cmd = '{"op":"$op"';
if (args != null && args != []) {
cmd = cmd + ',"args": ["' + args.join('.') + '"]';
}
cmd += '}';
log.d('send command ' + cmd);
websocket!.sink.add(cmd);
}