binance api code example
Example: binance api how to stream trades
const accountAndOrderAndTransfers = new WebSocket("wss://dex.binance.org/api/ws/bnb1m4m9etgf3ca5wpgkqe5nr6r33a4ynxfln3yz4v");
// Or Subscribe method
const conn = new WebSocket("wss://dex.binance.org/api/ws");
conn.onopen = function(evt) {
conn.send(JSON.stringify({ method: "subscribe", topic: "orders", address: "bnb1m4m9etgf3ca5wpgkqe5nr6r33a4ynxfln3yz4v" }));
}