Skip to main content
GET
/
2
/
pm
/
market
/
trades
Recent prediction-market trades
curl --request GET \
  --url https://demo-api.mobula.io/api/2/pm/market/trades
{
  "data": [
    {
      "id": "<string>",
      "marketId": "<string>",
      "outcomeId": "<string>",
      "platform": "<string>",
      "type": "<string>",
      "priceUSD": 123,
      "sizeToken": 123,
      "amountUSD": 123,
      "date": 123,
      "swapRecipient": "<string>",
      "transactionHash": "<string>"
    }
  ],
  "pagination": {
    "page": 123,
    "offset": 123,
    "limit": 123,
    "pageEntries": 123,
    "totalCount": 123,
    "hasMore": true,
    "nextCursor": "<string>"
  },
  "hostname": "<string>",
  "took": 123
}

Documentation Index

Fetch the complete documentation index at: https://docs.mobula.io/llms.txt

Use this file to discover all available pages before exploring further.

Alpha — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.

Query Parameters

platform
string
required
The prediction market platform (e.g., polymarket).
At least one of marketId or outcomeId must be provided.
marketId
string
The platform-specific market identifier (Polymarket conditionId hex). Optional when outcomeId is provided.
outcomeId
string
Outcome token ID. When provided alone, returns trades for this outcome across all markets. When provided with marketId, filters trades to this outcome within that market.
from
string | number
Start time. Accepts Unix timestamp in milliseconds (e.g., 1709913600000) or ISO 8601 string (e.g., 2024-03-01T00:00:00Z).
to
string | number
End time. Accepts Unix timestamp in milliseconds (e.g., 1709913600000) or ISO 8601 string (e.g., 2024-03-01T00:00:00Z).
minAmountUSD
number
default:"0"
Minimum trade value in USD. Filters out trades below this threshold.
limit
number
default:"50"
Number of trades to return (1 to 500).
offset
number
default:"0"
Pagination offset. Ignored when cursor is provided.
cursor
string
Cursor for keyset pagination. Use the nextCursor value from a previous response to fetch the next page. Takes precedence over offset.
sortOrder
string
default:"desc"
Sort direction for trades by date. Possible values: asc, desc.

Response

data
array
Array of trade records.
pagination
object
Pagination metadata.
hostname
string
Server hostname that handled the request.
took
number
Request processing time in milliseconds.

Usage Examples

Offset-based pagination

curl -X GET "https://api.mobula.io/api/2/pm/market/trades?platform=polymarket&marketId=0x1234...&limit=20&minAmountUSD=100"

Cursor-based pagination

# First page
curl -X GET "https://api.mobula.io/api/2/pm/market/trades?platform=polymarket&marketId=0x1234...&limit=50"

# Next page (use nextCursor from previous response)
curl -X GET "https://api.mobula.io/api/2/pm/market/trades?platform=polymarket&marketId=0x1234...&limit=50&cursor=1709913600000:trade-001"

With ISO date range

curl -X GET "https://api.mobula.io/api/2/pm/market/trades?platform=polymarket&marketId=0x1234...&from=2024-03-01T00:00:00Z&to=2024-03-08T00:00:00Z&sortOrder=asc"

Example Response

{
  "data": [
    {
      "id": "trade-001",
      "marketId": "0x1234...",
      "outcomeId": "71321...",
      "platform": "polymarket",
      "type": "buy",
      "priceUSD": 0.35,
      "sizeToken": 1000,
      "amountUSD": 350,
      "date": 1709913600000,
      "swapRecipient": "0xabc...",
      "transactionHash": "0xdef..."
    }
  ],
  "pagination": {
    "page": 1,
    "offset": 0,
    "limit": 50,
    "pageEntries": 1,
    "totalCount": 1,
    "hasMore": false,
    "nextCursor": null
  },
  "hostname": "node-xyz",
  "took": 42
}

Query Parameters

platform
string
required
Minimum string length: 1
marketId
string
outcomeId
string
from
number | null

Unix timestamp in MILLISECONDS (not seconds).

to
number | null

Unix timestamp in MILLISECONDS (not seconds).

minAmountUSD
number | null
default:0
Required range: x >= 0
limit
number
default:50
Required range: 1 <= x <= 500
cursor
string

Opaque cursor returned by the previous page (pagination.nextCursor).

Response

200 - application/json

Prediction Markets response

data
object[]
required
pagination
object
required
hostname
string
required
took
number
required