import pmxt
# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.close(){
"success": true,
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}System
Close
Close all WebSocket connections and clean up resources. Call this when you’re done streaming to properly release connections.
POST
/
api
/
{exchange}
/
close
import pmxt
# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.close(){
"success": true,
"error": {
"message": "<string>",
"code": "HOSTED_TRADING_ERROR",
"retryable": true,
"exchange": "<string>",
"detail": {}
}
}Path Parameters
The prediction market exchange to target.
Available options:
polymarket, kalshi, kalshi-demo, limitless, probable, baozi, myriad, opinion, metaculus, smarkets, polymarket_us, gemini-titan, hyperliquid, suibets, rain, hunch, router Body
application/json
Response
200 - application/json
Close response
Was this page helpful?

