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

Implement Order Listing and Filtering System #14

Open
6 tasks
AndreaDiazCorreia opened this issue Dec 12, 2024 · 1 comment
Open
6 tasks

Implement Order Listing and Filtering System #14

AndreaDiazCorreia opened this issue Dec 12, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AndreaDiazCorreia
Copy link
Collaborator

Description

Implement functionality to list and filter orders from Mostro relays according to the protocol specification. This includes handling event subscriptions and implementing filtering capabilities.

Implementation Requirements

  1. Implement list orders functionality:
interface OrderFilters {
  kinds?: OrderType[];
  status?: OrderStatus;
  fiatCode?: string;
  minAmount?: number;
  maxAmount?: number;
  paymentMethods?: string[];
}

async function listOrders(filters?: OrderFilters): Promise<Order[]> {
  // Subscribe to order events
  // Apply filters
  // Handle event processing
  // Return filtered orders
}
  1. Implementation of event subscription:
private subscribeToOrders(): void {
  // Subscribe to kind 38383 events
  // Handle event processing
  // Emit order updates
}

Testing Requirements

describe('listOrders', () => {
  it('should retrieve all pending orders');
  it('should filter by order type');
  it('should filter by fiat currency');
  it('should filter by amount range');
  it('should handle payment method filtering');
  it('should properly update on new orders');
});

Acceptance Criteria

  • Order listing implemented
  • All filter types supported
  • Real-time updates working
  • Proper error handling
  • Event subscription management
  • Documentation complete

References

@grunch grunch added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Dec 13, 2024
@AndreaDiazCorreia AndreaDiazCorreia self-assigned this Jan 2, 2025
@AndreaDiazCorreia
Copy link
Collaborator Author

I'm working on this right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants