Skip to content

Add Rocket server to handle incoming requests #10

Description

@DieHard073055

Description

We need to add a Rocket server to our exchange simulator to handle incoming requests and expose the functionality through REST API endpoints. The goal is to make it easy for external code to interact with the simulator for tasks such as creating new exchange instances, managing wallets, and placing orders.

Proposed API Endpoints

  • /create_new_instance: Initialize a new exchange instance and return its ID
  • /wallet/balance: Accept an exchange instance ID and return the wallet balance
  • /wallet/transactions: Accept an exchange instance ID and return the wallet transactions
  • /place_order: Accept all necessary parameters for placing an order, then place the order and return its ID
  • /cancel_order: Cancel an order with a given order ID and exchange instance ID
  • /order_status: Return the status of an order for a given order ID and exchange instance ID

Implementation Details

The exact API design and request/response format should be discussed and finalized in the related pull request. The focus should be on providing a simple and intuitive interface for users to interact with the exchange simulator.

Acceptance Criteria

  • Implement a Rocket server within the exchange simulator
  • Expose the specified API endpoints with the desired functionality
  • Add necessary error handling and input validation
  • Update documentation to reflect the new API routes and their usage
  • Test API endpoints to ensure correct functionality

Please feel free to add any additional comments, suggestions, or concerns regarding this issue. We look forward to your contributions!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions