Get Snaxpot My Winning Tickets
Retrieve winning Snaxpot lottery tickets for the authenticated subaccount in a single resolved epoch. When epochId is omitted, the latest resolved epoch is used.
Endpoint
POST https://papi.synthetix.io/v1/tradeRequest
Request Format
{
"params": {
"action": "getSnaxpotMyWinningTickets",
"subAccountId": "1867542890123456789",
"epochId": 12
},
"expiresAfter": 1704153600000,
"signature": {
"v": 28,
"r": "0x19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef",
"s": "0xabcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600abcdef19480589384695193600"
}
}Omit epochId to query the latest resolved epoch:
{
"params": {
"action": "getSnaxpotMyWinningTickets",
"subAccountId": "1867542890123456789"
},
"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 "getSnaxpotMyWinningTickets" |
params.subAccountId | string | Yes | SubAccount ID to query |
params.epochId | integer | No | Resolved epoch to query. Defaults to the latest resolved epoch 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, getSnaxpotMyWinningTickets) do not require the nonce parameter. Only signature and optional expiresAfter are needed.
:::
Response
Success Response
{
"status": "ok",
"response": {
"epochId": 12,
"epochState": "resolved",
"minorDistributionTxHashes": [
"0xabc1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"0xdef4567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12"
],
"winningBalls": [3, 14, 22, 31, 47],
"winningSnaxBall": 7,
"tickets": [
{
"ticketSerial": "1048576",
"ball1": 3,
"ball2": 14,
"ball3": 22,
"ball4": 31,
"ball5": 49,
"snaxBall": 7,
"tierCode": "4_snax",
"tierLabel": "4 + Snax",
"standardMatchCount": 4,
"snaxMatch": true,
"prizeAmount": "1000.000000000000000000"
}
]
},
"rateLimit": {
"requestsCap": 1200,
"remainingTokens": 1195
},
"request_id": "5ccf215d37e3ae6d",
"timestamp": "2026-06-23T12:00:00Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
epochId | integer | Epoch identifier |
epochState | string | Epoch state (e.g., "resolved") |
minorDistributionTxHashes | string[] | On-chain transaction hashes for minor prize distributions. Omitted when empty (pre-resolution epochs or epochs without minor-prize distribution transactions) |
winningBalls | integer[] | Winning main ball numbers for the epoch. Omitted when not yet drawn |
winningSnaxBall | integer | Winning Snax ball number for the epoch. Omitted when not yet drawn |
tickets | array | Winning tickets held by the subaccount for this epoch |
tickets[].ticketSerial | string | Ticket serial number |
tickets[].ball1 | integer | First main ball on the ticket |
tickets[].ball2 | integer | Second main ball on the ticket |
tickets[].ball3 | integer | Third main ball on the ticket |
tickets[].ball4 | integer | Fourth main ball on the ticket |
tickets[].ball5 | integer | Fifth main ball on the ticket |
tickets[].snaxBall | integer | Snax ball on the ticket |
tickets[].tierCode | string | Prize tier code |
tickets[].tierLabel | string | Human-readable prize tier label |
tickets[].standardMatchCount | integer | Number of matching main balls |
tickets[].snaxMatch | boolean | Whether the Snax ball matched |
tickets[].prizeAmount | string | Prize amount as a decimal string |
Error Response
{
"status": "error",
"error": {
"code": "VALIDATION_ERROR",
"message": "subAccountId is required"
},
"request_id": "5ccf215d37e3ae6d"
}Implementation Notes
- Uses
SubAccountActionEIP-712 signing withaction: "getSnaxpotMyWinningTickets" - Can be signed by the account owner or an authorized delegated signer; see Snaxpot for authentication requirements across Snaxpot actions
- Returns winning tickets only for resolved epochs
minorDistributionTxHashescontains on-chain receipts for minor prize distribution transactions; the field is omitted when no hashes are recorded
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 |
Related Endpoints
- Get Snaxpot Epoch Tickets — Query issued tickets and epoch statistics across a range
- Get Snaxpot Epoch — Public epoch metadata and VRF verification hashes
- Snaxpot — Snaxpot action overview