-
Notifications
You must be signed in to change notification settings - Fork 1
[Feat] Added Derive API websockets integration #10
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
base: main
Are you sure you want to change the base?
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 ↗︎
|
Integrated Derive API websocket connection in pages:
options/page.tsxfuture/page.tsx