From 0fbcb4f23f8cb60d43a0619908f11e6bfc91b950 Mon Sep 17 00:00:00 2001 From: okxapi <115602548+okxapi@users.noreply.github.com> Date: Fri, 16 Dec 2022 18:09:57 +0800 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index e67d4b9..57fdf33 100644 --- a/README.md +++ b/README.md @@ -116,16 +116,23 @@ passphrase = "" - Run `example.py` - Uncomment the corresponding method and then pass the arguments and call the interfaces - WebSocketAPI - - Open `websocket_example.py` - - According to the `public channel`/`private channel`, select the corresponding `url`, the corresponding start method, and pass in the corresponding parameters + * Open `WsPrivate`and`WsPublic`; + * choose the right `url`(if private channel need login info). -```python -# WebSocket public channel -url = "wss://ws.okx.com:8443/ws/v5/public?brokerId=9999" + ```python + # WebSocket Public channel + url = "wss://ws.okx.com:8443/ws/v5/public" + # WebSocket Private channel + url = "wss://ws.okx.com:8443/ws/v5/private" + ``` -# WebSocket private channel -url = "wss://ws.okx.com:8443/ws/v5/private?brokerId=9999" -``` + ```python + # Public channel not need login(e.g. tickers,candle,mark-price,books,funding-rate) + refer to WsPublicTest.py + + # Private channel nedd login(e.g. account,positions,orders) + refer to WsPrivateTest.py + ``` P.S.