Skip to content

Commit

Permalink
Update ws-streams.md (#230)
Browse files Browse the repository at this point in the history
API URL for testnet-dex.binance.org is already decommissioned
  • Loading branch information
STdevK authored Nov 23, 2023
1 parent 53e25e4 commit 7d4f04a
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions docs/beaconchain/develop/api-reference/dex-api/ws-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@ Return account updates.
}
```


**Testnet Connection Example:**

```javascript
// URL connection
const accountAndOrderAndTransfers = new WebSocket("wss://testnet-dex.binance.org/api/ws/tbnb1qtuf578qs9wfl0wh3vs0r5nszf80gvxd28hkrc");

// Or Subscribe method
const conn = new WebSocket("wss://testnet-dex.binance.org/api/ws");
conn.onopen = function(evt) {
conn.send(JSON.stringify({ method: "subscribe", topic: "accounts", address: "tbnb1qtuf578qs9wfl0wh3vs0r5nszf80gvxd28hkrc" }));
}
```

**Received Payload:**

```javascript
Expand Down Expand Up @@ -84,19 +70,6 @@ Return transfer updates if address is involved (as sender or receiver) in a tran
}
```

**Testnet Connection Example:**

```javascript
// URL connection
const accountAndOrderAndTransfers = new WebSocket("wss://testnet-dex.binance.org/api/ws/tbnb1c346qk3yfk89lzcacwzxsx402rv25gu6v40ghf");

// Or Subscribe method
const conn = new WebSocket("wss://testnet-dex.binance.org/api/ws");
conn.onopen = function(evt) {
conn.send(JSON.stringify({ method: "subscribe", topic: "transfers", address: "tbnb1c346qk3yfk89lzcacwzxsx402rv25gu6v40ghf" }));
}
```

**Received Payload:**

```javascript
Expand Down Expand Up @@ -140,19 +113,6 @@ Streams the latest block height.
}
```

**Testnet Connection Example:**

```javascript
// URL connection
const blockHeights = new WebSocket("wss://testnet-dex.binance.org/api/ws/$all@blockheight");

// Or Subscribe method
const conn = new WebSocket("wss://testnet-dex.binance.org/api/ws");
conn.onopen = function(evt) {
conn.send(JSON.stringify({ method: "subscribe", topic: "blockheight", symbols: ["$all"] }));
}
```

**Received Payload:**

```javascript
Expand Down

0 comments on commit 7d4f04a

Please sign in to comment.