Skip to content

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/trade

Request

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

ParameterTypeRequiredDescription
paramsobjectYesRequest parameters wrapper
params.actionstringYesMust be "getSnaxpotMyWinningTickets"
params.subAccountIdstringYesSubAccount ID to query
params.epochIdintegerNoResolved epoch to query. Defaults to the latest resolved epoch when omitted
ParameterTypeRequiredDescription
nonceuint64Yes*Positive integer nonce (must be incrementing and unique per request)
signatureobjectYesEIP-712 signature object
expiresAfteruint64NoUnix 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

FieldTypeDescription
epochIdintegerEpoch identifier
epochStatestringEpoch state (e.g., "resolved")
minorDistributionTxHashesstring[]On-chain transaction hashes for minor prize distributions. Omitted when empty (pre-resolution epochs or epochs without minor-prize distribution transactions)
winningBallsinteger[]Winning main ball numbers for the epoch. Omitted when not yet drawn
winningSnaxBallintegerWinning Snax ball number for the epoch. Omitted when not yet drawn
ticketsarrayWinning tickets held by the subaccount for this epoch
tickets[].ticketSerialstringTicket serial number
tickets[].ball1integerFirst main ball on the ticket
tickets[].ball2integerSecond main ball on the ticket
tickets[].ball3integerThird main ball on the ticket
tickets[].ball4integerFourth main ball on the ticket
tickets[].ball5integerFifth main ball on the ticket
tickets[].snaxBallintegerSnax ball on the ticket
tickets[].tierCodestringPrize tier code
tickets[].tierLabelstringHuman-readable prize tier label
tickets[].standardMatchCountintegerNumber of matching main balls
tickets[].snaxMatchbooleanWhether the Snax ball matched
tickets[].prizeAmountstringPrize amount as a decimal string

Error Response

{
  "status": "error",
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "subAccountId is required"
  },
  "request_id": "5ccf215d37e3ae6d"
}

Implementation Notes

  • Uses SubAccountAction EIP-712 signing with action: "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
  • minorDistributionTxHashes contains 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 CodeDescriptionRetryable
UNAUTHORIZEDEIP-712 signature validation failedNo
VALIDATION_ERRORRequest validation failedNo
MISSING_REQUIRED_FIELDRequired field is missingNo
INVALID_FORMATField format is invalidNo
INVALID_VALUEInvalid parameter valueNo
RATE_LIMIT_EXCEEDEDToo many requests in time windowYes
INSUFFICIENT_MARGINNot enough margin for tradeNo
ORDER_NOT_FOUNDOrder does not existNo
OPERATION_TIMEOUTOperation timed outYes

Related Endpoints