Skip to main content
GET
/
v1
/
predexon
/
activity
curl -s "https://api.predexon.com/v1/predexon/activity?user=0x742d35Cc6634C0532925a3b844Bc9e7595f42bF&limit=50" \
  -H "x-api-key: YOUR_API_KEY"
{
  "activities": [
    {
      "id": "activity_001",
      "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bF",
      "activity_type": "MERGE",
      "timestamp": "2025-10-15T14:32:45Z",
      "market_slug": "crypto-btc-above-75000-2025-07-01",
      "condition_id": "0x1234567890abcdef",
      "token_from": "0x...",
      "token_to": "0x...",
      "quantity": "150.50",
      "tx_hash": "0xabc123...",
      "block_number": 18750432,
      "status": "confirmed"
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "count": 45,
    "has_more": false
  }
}

Activity

GET /v1/predexon/activity — Retrieve on-chain activity operations (MERGE, SPLIT, REDEEM) for a specific user wallet. Filter by time range, market, or condition with offset pagination.
  • Base URL: https://api.predexon.com/v1
  • Auth: x-api-key: <YOUR_API_KEY>
  • Time: All timestamps are Unix timestamps (seconds) for filtering; responses use ISO-8601 format.
  • Pagination: Offset-based via limit and offset parameters.
  • Rate Limits: 100 requests/minute per API key. Returns 429 with Retry-After header (seconds) when exceeded. Use exponential backoff on 429/503 responses.

Endpoint

GET /v1/predexon/activity

Query parameters

ParameterTypeRequiredDescription
userstringYesUser wallet address (e.g., 0x...). Required parameter.
start_timeintegerNoFilter activity from this Unix timestamp (inclusive, seconds). Min: 0.
end_timeintegerNoFilter activity until this Unix timestamp (inclusive, seconds). Min: 0.
market_slugstringNoFilter activity by market slug (e.g., crypto-btc-above-75000-2025-07-01).
condition_idstringNoFilter activity by condition ID.
limitintegerNoNumber of activities to return. Default: 100, Max: 1000 (from settings). Min: 1.
offsetintegerNoNumber of activities to skip for pagination. Default: 0. Min: 0.

Validation rules

  • user (required): Must be provided. Returns 400 if missing.
  • market_slug vs condition_id: Only one of these filters can be applied. If both are provided, returns 400 bad_request.
  • time range: If both start_time and end_time are provided, start_time must be less than end_time. Returns 400 if violated.
  • limit: Must be between 1 and the configured MAX_LIMIT (typically 1000). Returns 400 if exceeded.
  • offset: Must be >= 0. Returns 400 if negative.

Response schema

{
  "activities": [
    {
      "id": "activity_001",
      "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bF",
      "activity_type": "MERGE",
      "timestamp": "2025-10-15T14:32:45Z",
      "market_slug": "crypto-btc-above-75000-2025-07-01",
      "condition_id": "0x1234567890abcdef",
      "token_from": "0x...",
      "token_to": "0x...",
      "quantity": "150.50",
      "tx_hash": "0xabc123...",
      "block_number": 18750432,
      "status": "confirmed"
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "count": 45,
    "has_more": false
  }
}

Field reference

Activity object

FieldTypeDescription
idstringUnique activity identifier.
userstringUser wallet address who performed the activity.
activity_typeenumType of on-chain operation: MERGE, SPLIT, or REDEEM.
timestampstring (ISO-8601)When the activity occurred (UTC).
market_slugstringMarket identifier slug (e.g., crypto-btc-above-75000-2025-07-01).
condition_idstringCondition ID associated with the activity.
token_fromstringSource token address (for MERGE/SPLIT operations).
token_tostringDestination token address (for MERGE/SPLIT operations).
quantitystringAmount of tokens involved in the operation (decimal string).
tx_hashstringBlockchain transaction hash.
block_numberintegerBlock number when the activity was recorded on-chain.
statusenumStatus of the operation: pending, confirmed, or failed.

Pagination object

FieldTypeDescription
limitintegerNumber of items per page (as requested).
offsetintegerNumber of items skipped (as requested).
countintegerTotal number of activities returned in this response.
has_morebooleantrue if more activities exist beyond this page, false otherwise. Use to determine if pagination should continue.

Activity types

MERGE

Combines multiple outcome tokens into a single token. Typically used to consolidate positions.
{
  "activity_type": "MERGE",
  "token_from": ["0x...", "0x..."],
  "token_to": "0x...",
  "quantity": "100.00"
}

SPLIT

Breaks a single token into multiple outcome tokens. Used to hedge or diversify positions.
{
  "activity_type": "SPLIT",
  "token_from": "0x...",
  "token_to": ["0x...", "0x..."],
  "quantity": "50.00"
}

REDEEM

Redeems outcome tokens after market resolution for their value.
{
  "activity_type": "REDEEM",
  "token_from": "0x...",
  "quantity": "200.50"
}
Pagination tips
  • Use offset and limit to page through results. Start with offset=0 and increment by limit for each page.
  • Check has_more to determine if additional pages exist.
  • If your dataset is large, consider filtering by start_time and end_time to reduce result set.
  • Store the last processed activity ID to avoid reprocessing on retries.

Examples

curl -s "https://api.predexon.com/v1/predexon/activity?user=0x742d35Cc6634C0532925a3b844Bc9e7595f42bF&limit=50" \
  -H "x-api-key: YOUR_API_KEY"
{
  "activities": [
    {
      "id": "activity_001",
      "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f42bF",
      "activity_type": "MERGE",
      "timestamp": "2025-10-15T14:32:45Z",
      "market_slug": "crypto-btc-above-75000-2025-07-01",
      "condition_id": "0x1234567890abcdef",
      "token_from": "0x...",
      "token_to": "0x...",
      "quantity": "150.50",
      "tx_hash": "0xabc123...",
      "block_number": 18750432,
      "status": "confirmed"
    }
  ],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "count": 45,
    "has_more": false
  }
}

Errors

All errors return standard HTTP status codes with JSON error responses:
{
  "error": {
    "type": "invalid_parameter",
    "message": "user is required",
    "param": "user"
  }
}
HTTP StatusError TypeDescriptionCommon Causes
400missing_parameterRequired parameter missingMissing user parameter
400invalid_parameterParameter validation failedInvalid limit value, negative offset, malformed wallet address
400bad_requestInvalid filter combinationBoth market_slug and condition_id provided, start_time >= end_time
401unauthorizedAuthentication failedMissing or invalid x-api-key header
403insufficient_permissionsAPI key lacks required permissionsToken not provisioned for Trading Data API
404not_foundResource not foundUser address has no activity or doesn’t exist
422validation_errorData validation failedInvalid timestamp format, out-of-range values
429rate_limit_exceededToo many requestsExceeded 100 requests/minute. Check Retry-After header.
500internal_errorServer errorRetry with exponential backoff. Contact support if persists.
503service_unavailableTemporary service issueRetry with exponential backoff
No results return HTTP 200 with empty activities array:
{
  "activities": [],
  "pagination": {
    "limit": 100,
    "offset": 0,
    "count": 0,
    "has_more": false
  }
}

Best practices

  1. Use time filters: For large datasets, filter by start_time and end_time to reduce result set and improve performance.
  2. Pagination strategy: Start with offset=0 and increment by limit. Use has_more to detect the last page instead of checking array length.
  3. Filter specificity: Use either market_slug or condition_id, not both. Choose the one most relevant to your query.
  4. Monitoring activity: Poll the endpoint on an interval (e.g., 30–60 seconds) or store the latest processed timestamp to detect new activity.
  5. Error handling: Implement exponential backoff for 429 and 503 responses. For 400 errors, validate parameters before retrying.
  6. Caching: Cache results by the full query string and invalidate when appropriate (e.g., on user request or periodic refresh).
  7. Large result sets: If a user has many activities, use pagination with reasonable limits (100–500 per page) to avoid timeouts.