mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
websocket: Remove GenerateMessageID (#2008)
* Exchanges: Remove example BespokeGenerateMessageID * Okx: Replace conn.RequestIDGenerator with MesssageID Continued overall direction to remove the closed-loop of e => conn => e roundtrip for message ids * Exchanges: Add MessageSequence This method removes the either/or nature of message id generation. We don't tie the message ids to connections, or to anything. Consumers just call whichever they want, or even combine them as they want. Anything more complicated will need a separate installation anyway * GateIO: Split usage of MessageID and MessageSequence * Binance: Switch to UUID message IDs * Kraken: Switch to e.MessageSequence * Kucoin: Switch to MessageID * HitBTC: Switch to UUIDv7 for ws message ID * Bybit: Switch to UUIDv7 for ws message ID * Bitfinex: Switch to UUIDv7 and MessageSequence Tested CID - It accepts 53 bits only for an int, so MessageSequence makes sense. Can't use MessageID * Websocket: Remove now unused MessageID function Moved all MessageID usage into funcs and onto base methods, to remove the closed loop of message IDs * Docs: Update guidance for message signatures
This commit is contained in:
@@ -361,8 +361,9 @@ Ensure each endpoint is implemented and has an associated test to improve test c
|
||||
|
||||
#### Message IDs
|
||||
|
||||
Use e.MessageID() to get a UUIDv7 if the exchange supports unique string IDs. Otherwise override MessageID with a suitable alternative.
|
||||
For example: Consider common.Counter for simple integer IDs if uniqueness isn't critical.
|
||||
* e.MessageID() to get a UUIDv7 if the exchange supports unique string IDs
|
||||
* e.MessageSequence() to get a simple integer ID if uniqueness is not critical
|
||||
* Otherwise override MessageID with a suitable alternative
|
||||
|
||||
#### Authenticated functions
|
||||
|
||||
|
||||
Reference in New Issue
Block a user