initializeBackend($request); if ($response !== null) { return $response; } $subscribeTopics = [ 'period.tick', 'period.opened', 'period.locked', 'period.payout', 'bet.accepted', 'wallet.changed', 'auto.spin.progress', ]; return $this->success('', [ 'name' => 'ws.period', 'ws_url' => WebSocketConfigHelper::wsUrl($request), 'connect_tip' => 'After connected, topics are auto-subscribed. You can also send subscribe manually.', 'subscribe_topics' => $subscribeTopics, 'sample_messages' => [ '{"action":"ping"}', '{"action":"subscribe","topics":["period.tick","period.opened"]}', '{"action":"subscribe","topics":["bet.accepted","wallet.changed","auto.spin.progress"]}', ], ]); } }