Skip to content
This repository was archived by the owner on May 11, 2026. It is now read-only.

types(client): replace market-data any returns with typed responses#330

Open
jasonandjay wants to merge 1 commit into
Polymarket:mainfrom
jasonandjay:fix/market-data-return-types
Open

types(client): replace market-data any returns with typed responses#330
jasonandjay wants to merge 1 commit into
Polymarket:mainfrom
jasonandjay:fix/market-data-return-types

Conversation

@jasonandjay
Copy link
Copy Markdown

Addresses #309

What changed

Replace any return types for market data helper APIs with explicit exported types:

  • getMidpoint / getMidpoints
  • getPrice / getPrices
  • getSpread / getSpreads
  • getLastTradePrice / getLastTradesPrices

Added response types in src/types.ts:

  • MidpointResponse, MidpointsResponse
  • PriceResponse, PricesResponse
  • SpreadResponse, SpreadsResponse
  • LastTradePriceResponse, LastTradePricesResponse

Validation

  • pnpm lint
  • pnpm build
  • vitest run tests/utilities.test.ts tests/http-helpers/index.test.ts

@jasonandjay jasonandjay requested a review from a team as a code owner March 15, 2026 18:41
@omerg864
Copy link
Copy Markdown

MidpointResponse should be
{ mid: string }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants