Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored Crate, v2.0.0 #6

Merged
merged 9 commits into from
Dec 1, 2024
Merged

Refactored Crate, v2.0.0 #6

merged 9 commits into from
Dec 1, 2024

Conversation

Ohkthx
Copy link
Owner

@Ohkthx Ohkthx commented Dec 1, 2024

Updated the crate to be compatible with the current Coinbase Advanced API. Many changes have happened since the last update which required the crate to be restructured for a better user experience.

Types of changes:

  • WebSocket: Public and user connections.
  • REST API: Public, user, and sandboxed connections.
  • Additional API endpoints such as portfolios and payments.
  • Property changes such as additions and types.
  • Queries and Requests have builder patterns for user convenience.
  • Different types of orders rolled into a single builder and endpoint.
  • WebSockets can now reconnect automatically!
  • WebSockets can support multiple streams at the same time.
  • Minor optimizations throughout the crate.
  • Queries and Requests have much more error and validity checking.
  • Rename several functions and structs to be more user friendly.
  • Additional documentation added throughout the crate.

... and more!

Ohkthx and others added 9 commits November 13, 2024 20:10
Minor fix on maximum candles allowed, updated to 350 from 300.
Merge pull request #4 from Ohkthx/develop
Introduced the Sandbox API.
Changed Signer into HttpAgent, SecureHttpAgent, and PublicHttpAgent.
Removed Utils API, replaced by Public API.
UnixTime -> ServerTime.
OrderSide required on order creation instead of `&str`.
Removed recursive API calls and replaced with iterative calls.
Updated documentation for Portfolio, Sandbox, and Public API points.
Updated documentation for additional added examples.
Updated projects README documentation.
Updated the JWT generation to remove outdated fields.
Removed constants associated with old JWT requirements.
Moved Balance from `account.rs` to `shared.rs`
Removed several `create_` order API endpoints, `create()` handles all now.
Fixed order creation to work with newer API changes.
Introduced new `Enums` for more control over order creation.
Added documentation to parts of the Portfolio endpoints.
Added `client.order.close_position()` endpoint.
Added Create Order Preview Endpoint (`client.order.preview_create`)
Renamed `PreviewEditOrderResponse` to `EditOrderPreview`
Added `preview(bool)` to the CreateOrderBuilder.
…nstances.

Updated rate limits for REST and Websocket clients.
Refactored all endpoints to use new error handling.
Refactored many struct names for better clarity and aligment with API.
Added additional error messages.
Better error handling reported to the user.
Updated docstrings for the Convert API.
…Client.

Public and User endpoints updated.
Support for multi-stream (readers) added.
Renamed several key-functions to improve readability.
`websocket` and `watch_candles` examples updated.
Fixed a bug that prevented creating PublicRestClient.
Split the massive `models/websocket.rs` into multiple files.
Rewrote `Messages` to align with best practices.
Moved key weboscket responses to the websocket module.
Enhanced `task_tracker.rs` readability.
RestClientBuilder required to construct new RestClient.
Fixed a bug with WebSocket User Endpoint.
Custom deserialize for OrderType created to play nice with Order updates from WebSocket.
Broke down `models/order.rs` into a sub module due to size.
Made Queries and Requests that are purely Optional... Optional.
Requests now have a Request Trait applied for validation.
Created builders for all Requests and Queries.
Enhanced the QueryBuilder.
Renamed many Requests, Responses, and Queries to follow [Resource][Action][Type].
Removed custom deserializer for numeric types in favor of `serde_with` crate.
Requests and Queries now include required fields in their `new()`.
Defaults added for majority of Query and Requests.
Renamed CbAdvError to CbError.
All enums have `PartialEq` trait.
Fixed UserEvent for WebSocket to include additional fields.
`websocket_user` example added.
Added websocket reconnection.
Many user facing structs now have Serialize and Deserialize traits.
Added more enums to various responses from the remote API.
@Ohkthx Ohkthx changed the title Refactored Crate, updated to be compatible. Refactored Crate, v2.0.0 Dec 1, 2024
@Ohkthx Ohkthx merged commit 2655008 into main Dec 1, 2024
1 check failed
@Ohkthx Ohkthx deleted the develop branch December 1, 2024 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant