Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.

feat: Kraken WS Provider #10

Merged
merged 13 commits into from
Jan 24, 2024
Merged

feat: Kraken WS Provider #10

merged 13 commits into from
Jan 24, 2024

Conversation

davidterpay
Copy link
Contributor

No description provided.

@aljo242
Copy link
Contributor

aljo242 commented Jan 18, 2024

misspelled word !

@davidterpay davidterpay marked this pull request as draft January 18, 2024 17:03
@davidterpay
Copy link
Contributor Author

still need to add testing

@davidterpay davidterpay marked this pull request as ready for review January 23, 2024 23:07
Comment on lines +237 to +286
// TickerResponseMessage is the message that is sent to the client when the
// server has a price update for the subscribed asset pair. This is specific
// to the ticker subscription.
//
// [
// 0, // ChannelID
// {
// "a": [ // Ask array
// "5525.40000", // Best ask price
// 1, // Whole lot volume
// "1.000" // Lot volume
// ],
// "b": [ // Bid array
// "5525.10000", // Best bid price
// 1, // Whole lot volume
// "1.000" // Lot volume
// ],
// "c": [ // Close array
// "5525.10000", // Price
// "0.00398963" // Lot volume
// ],
// "h": [ // High price array
// "5783.00000", // Today
// "5783.00000" // Last 24 hours
// ],
// "l": [ // Low price array
// "5505.00000", // Today
// "5505.00000" // Last 24 hours
// ],
// "o": [ // Open price array
// "5760.70000", // Today
// "5763.40000" // Last 24 hours
// ],
// "p": [ // Volume weighted average price array <- This is the value we want
// "5631.44067", // Value Today
// "5653.78939" // Value 24h
// ],
// "t": [ // Number of trades array
// 11493, // Today
// 16267 // Last 24 hours
// ],
// "v": [ // Volume array
// "2634.11501494", // Value Today
// "3591.17907851" // Value 24h
// ]
// },
// "ticker", // Channel name
// "XBT/USD" // Asset pair
//
// ]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting is ok when look at github.dev not sure why it looks incorrect on the other.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also looks fine when looking locally

Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 33 lines in your changes are missing coverage. Please review.

Comparison is base (345a70f) 72.69% compared to head (4b0d6df) 72.94%.

Files Patch % Lines
providers/websockets/kraken/utils.go 37.50% 10 Missing and 5 partials ⚠️
providers/websockets/kraken/ws_data_handler.go 80.85% 6 Missing and 3 partials ⚠️
providers/websockets/kraken/parse.go 91.66% 4 Missing and 2 partials ⚠️
providers/websockets/okx/parse.go 50.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #10      +/-   ##
==========================================
+ Coverage   72.69%   72.94%   +0.24%     
==========================================
  Files          99      103       +4     
  Lines        5282     5445     +163     
==========================================
+ Hits         3840     3972     +132     
- Misses       1178     1198      +20     
- Partials      264      275      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +17 to +18
// the handler should either return a response or a set of update messages.
HandleMessage(message []byte) (response providertypes.GetResponse[K, V], updateMessages []WebsocketEncodedMessage, err error)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding this mostly for completeness with the other function signature

@davidterpay davidterpay merged commit 91c4ef1 into main Jan 24, 2024
@zrbecker zrbecker deleted the terpay/kraken branch November 5, 2024 21:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants