Skip to main content
GET
/
v1
/
predexon
/
orders
curl -s "https://api.predexon.com/v1/predexon/orders?market_slug=us-election-2024-winner&limit=100" \
  -H "x-api-key: YOUR_API_KEY"
{
  "orders": [
    {
      "id": "ord_abc123def456",
      "market_slug": "us-election-2024-winner",
      "condition_id": "cond_xyz789",
      "token_id": "token_yes_2024",
      "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bE",
      "price": "0.65",
      "size": "100",
      "timestamp": 1698768000,
      "timestamp_iso": "2023-10-31T12:00:00Z",
      "side": "BUY",
      "order_type": "LIMIT",
      "status": "FILLED"
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "total": 5432,
    "has_more": true
  }
}

Orders

GET /v1/predexon/orders — Retrieve historical order data with flexible filtering by market, token, condition, user, and time range.
  • Base URL: https://api.predexon.com/v1
  • Auth: x-api-key: YOUR_API_KEY
  • Time: All timestamps are Unix timestamps (seconds since epoch). Responses include UTC ISO-8601 format.
  • Pagination: Offset-based via limit and offset parameters
  • Rate Limits: Standard API rate limits apply. Returns 429 with Retry-After header when exceeded. Use exponential backoff on 429/503 responses.

Common use cases

  • Trading analytics: Analyze order flow and trading patterns for a specific market
  • User tracking: Monitor all orders placed by a specific wallet address
  • Market research: Study order book evolution and participation
  • Compliance & auditing: Retrieve complete order history within a time window

Endpoint

GET /v1/predexon/orders

Query parameters

All parameters are optional. However, at least one filter is required (unless fetching all orders without any constraints).
ParameterTypeNotes
market_slugstringFilter orders by market slug. Cannot be combined with token_id or condition_id.
condition_idstringFilter orders by condition ID. Cannot be combined with market_slug or token_id.
token_idstringFilter orders by token ID. Cannot be combined with market_slug or condition_id.
start_timeintegerFilter orders from this Unix timestamp (inclusive). Minimum: 0. Must be less than end_time if both provided.
end_timeintegerFilter orders until this Unix timestamp (inclusive). Minimum: 0. Must be greater than start_time if both provided.
userstringFilter orders by user wallet address. Exact match.
limitintegerNumber of orders to return per page. Default: 100, Max: [configured max]. Minimum: 1.
offsetintegerNumber of orders to skip for pagination. Default: 0. Minimum: 0.
Validation rules:
  1. At least one filter required: You must provide at least one of: market_slug, condition_id, token_id, start_time, end_time, or user.
  2. Exclusive market/token filters: Only one of market_slug, token_id, or condition_id may be provided. Combining multiple returns a 400 Bad Request.
  3. Time range validation: If both start_time and end_time are provided, start_time must be strictly less than end_time. Violating this returns a 400 Bad Request.
  4. Pagination bounds: limit must be between 1 and the configured maximum. offset must be non-negative.

Response schema

{
  "orders": [
    {
      "id": "ord_abc123def456",
      "market_slug": "us-election-2024-winner",
      "condition_id": "cond_xyz789",
      "token_id": "token_yes_2024",
      "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bE",
      "price": "0.65",
      "size": "100",
      "timestamp": 1698768000,
      "timestamp_iso": "2023-10-31T12:00:00Z",
      "side": "BUY",
      "order_type": "LIMIT",
      "status": "FILLED"
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "total": 5432,
    "has_more": true
  }
}

Field reference

FieldTypeDescription
ordersarrayList of order records. Ordered by timestamp descending (newest first).
orders[].idstringUnique order identifier.
orders[].market_slugstringMarket identifier slug (human-readable format).
orders[].condition_idstringCanonical condition identifier for this market outcome.
orders[].token_idstringToken identifier representing the outcome.
orders[].userstringWallet address of the order placer.
orders[].pricestringOrder price as decimal string (0.00 to 1.00).
orders[].sizestringOrder size as decimal string (quantity of outcome tokens).
orders[].timestampintegerUnix timestamp (seconds since epoch, UTC).
orders[].timestamp_isostring (ISO-8601)Human-readable timestamp in UTC format.
orders[].sideenumBUY or SELL.
orders[].order_typeenumLIMIT | MARKET | other supported types.
orders[].statusenumOrder status: PENDING | FILLED | PARTIALLY_FILLED | CANCELLED | REJECTED.
pagination.limitintegerNumber of results returned (matches request limit parameter).
pagination.offsetintegerNumber of results skipped (matches request offset parameter).
pagination.totalintegerTotal number of orders matching the filter criteria.
pagination.has_morebooleantrue if more results are available beyond current page; false if this is the last page.
Data types:
  • Prices and sizes are represented as decimal strings to preserve precision. Parse as float or Decimal types in your language to avoid floating-point errors.
  • Timestamps are provided in both Unix format (seconds) and ISO-8601 for convenience.
  • User addresses are wallet addresses (e.g., Ethereum addresses) in checksummed format.

Examples

curl -s "https://api.predexon.com/v1/predexon/orders?market_slug=us-election-2024-winner&limit=100" \
  -H "x-api-key: YOUR_API_KEY"
{
  "orders": [
    {
      "id": "ord_abc123def456",
      "market_slug": "us-election-2024-winner",
      "condition_id": "cond_xyz789",
      "token_id": "token_yes_2024",
      "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bE",
      "price": "0.65",
      "size": "100",
      "timestamp": 1698768000,
      "timestamp_iso": "2023-10-31T12:00:00Z",
      "side": "BUY",
      "order_type": "LIMIT",
      "status": "FILLED"
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "total": 5432,
    "has_more": true
  }
}

Errors

All errors return standard HTTP status codes with JSON error responses:
{
  "error": {
    "type": "invalid_parameter",
    "message": "At least one filter (market_slug, condition_id, token_id, start_time, end_time, or user) is required",
    "param": "filters"
  }
}

Error Types

HTTP StatusError TypeDescriptionCommon Causes
400invalid_parameterRequest validation failedMissing required filters, invalid parameter types, malformed values
400conflicting_parametersMutually exclusive parameters providedProvided both market_slug and token_id, or start_time >= end_time
400missing_filterNo filter parameters providedMust specify at least one filter
401invalid_credentialsAuthentication failedMissing or invalid x-api-key header
403insufficient_permissionsAPI key lacks required permissionsAPI key not provisioned for Trading API access
404not_foundResource not foundInvalid market slug, condition ID, or token ID
429rate_limit_exceededToo many requestsExceeded rate limit. Check Retry-After header.
500internal_errorServer errorUnexpected server issue. Retry with backoff.
503service_unavailableTemporary service issueService temporarily unavailable. Retry with exponential backoff.
Empty results return HTTP 200 with empty array:
{
  "orders": [],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "total": 0,
    "has_more": false
  }
}
See Errors & Status Codes for full list and remediation tips.

Best practices

  1. Use specific filters: Combine filters (e.g., market_slug + start_time) to reduce result set size and improve performance.
  2. Pagination: Use offset and limit for large result sets. Check has_more to determine if you need another request.
  3. Time range queries: When filtering by time, use Unix timestamps and verify start_time < end_time to avoid validation errors.
  4. Cache selectively: Cache order data by query parameters. Invalidate when querying recent time windows (orders may still be settling).
  5. Wallet address format: Ensure wallet addresses are in the correct checksummed format (e.g., Ethereum addresses). Case-sensitive matching may apply.
  6. Decimal precision: Parse price and size fields as decimal types (Python’s Decimal, JavaScript’s BigNumber, etc.) to avoid floating-point precision loss.
  7. Handle retries: Implement exponential backoff for 429 and 503 responses. Check the Retry-After header for guidance.
  • Activity — On-chain activity (MERGE, SPLIT, REDEEM)
  • Markets — Discover markets for order queries
  • Quotes — Real-time market prices