Skip to content
LuckyPad
Launch

Read API

The index serves every figure the site shows. It reads; it never writes. A figure that moves money is read from the contract.

API=https://luckypad.fun/api/v1        # public
T=0x2541fe382d882f3ca6b167797a8c6edbf9eeb13d   # any coin: take one from /coins

Chain and health

curl -s $API/health                  # ok, lag, cursor, halted
curl -s $API/head                    # newest indexed block, lagMs, finalized, generation
curl -s $API/config                  # chainId, deployment (every contract address), deployBlock, apiVersion
curl -N $API/stream                  # SSE: event "head" per indexed block, a ping between (12 per IP)
curl -N "$API/stream?topics=board"   # SSE: one "board" frame per step with trades: price, market cap and ETH leg of each coin that traded
curl -s "$API/touched/48012840?g=4"  # what changed at a block: settled, cancelled, dividend, paid, refund, an instant draw

Coins

curl -s "$API/coins?sort=volume24h&limit=2"   # sort: new|volume24h|trades24h|mcap|holders|pay|feeVolume24h; q= searches
curl -s "$API/coin/$T/quotes"                 # buy quotes for presets, plus the coin's instant-draw terms
curl -s "$API/coin/$T/trades?limit=2"         # newest first; trader=0x… keeps one wallet; limit ≤ 500
curl -s "$API/coin/$T/candles?tf=1h&limit=2"  # tf: 15s|1m|5m|15m|1h|4h|1d; limit ≤ 2000
curl -s "$API/coin/$T/pot-events"             # the coin's pots' journal
curl -s "$API/coin/$T/open-pots"              # every open pot of the coin

Pots and the pad

curl -s "$API/pad/open?limit=2"               # every open pot on the pad, with totals; rank=pay|size, limit ≤ 256
curl -s "$API/pad/next-draws?limit=2"         # open pots with a date or a clock, soonest first
curl -s "$API/pad/strip"                      # the Floor's strip: recent pot events and trades
curl -s "$API/pad/events?after=48007840"      # raw pot events after a block; `after` is required
curl -s "$API/pot/1/events?limit=2"           # one pot's whole journal
curl -s "$API/pot/1/proof"                    # rounds, payouts, failures, fee, final
curl -s "$API/payouts?since=47912840"         # a page of payouts since a block; or ?pots=1,2 (≤ 64)
curl -s "$API/settled/pot/{id}"               # a closed pot, immutable once final (404 for an open one)
curl -s "$API/vrf/{requestId}"                # the Chainlink word for a request (404 for an id that is not ours)
curl -s "$API/settled/spin/$T/0"               # the same for one resolved ticket: coin and ticket index (404 until it resolves)

A wallet

curl -s "$API/wallet/0x…/coins"      # every coin the wallet held, traded or launched
curl -s "$API/wallet/0x…/activity"   # its own rows; since=<ts>&kinds=&cursor
curl -s "$API/wallet/0x…/claims"     # refunds, dividends, unpaid shares, coins it created

Calls

curl -s -X POST $API/rpc -H 'content-type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}'
curl -s "$API/call/{to}/{data}?block=N"   # one eth_call served from the index: {result, validFrom}

Writes are not here: send transactions to the contracts. The addresses and ABIs are on /integrate.