binance-rs icon indicating copy to clipboard operation
binance-rs copied to clipboard

Update futures trade model

Open stefaj opened this issue 8 months ago • 0 comments

As discussed in #243 the Trade Event for the futures websocket used the spot model which is incorrect and didn't work. I adjusted the futures model to match the current json data and specified the events to use this futures endpoint.

The data looks as follows: {'stream': 'wifusdc@trade', 'data': {'e': 'trade', 'E': 1719051857284, 'T': 1719051857284, 's': 'WIFUSDC', 't': 18074627, 'p': '1.7728000', 'q': '34.8', 'X': 'MARKET', 'm': True}}

I don't know Rust best practices and followed existing code.

This undocumented futures trade endpoint can be subscribed to using symbol@trade.

stefaj avatar Jun 22 '24 10:06 stefaj