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

fix/fix_example_script_errors #310

Merged
merged 1 commit into from
Mar 8, 2024
Merged

fix/fix_example_script_errors #310

merged 1 commit into from
Mar 8, 2024

Conversation

aarmoa
Copy link
Collaborator

@aarmoa aarmoa commented Mar 8, 2024

  • Removed duplicated example scripts
  • Fixed some errors in example scripts

Summary by CodeRabbit

  • Refactor
    • Removed an unnecessary parameter from binary options market launch functionality.
  • New Features
    • Enhanced the trading experience by updating the system to fetch derivative orders instead of spot orders, including:
      • Derivative orders for chain traders.
      • Derivative orders for specific account addresses.
      • Retrieval of derivative orders by hashes.

Copy link
Contributor

coderabbitai bot commented Mar 8, 2024

Walkthrough

The changes involve refining the functionality of a chain client's exchange module, particularly focusing on derivatives. The adjustments include removing an obsolete parameter and shifting the focus from spot orders to derivative orders across various query functions. This refocuses the module towards a more specialized domain of financial instruments.

Changes

File Path Change Summary
.../13_MsgInstantBinaryOptionsMarketLaunch.py Removed the quote_decimals parameter.
.../exchange/query/23_TraderDerivativeOrders.py
.../exchange/query/24_AccountAddressDerivativeOrders.py
.../exchange/query/25_DerivativeOrdersByHashes.py
Updated to fetch derivative orders instead of spot orders.

🐇✨

In the world of code, changes come and flow,

From spot to derivative, the orders go.

A rabbit hops, leaving tracks in the snow,

Celebrating updates, with a soft, gentle glow. 🌟

🐾🌙


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.16%. Comparing base (c5645ab) to head (e365b10).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #310   +/-   ##
=======================================
  Coverage   76.16%   76.16%           
=======================================
  Files          50       50           
  Lines        4111     4111           
  Branches      351      351           
=======================================
  Hits         3131     3131           
  Misses        875      875           
  Partials      105      105           

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: .coderabbit.yaml

Commits Files that changed from the base of the PR and between c5645ab and e365b10.
Files selected for processing (4)
  • examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py (1 hunks)
  • examples/chain_client/exchange/query/23_TraderDerivativeOrders.py (1 hunks)
  • examples/chain_client/exchange/query/24_AccountAddressDerivativeOrders.py (1 hunks)
  • examples/chain_client/exchange/query/25_DerivativeOrdersByHashes.py (1 hunks)
Additional comments: 4
examples/chain_client/exchange/query/24_AccountAddressDerivativeOrders.py (1)
  • 27-27: The change from fetch_chain_account_address_spot_orders to fetch_chain_account_address_derivative_orders correctly aligns the example script with the intended functionality of fetching derivative orders. This update is crucial for maintaining the accuracy and relevance of the example scripts provided to users. Good job on making this change.
examples/chain_client/exchange/query/23_TraderDerivativeOrders.py (1)
  • 29-29: The update to use fetch_chain_trader_derivative_orders instead of fetch_chain_trader_spot_orders is a significant improvement that ensures the example script accurately demonstrates fetching derivative orders. This change is in line with the PR's objectives and enhances the script's relevance and utility for users. Well done on this update.
examples/chain_client/exchange/query/25_DerivativeOrdersByHashes.py (1)
  • 29-29: The modification to use fetch_chain_derivative_orders_by_hashes instead of fetch_chain_spot_orders_by_hashes correctly updates the example script to fetch derivative orders by hashes. This change enhances the script's accuracy and relevance for users, aligning with the PR's objectives to improve the example scripts. Excellent work on making this update.
examples/chain_client/exchange/13_MsgInstantBinaryOptionsMarketLaunch.py (1)
  • 39-44: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [1-1]

The removal of the quote_decimals parameter from the function call within the main function is a thoughtful update that likely aligns with updated API requirements or corrects a previously incorrect usage. This change ensures the example script remains accurate and relevant, contributing to the PR's objectives of improving the example scripts. Good job on making this adjustment.

@aarmoa aarmoa merged commit 54e4622 into dev Mar 8, 2024
12 checks passed
@aarmoa aarmoa deleted the fix/fix_example_script_errors branch March 8, 2024 03:03
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