Get Snaxpot Epoch Tickets
Retrieve issued Snaxpot lottery tickets and ticket-related statistics for the authenticated subaccount across an inclusive epoch range. The response includes one epoch item per epoch in the requested range, even when no tickets were issued for that epoch.
Endpoint
POST https://papi.synthetix.io/v1/tradeRequest
Request Format
{
"params": {
"action": "getSnaxpotEpochTickets",
"subAccountId": "1867542890123456789",
"startEpochId": 42,
"endEpochId": 44
},
"expiresAfter": 1704153600000,
"signature": {
"v": 28,
"r": "0x19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef",
"s": "0xabcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600"
}
}Omit endEpochId to query a single epoch (startEpochId only):
{
"params": {
"action": "getSnaxpotEpochTickets",
"subAccountId": "1867542890123456789",
"startEpochId": 42
},
"signature": {
"v": 28,
"r": "0x19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef",
"s": "0xabcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600"
}
}Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
params | object | Yes | Request parameters wrapper |
params.action | string | Yes | Must be "getSnaxpotEpochTickets" |
params.subAccountId | string | Yes | SubAccount ID to query |
params.startEpochId | integer | Yes | First epoch in the inclusive query range |
params.endEpochId | integer | No | Last epoch in the inclusive query range; defaults to startEpochId when omitted |
| Parameter | Type | Required | Description |
|---|---|---|---|
nonce | uint64 | Yes* | Positive integer nonce (must be incrementing and unique per request) |
signature | object | Yes | EIP-712 signature object |
expiresAfter | uint64 | No | Unix milliseconds expiration timestamp (5x rate limit on stale cancels) |
:::info Common Parameters
These are top-level request parameters. The subAccountId parameter is specified within the params object (see each endpoint's parameter table).
:::
:::info SubAccountAction Endpoints
Endpoints using SubAccountAction signing (getPositions, getOpenOrders, getOrderHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates, getWithdrawableAmounts, getFeeRate, getSnaxpotEpochTickets) do not require the nonce parameter. Only signature and optional expiresAfter are needed.
:::
Response
Success Response
{
"status": "ok",
"response": {
"startEpochId": 42,
"endEpochId": 44,
"epochs": [
{
"epochId": 42,
"earnedTicketCount": 3,
"issuedTicketCount": 2,
"cumulativeFeesUsd": "1250.50",
"cumulativePurchasedUsd": "500.00",
"stakingMultiplier": "1.25",
"tickets": [
{
"ticketSerial": "1000042",
"ball1": 4,
"ball2": 12,
"ball3": 27,
"ball4": 33,
"ball5": 41,
"snaxBall": 7,
"selectionSource": "auto",
"createdAt": 1740307200000
}
]
},
{
"epochId": 43,
"earnedTicketCount": 1,
"issuedTicketCount": 1,
"cumulativeFeesUsd": "980.00",
"cumulativePurchasedUsd": "250.00",
"stakingMultiplier": "1.00",
"tickets": []
},
{
"epochId": 44,
"earnedTicketCount": 0,
"issuedTicketCount": 0,
"cumulativeFeesUsd": "0",
"cumulativePurchasedUsd": "0",
"stakingMultiplier": "1.00",
"tickets": []
}
]
},
"request_id": "5ccf215d37e3ae6d",
"timestamp": "2026-05-26T12:00:00Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
startEpochId | integer | First epoch in the resolved query range |
endEpochId | integer | Last epoch in the resolved query range |
epochs | array | One item per epoch from startEpochId through endEpochId, inclusive |
epochs[].epochId | integer | Epoch identifier |
epochs[].earnedTicketCount | integer | Tickets earned for this epoch |
epochs[].issuedTicketCount | integer | Tickets issued for this epoch |
epochs[].cumulativeFeesUsd | string | Cumulative trading fees in USD for this epoch |
epochs[].cumulativePurchasedUsd | string | Cumulative Snaxpot purchase credits in USD for this epoch |
epochs[].stakingMultiplier | string | Staking multiplier applied for this epoch |
epochs[].tickets | array | Issued tickets for this epoch |
epochs[].tickets[].ticketSerial | string | Ticket serial number |
epochs[].tickets[].ball1 | integer | First main ball |
epochs[].tickets[].ball2 | integer | Second main ball |
epochs[].tickets[].ball3 | integer | Third main ball |
epochs[].tickets[].ball4 | integer | Fourth main ball |
epochs[].tickets[].ball5 | integer | Fifth main ball |
epochs[].tickets[].snaxBall | integer | Snax ball number |
epochs[].tickets[].selectionSource | string | How the ticket numbers were selected |
epochs[].tickets[].createdAt | integer | Ticket creation timestamp in Unix milliseconds |
Error Response
{
"status": "error",
"error": {
"code": "VALIDATION_ERROR",
"message": "startEpochId is required"
},
"request_id": "5ccf215d37e3ae6d"
}When the result set exceeds 5,000 tickets:
{
"status": "error",
"error": {
"code": "VALIDATION_ERROR",
"message": "Requested epoch range returns too many tickets; narrow startEpochId/endEpochId."
},
"request_id": "5ccf215d37e3ae6f"
}Implementation Notes
- Uses
SubAccountActionEIP-712 signing withaction: "getSnaxpotEpochTickets" - Can be signed by the account owner or an authorized delegated signer; see Snaxpot for authentication requirements across Snaxpot actions
startEpochIdis required and must be greater than zero- When provided,
endEpochIdmust be greater than or equal tostartEpochIdand must not exceed the current epoch - The inclusive epoch range must not exceed 13 epochs
- The total ticket count across the range must not exceed 5,000
- Returns HTTP 404 when
startEpochIddoes not correspond to an existing epoch - Useful for past draw sharing, analytics, and displaying historical lottery participation without per-epoch requests
Signing
All trading methods are signed using EIP-712. Each successful trading request will contain:
- A piece of structured data that includes the sender address
- A signature of the hash of that structured data, signed by the sender
For detailed information on EIP-712 signing, see EIP-712 Signing.
Nonce Management
The nonce system prevents replay attacks and ensures order uniqueness:
- Use any positive integer as nonce
- Each nonce must be greater than the previous one (incrementing)
Date.now()is a convenient option, not a requirement- If nonce conflicts occur, increment by 1 and retry
:::note SubAccountAction Exception
SubAccountAction endpoints (getPositions, getOpenOrders, getOrderHistory, getTrades, getFundingPayments, getSubAccount, getSubAccounts, getDelegatedSigners, getBalanceUpdates, getWithdrawableAmounts, getFeeRate, getSnaxpotEpochTickets) do not require a nonce. Only the signature and optional expiresAfter parameters are needed.
:::
| Error Code | Description | Retryable |
|---|---|---|
UNAUTHORIZED | EIP-712 signature validation failed | No |
VALIDATION_ERROR | Request validation failed | No |
MISSING_REQUIRED_FIELD | Required field is missing | No |
INVALID_FORMAT | Field format is invalid | No |
INVALID_VALUE | Invalid parameter value | No |
RATE_LIMIT_EXCEEDED | Too many requests in time window | Yes |
INSUFFICIENT_MARGIN | Not enough margin for trade | No |
ORDER_NOT_FOUND | Order does not exist | No |
OPERATION_TIMEOUT | Operation timed out | Yes |