Skip to content

[Core] Implement MockExchange for offline development #19

@realfishsam

Description

@realfishsam

Purpose / Goal

Allow developers to build applications using PMXT without needing real API keys or internet access. This is essential for CI/CD environments and rapid UI prototyping.

Tasks

  • Create core/src/exchanges/mock/index.ts.
  • Implement the BaseExchange interface.
  • Provide 'realistic but fake' data for fetchMarkets, fetchOrderBook, and fetchBalance.
  • Simulate order execution (e.g., createOrder always returns a 'success' after 100ms).

Easy Way to Get Started

  1. Look at core/src/BaseExchange.ts to see the required methods.
  2. Copy the structure of core/src/exchanges/polymarket/index.ts but replace all HTTP calls with Promise.resolve() and local JSON data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore sidecar/server logicenhancementNew feature or requesttestingIssues related to tests

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions