Skip to content

Repository files navigation

PMXT Builder Widgets

Drop-in React widgets for prediction-market trading. Let users trade inside your app while PMXT handles routing, escrow, signing, and builder-fee attribution.

What you get

  • Search and matched-market discovery across PMXT venues
  • Live charts and order books
  • Non-custodial buy/sell tickets
  • Sandbox mode for demos before real funds
Matched marketsLive chart
Matched Markets widgetPrice Chart widget
Order ticket
Order Ticket widget

Install

npm install pmxt-widgets

Or copy a widget into your app:

npx shadcn@latest add https://widgets.pmxt.dev/r/order-ticket.json

Use

import{MarketSearch,PmxtProvider}from'pmxt-widgets';exportdefaultfunctionApp(){return(<PmxtProviderconfig={{apiUrl: '/api/pmxt',tradeUrl: '/api/trade'}}><MarketSearchvenues={['polymarket','opinion']}/></PmxtProvider>);}

Clicking an outcome opens a tradable card. Your user signs; PMXT routes the trade; your builder account gets attributed.

Go live

  1. Sign in at https://pmxt.dev.
  2. Enable builder mode in the dashboard.
  3. Create an API key at https://www.pmxt.dev/dashboard/api-keys.
  4. Put the key on your server.
  5. Point apiUrl and tradeUrl at proxy routes that add:
Authorization: Bearer YOUR_PMXT_KEY

The demo includes reference proxies in apps/demo/app/api/pmxt and apps/demo/app/api/trade.

Sandbox

<PmxtProviderconfig={{apiUrl: '/api/pmxt'}}sandbox><App/></PmxtProvider>

Sandbox uses live market data with simulated trading, balances, positions, and fills.

Develop

pnpm install
cp apps/demo/.env.example apps/demo/.env.local
pnpm dev
pnpm test

About

Copy-paste React widgets for prediction markets — unified search, matched markets, charts, order books, and a full non-custodial trading flow powered by the PMXT API

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages