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
limitandoffsetparameters. - Rate Limits: 100 requests/minute per API key. Returns
429withRetry-Afterheader (seconds) when exceeded. Use exponential backoff on 429/503 responses.
Endpoint
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
user | string | Yes | User wallet address (e.g., 0x...). Required parameter. |
start_time | integer | No | Filter activity from this Unix timestamp (inclusive, seconds). Min: 0. |
end_time | integer | No | Filter activity until this Unix timestamp (inclusive, seconds). Min: 0. |
market_slug | string | No | Filter activity by market slug (e.g., crypto-btc-above-75000-2025-07-01). |
condition_id | string | No | Filter activity by condition ID. |
limit | integer | No | Number of activities to return. Default: 100, Max: 1000 (from settings). Min: 1. |
offset | integer | No | Number of activities to skip for pagination. Default: 0. Min: 0. |
Validation rules
- user (required): Must be provided. Returns
400if 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_timeandend_timeare provided,start_timemust be less thanend_time. Returns400if violated. - limit: Must be between 1 and the configured
MAX_LIMIT(typically 1000). Returns400if exceeded. - offset: Must be >= 0. Returns
400if negative.
Response schema
Field reference
Activity object
| Field | Type | Description |
|---|---|---|
id | string | Unique activity identifier. |
user | string | User wallet address who performed the activity. |
activity_type | enum | Type of on-chain operation: MERGE, SPLIT, or REDEEM. |
timestamp | string (ISO-8601) | When the activity occurred (UTC). |
market_slug | string | Market identifier slug (e.g., crypto-btc-above-75000-2025-07-01). |
condition_id | string | Condition ID associated with the activity. |
token_from | string | Source token address (for MERGE/SPLIT operations). |
token_to | string | Destination token address (for MERGE/SPLIT operations). |
quantity | string | Amount of tokens involved in the operation (decimal string). |
tx_hash | string | Blockchain transaction hash. |
block_number | integer | Block number when the activity was recorded on-chain. |
status | enum | Status of the operation: pending, confirmed, or failed. |
Pagination object
| Field | Type | Description |
|---|---|---|
limit | integer | Number of items per page (as requested). |
offset | integer | Number of items skipped (as requested). |
count | integer | Total number of activities returned in this response. |
has_more | boolean | true 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.SPLIT
Breaks a single token into multiple outcome tokens. Used to hedge or diversify positions.REDEEM
Redeems outcome tokens after market resolution for their value.Pagination tips
- Use
offsetandlimitto page through results. Start withoffset=0and increment bylimitfor each page. - Check
has_moreto determine if additional pages exist. - If your dataset is large, consider filtering by
start_timeandend_timeto reduce result set. - Store the last processed activity ID to avoid reprocessing on retries.
Examples
Errors
All errors return standard HTTP status codes with JSON error responses:| HTTP Status | Error Type | Description | Common Causes |
|---|---|---|---|
400 | missing_parameter | Required parameter missing | Missing user parameter |
400 | invalid_parameter | Parameter validation failed | Invalid limit value, negative offset, malformed wallet address |
400 | bad_request | Invalid filter combination | Both market_slug and condition_id provided, start_time >= end_time |
401 | unauthorized | Authentication failed | Missing or invalid x-api-key header |
403 | insufficient_permissions | API key lacks required permissions | Token not provisioned for Trading Data API |
404 | not_found | Resource not found | User address has no activity or doesn’t exist |
422 | validation_error | Data validation failed | Invalid timestamp format, out-of-range values |
429 | rate_limit_exceeded | Too many requests | Exceeded 100 requests/minute. Check Retry-After header. |
500 | internal_error | Server error | Retry with exponential backoff. Contact support if persists. |
503 | service_unavailable | Temporary service issue | Retry with exponential backoff |
Best practices
-
Use time filters: For large datasets, filter by
start_timeandend_timeto reduce result set and improve performance. -
Pagination strategy: Start with
offset=0and increment bylimit. Usehas_moreto detect the last page instead of checking array length. -
Filter specificity: Use either
market_slugorcondition_id, not both. Choose the one most relevant to your query. - Monitoring activity: Poll the endpoint on an interval (e.g., 30–60 seconds) or store the latest processed timestamp to detect new activity.
-
Error handling: Implement exponential backoff for
429and503responses. For400errors, validate parameters before retrying. - Caching: Cache results by the full query string and invalidate when appropriate (e.g., on user request or periodic refresh).
- Large result sets: If a user has many activities, use pagination with reasonable limits (100–500 per page) to avoid timeouts.
Related
- Orders — Historical order data with filtering
- Trading Data Overview — Introduction to trading endpoints
