A few days ago, I posted [here](https://www.reddit.com/r/algotrading/comments/1q83w3d/found_5_arbitrage_spreads_in_prediction_markets/) about the arbitrage spreads I found between Polymarket and Kalshi. The response was great, but the consensus: finding the spread is easy, executing it before it closes is the hard part.
The library is no longer just a scanner; it now supports native order execution. I’ve abstracted away the complexity, so you can now programmatically buy/sell positions on both platforms directly from the library:
const client = new pmxt.Polymarket({ privateKey: your-key-here }); // or pmxt.Kalshi
const order = await client.createOrder({
marketId: '663583',
outcomeId: '109918...',
side: 'buy',
type: 'market',
amount: 10
});
The goal is to move from "monitoring a dashboard" to "atomic-ish execution" where you can hit both legs of the arb almost simultaneously.
Now that the execution primitives are done, the next update will be a fully automated bot example that listens to the scanner and auto-executes on the spreads. I'll be back in a few days with this update!
[https://github.com/qoery-com/pmxt](https://github.com/qoery-com/pmxt)
For those of you already trading these markets, are you finding that `market` orders are reliable enough given the lower liquidity, or do you strictly stick to `limit` orders to avoid slippage on the second leg?