[Feat] Added Derive API websockets integration#10
Open
Conversation
|
@a-singh09 is attempting to deploy a commit to the Vanna 's projects team on Vercel, but is not a member of this team. To resolve this issue, you can:
To read more about collaboration on Vercel, click here. |
… in DeriveAPIService
…and improved ticker fetching logic
…d integrated it into options page
…ding page, and replaced mux api with derive data
…multiple futures tickers in DeriveAPIService and fixed Strike price
…n data structure with instrument details and
…ve to strike prices in options table
…selected option details
|
Unable to deploy a commit from a private repository on your GitHub organization to the Vanna 's projects team on Vercel, which is currently on the Hobby plan. In order to deploy, you can:
To read more about collaboration on Vercel, click here. |
…derive-api for better code readability
- Added OrderSigningService for handling cryptographic signing of orders using EIP-712 typed data. - Introduced comprehensive order validation utilities in OrderValidator to ensure order parameters meet protocol specifications. - Created interfaces for order parameters, signed orders, and validation results. - Implemented methods for signing orders, encoding trade data, generating nonces, and validating order parameters. - Established detailed validation checks for order size, price, instrument names, and expiry times. - Added utility functions for quick validation and error formatting.
…uthentication flow - Implemented a two-step authentication process: first attempting to authenticate with the EOA address, and if that fails due to "account not found", checking for existing subaccounts. - Enhanced error handling for account creation and authentication failures, providing more context and user-friendly messages. - Updated the session management logic to include automatic retries and improved session refresh handling. - Introduced a new method for creating accounts via the Derive API, with detailed error handling for various failure scenarios. - Adjusted WebSocket connection logic to include retry mechanisms and improved logging for connection states and errors. - Added constants for REST API endpoints for better maintainability.
- Simplified the OrderErrorHandler class by removing redundant error types and methods. - Enhanced error parsing logic to provide clearer error messages and recovery actions. - Consolidated order validation into a single method for better maintainability. - Updated validation error handling to include warnings for market orders. - Improved the structure of OrderNotification to include unique IDs and timestamps. - Added authentication step before order submission in the trading page.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integrated Derive API websocket connection in pages:
options/page.tsxfuture/page.tsx