## polymarket{docsify-ignore} **Kind**: global class **Extends**: Exchange * [fetchMarkets](#fetchmarkets) * [fetchTicker](#fetchticker) * [fetchTickers](#fetchtickers) * [fetchOrderBook](#fetchorderbook) * [fetchOHLCV](#fetchohlcv) * [fetchTime](#fetchtime) * [fetchStatus](#fetchstatus) * [fetchOpenInterest](#fetchopeninterest) * [fetchTradingFee](#fetchtradingfee) * [fetchTrades](#fetchtrades) * [fetchMyTrades](#fetchmytrades) * [fetchOrderTrades](#fetchordertrades) * [fetchBalance](#fetchbalance) * [fetchPositions](#fetchpositions) * [fetchPosition](#fetchposition) * [fetchOpenOrders](#fetchopenorders) * [fetchOrder](#fetchorder) * [createOrder](#createorder) * [createOrders](#createorders) * [createMarketBuyOrderWithCost](#createmarketbuyorderwithcost) * [cancelOrder](#cancelorder) * [cancelOrders](#cancelorders) * [cancelAllOrders](#cancelallorders) * [fetchEvents](#fetchevents) * [fetchEvent](#fetchevent) * [deriveApiKey](#deriveapikey) * [createApiKey](#createapikey) * [createOrDeriveApiKey](#createorderiveapikey) * [watchOrderBook](#watchorderbook) * [watchTrades](#watchtrades) * [watchTicker](#watchticker) * [watchOrders](#watchorders) * [watchMyTrades](#watchmytrades) ### fetchMarkets{docsify-ignore} retrieves data on all markets for polymarket, each prediction market becomes one market with its outcome tokens listed under the outcomes key **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - an array of objects representing market data **See** - https://docs.polymarket.com/api-reference/events/list-events - https://docs.polymarket.com/api-reference/search/search-markets-events-and-profiles | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra exchange-specific parameters | | params.query | string | No | a single search term used to filter the fetched events | | params.queries | Array<string> | No | multiple search terms (alternative to query) | | params.tags | Array<string> | No | filter events by tag — human-readable labels ("Fed Rates") or slugs ("fed-rates") both work; multiple tags match ANY (one gamma listing per tag, unioned) | | params.status | string | No | 'active', 'closed' or 'all', the status of the events to fetch, defaults to 'active' | | params.limit | int | No | max number of events to fetch when no query is given (defaults to options.fetchMarketsLimit, 200); the listing is ordered by 24h volume so the most active markets come first — outcomes on lower-volume markets are resolvable on demand by their token id (fetchOutcome) | ```javascript polymarket.fetchMarkets (params?) ``` ### fetchTicker{docsify-ignore} fetches the current mid-price and best bid/ask for a single outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction ticker structure](https://docs.ccxt.com/#/?id=prediction-ticker-structure) **See** - https://docs.polymarket.com/api-reference/data/get-midpoint-price - https://docs.polymarket.com/api-reference/market-data/get-order-book - https://docs.polymarket.com/api-reference/data/get-last-trade-price | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome like TRUMP_DANCE_TODAY_997:YES or an outcome token id | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchTicker (outcome, params?) ``` ### fetchTickers{docsify-ignore} fetches tickers for multiple outcome tokens at once using the batched CLOB book, midpoint and last-trade-price endpoints (200 per request trio) **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a dictionary of [prediction ticker structures](https://docs.ccxt.com/#/?id=prediction-ticker-structure) indexed by outcome **See** - https://docs.polymarket.com/api-reference/market-data/get-order-books-request-body - https://docs.polymarket.com/api-reference/market-data/get-midpoint-prices-request-body - https://docs.polymarket.com/api-reference/data/get-last-trades-prices | Param | Type | Required | Description | | --- | --- | --- | --- | | outcomes | Array<string> | Yes | unified outcomes or outcome token ids — required: polymarket has no endpoint returning all tickers at once, so an unscoped call is not supported | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchTickers (outcomes, params?) ``` ### fetchOrderBook{docsify-ignore} fetches the CLOB order book for a single outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction order book structure](https://docs.ccxt.com/#/?id=prediction-order-book-structure) **See**: https://docs.polymarket.com/api-reference/market-data/get-order-book | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | limit | int | No | not used by polymarket fetchOrderBook | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchOrderBook (outcome, limit?, params?) ``` ### fetchOHLCV{docsify-ignore} fetches price history ticks for a single outcome token and buckets them client-side into OHLCV candles, snapping tick timestamps to the candle boundary **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<Array<int>> - a list of candles ordered as timestamp, open, high, low, close, volume **See**: https://docs.polymarket.com/api-reference/markets/get-prices-history | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | timeframe | string | Yes | the length of time each candle represents | | since | int | No | timestamp in ms of the earliest candle to fetch | | limit | int | No | the maximum number of candles to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchOHLCV (outcome, timeframe, since?, limit?, params?) ``` ### fetchTime{docsify-ignore} fetches the current timestamp from the CLOB server **Kind**: instance method of [polymarket](#polymarket) **Returns**: int - the current server time in milliseconds **See**: https://docs.polymarket.com/api-reference/data/get-server-time | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchTime (params?) ``` ### fetchStatus{docsify-ignore} fetches the gamma API health status **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [status structure](https://docs.ccxt.com/#/?id=exchange-status-structure) **See**: https://docs.polymarket.com/api-reference/events/list-events | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchStatus (params?) ``` ### fetchOpenInterest{docsify-ignore} fetches the open interest of a prediction market outcome **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - an [open interest structure](https://docs.ccxt.com/#/?id=open-interest-structure) **See**: https://docs.polymarket.com/api-reference/misc/get-open-interest | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchOpenInterest (outcome, params?) ``` ### fetchTradingFee{docsify-ignore} fetches the base fee rate for a prediction market outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [fee structure](https://docs.ccxt.com/#/?id=fee-structure) **See**: https://docs.polymarket.com/api-reference/market-data/get-fee-rate | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchTradingFee (outcome, params?) ``` ### fetchTrades{docsify-ignore} fetches public trade history for a single outcome token from the data API **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure) **See**: https://docs.polymarket.com/api-reference/core/get-trades-for-a-user-or-markets | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | since | int | No | not used by polymarket fetchTrades | | limit | int | No | the maximum number of trades to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchTrades (outcome, since?, limit?, params?) ``` ### fetchMyTrades{docsify-ignore} fetches the authenticated user's trade history from the CLOB, optionally filtered by outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure) **See**: https://docs.polymarket.com/api-reference/trade/get-trades | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | No | unified outcome or outcome token id | | since | int | No | the earliest time in ms to fetch trades for | | limit | int | No | the maximum number of trades to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchMyTrades (outcome?, since?, limit?, params?) ``` ### fetchOrderTrades{docsify-ignore} fetches all the trades made from a single order **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure) **See**: https://docs.polymarket.com/api-reference/trade/get-trades | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | the order id | | outcome | string | No | unified outcome or outcome token id to narrow the lookup | | since | int | No | the earliest time in ms to fetch trades for | | limit | int | No | the maximum number of trades to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchOrderTrades (id, outcome?, since?, limit?, params?) ``` ### fetchBalance{docsify-ignore} fetches the USDC collateral balance available for trading on the CLOB **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [balance structure](https://docs.ccxt.com/#/?id=balance-structure) **See**: https://docs.polymarket.com/api-reference/trade/get-balance-allowance | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | | params.signatureType | int | No | 0=EOA, 1=POLY_PROXY, 2=GNOSIS_SAFE, 3=POLY_1271 (deposit wallet); defaults to options.signatureType | ```javascript polymarket.fetchBalance (params?) ``` ### fetchPositions{docsify-ignore} fetches open outcome token positions for the wallet from the data API **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction position structures](https://docs.ccxt.com/#/?id=prediction-position-structure) **See**: https://docs.polymarket.com/api-reference/core/get-current-positions-for-a-user | Param | Type | Required | Description | | --- | --- | --- | --- | | outcomes | Array<string> | No | unified outcomes to filter by | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchPositions (outcomes?, params?) ``` ### fetchPosition{docsify-ignore} fetches the open position for a single outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction position structure](https://docs.ccxt.com/#/?id=prediction-position-structure) **See**: https://docs.polymarket.com/api-reference/core/get-current-positions-for-a-user | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchPosition (outcome, params?) ``` ### fetchOpenOrders{docsify-ignore} fetches open resting orders for the authenticated user, optionally filtered by outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/get-user-orders | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | No | unified outcome or outcome token id | | since | int | No | not used by polymarket fetchOpenOrders | | limit | int | No | the maximum number of orders to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchOpenOrders (outcome?, since?, limit?, params?) ``` ### fetchOrder{docsify-ignore} fetches a single order by id from the CLOB private data endpoint **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/get-single-order-by-id | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | the order id | | outcome | string | No | unified outcome or outcome token id | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchOrder (id, outcome?, params?) ``` ### createOrder{docsify-ignore} places a limit or market order on the CLOB for the given outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/post-a-new-order | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | type | string | Yes | 'market' or 'limit'; market orders default to FOK and, when no price is given, use the outcome's current price as the marketable reference | | side | string | Yes | 'buy' or 'sell' | | amount | float | Yes | how many outcome tokens to trade | | price | float | No | the price per outcome token between 0 and 1; required for limit orders, defaults to the outcome's current price for market orders | | params | object | No | extra parameters specific to the exchange API endpoint | | params.orderType | string | No | time-in-force override: 'GTC' (default for limit), 'FOK' (default for market), 'GTD' or 'FAK' | | params.signatureType | int | No | 0=EOA, 1=POLY_PROXY, 2=GNOSIS_SAFE, 3=POLY_1271 (deposit wallet); defaults to options.signatureType | | params.funder | string | No | the wallet that holds the USDC collateral; defaults to options.funder or the signing address | | params.tickSize | string | No | the market tick size ('0.1'/'0.01'/'0.001'/'0.0001'); read from the outcome when omitted | | params.negRisk | bool | No | whether the market is a neg-risk market; read from the outcome when omitted | | params.salt | string | No | order salt; defaults to a strictly-increasing millisecond value (pin it for idempotent retries) | | params.timestamp | string | No | order timestamp; defaults to the current time in ms | | params.expiration | string | No | unix-seconds expiration for GTD orders; defaults to '0' (no expiry) | | params.builderCode | string | No | builder wallet address or full bytes32 builder code attached to the order for attribution (zero fee — tracking only); defaults to options.builder | ```javascript polymarket.createOrder (outcome, type, side, amount, price?, params?) ``` ### createOrders{docsify-ignore} places multiple orders on the CLOB in a single batched request **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/post-orders | Param | Type | Required | Description | | --- | --- | --- | --- | | orders | Array<object> | Yes | a list of order requests, each an object with outcome, type, side, amount, price and optional params (same params as createOrder) | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.createOrders (orders, params?) ``` ### createMarketBuyOrderWithCost{docsify-ignore} places a market buy order sized by USDC cost (how much to spend) rather than shares **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/post-a-new-order | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome or outcome token id | | cost | float | Yes | the amount of USDC to spend | | params | object | No | extra parameters specific to the exchange API endpoint (see createOrder) | ```javascript polymarket.createMarketBuyOrderWithCost (outcome, cost, params?) ``` ### cancelOrder{docsify-ignore} cancels a single open order by id on the CLOB **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction order structure](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/cancel-single-order | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | the order id | | outcome | string | No | unified outcome or outcome token id | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.cancelOrder (id, outcome?, params?) ``` ### cancelOrders{docsify-ignore} cancels multiple open orders by id on the CLOB in a single request **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/api-reference/trade/cancel-orders | Param | Type | Required | Description | | --- | --- | --- | --- | | ids | Array<string> | Yes | the order ids to cancel | | outcome | string | No | not used by polymarket cancelOrders | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.cancelOrders (ids, outcome?, params?) ``` ### cancelAllOrders{docsify-ignore} cancels all open orders on the CLOB, optionally scoped to one outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure) **See** - https://docs.polymarket.com/api-reference/trade/cancel-all-orders - https://docs.polymarket.com/api-reference/trade/cancel-market-orders | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | No | unified outcome or outcome token id; when given only that outcome's orders are cancelled | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.cancelAllOrders (outcome?, params?) ``` ### fetchEvents{docsify-ignore} fetches prediction-market events matching the given scope (query/queries/tags/eventId/slug — required) and caches their markets and outcomes on the instance; for an unscoped top-volume browse use fetchMarkets () **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - an array of event structures **See** - https://docs.polymarket.com/api-reference/search/search-markets-events-and-profiles - https://docs.polymarket.com/api-reference/events/list-events | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra exchange-specific parameters | | params.query | string | No | a single keyword search term | | params.queries | Array<string> | No | multiple search terms (alternative to query) | | params.tags | Array<string> | No | filter events by tag — human-readable labels ("Fed Rates") or slugs ("fed-rates") both work; multiple tags match ANY (one gamma listing per tag, unioned and deduped) | | params.limit | int | No | max number of events to return | | params.sort | string | No | 'volume' (default), 'liquidity' or 'newest' — mapped to the gamma order field | | params.status | string | No | 'active' (default), 'inactive', 'closed' or 'all' ('inactive' and 'closed' are interchangeable) | | params.searchIn | string | No | when searching, restrict the match to 'title' (default), 'description' or 'both' | | params.eventId | string | No | direct lookup by event id (short-circuits the listing/search) | | params.slug | string | No | direct lookup by event slug | | params.searchPageSize | int | No | search page size (gamma limit_per_type, default 100); lower it to shrink the download when a small limit is enough, higher to over-fetch before client-side status/title filtering | | params.maxSearchPages | int | No | max search pages to fetch when no limit is given (default 5), bounding a broad query | ```javascript polymarket.fetchEvents (params?) ``` ### fetchEvent{docsify-ignore} fetches a single prediction-market event by its id or slug **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction event structure](https://docs.ccxt.com/#/?id=prediction-event-structure) **See** - https://docs.polymarket.com/api-reference/events/get-event-by-id - https://docs.polymarket.com/api-reference/events/get-event-by-slug | Param | Type | Required | Description | | --- | --- | --- | --- | | id | string | Yes | the event id (numeric) or slug | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.fetchEvent (id, params?) ``` ### deriveApiKey{docsify-ignore} derives the L2 api credentials (apiKey, secret, passphrase) deterministically from the wallet private key **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - the api credentials { apiKey, secret, passphrase } **See**: https://docs.polymarket.com/developers/CLOB/authentication | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | | params.nonce | int | No | the nonce used to derive the credentials, defaults to 0 | ```javascript polymarket.deriveApiKey (params?) ``` ### createApiKey{docsify-ignore} creates new L2 api credentials (apiKey, secret, passphrase) for the wallet private key **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - the api credentials { apiKey, secret, passphrase } **See**: https://docs.polymarket.com/developers/CLOB/authentication | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | | params.nonce | int | No | the nonce used to create the credentials, defaults to 0 | ```javascript polymarket.createApiKey (params?) ``` ### createOrDeriveApiKey{docsify-ignore} derives the existing L2 api credentials for the wallet private key, creating them if none exist yet **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - the api credentials { apiKey, secret, passphrase } **See**: https://docs.polymarket.com/developers/CLOB/authentication | Param | Type | Required | Description | | --- | --- | --- | --- | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.createOrDeriveApiKey (params?) ``` ### watchOrderBook{docsify-ignore} streams live order-book updates for a single Polymarket outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction order book structure](https://docs.ccxt.com/#/?id=prediction-order-book-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome (e.g. "TRUMP_WINS_2028:YES") or an outcome token id | | limit | int | No | optional depth limit applied after resolving | | params | object | No | extra params (currently unused) | ```javascript polymarket.watchOrderBook (outcome, limit?, params?) ``` ### watchTrades{docsify-ignore} streams live fills for a single Polymarket outcome token **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome | | since | int | No | optional unix timestamp (ms) lower bound | | limit | int | No | optional max number of trades to return | | params | object | No | extra params (unused) | ```javascript polymarket.watchTrades (outcome, since?, limit?, params?) ``` ### watchTicker{docsify-ignore} streams a synthetic ticker derived from order-book snapshots and deltas (mid = (bid + ask) / 2) **Kind**: instance method of [polymarket](#polymarket) **Returns**: object - a [prediction ticker structure](https://docs.ccxt.com/#/?id=prediction-ticker-structure) | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | Yes | unified outcome | | params | object | No | extra params (unused) | ```javascript polymarket.watchTicker (outcome, params?) ``` ### watchOrders{docsify-ignore} watches the authenticated user's order updates over the CLOB user websocket channel **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction order structures](https://docs.ccxt.com/#/?id=prediction-order-structure) **See**: https://docs.polymarket.com/developers/CLOB/websocket/user-channel | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | No | unified outcome to filter the stream to one market | | since | int | No | the earliest time in ms to return orders for | | limit | int | No | the maximum number of orders to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.watchOrders (outcome?, since?, limit?, params?) ``` ### watchMyTrades{docsify-ignore} watches the authenticated user's trade fills over the CLOB user websocket channel **Kind**: instance method of [polymarket](#polymarket) **Returns**: Array<object> - a list of [prediction trade structures](https://docs.ccxt.com/#/?id=prediction-trade-structure) **See**: https://docs.polymarket.com/developers/CLOB/websocket/user-channel | Param | Type | Required | Description | | --- | --- | --- | --- | | outcome | string | No | unified outcome to filter the stream to one market | | since | int | No | the earliest time in ms to return trades for | | limit | int | No | the maximum number of trades to return | | params | object | No | extra parameters specific to the exchange API endpoint | ```javascript polymarket.watchMyTrades (outcome?, since?, limit?, params?) ```