mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 15:09:42 +00:00
Deribit: Replace bespoke message IDs with uuid v7 (#1995)
* Deribit: Switch to string IDs Switch from int to string IDs so we can use UUID.v7 instead of (the only) local high precision message id implementation * Deribit: Dedup wsResponse / wsResponse * Deribit: Use uuid v7 for IDs This moves away from centralising message ids. There's no real benefit to moving them to a central generator, since we can one-line it, and reduce our testing plane and complexity. And it's more concise for exchanges to say "I'm using this UUID". * Deribit: Handle errors from StartHeartbeat * Deribit: Simplify WS ID matching * Exchanges: Add MessageID function to base
This commit is contained in:
@@ -359,6 +359,11 @@ Alternatively you can use `request.WithVerbose(context.Background())` as the `co
|
||||
|
||||
Ensure each endpoint is implemented and has an associated test to improve test coverage and increase confidence
|
||||
|
||||
#### 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.
|
||||
|
||||
#### Authenticated functions
|
||||
|
||||
Authenticated request function is created based on the way the exchange documentation specifies. For example, see the [Binance Spot API - Endpoint Security Types](https://developers.binance.com/docs/binance-spot-api-docs/rest-api/endpoint-security-type).
|
||||
|
||||
Reference in New Issue
Block a user