ZeroCopyZeroCopy
API reference

getTipFloor

Read regional landed-tip percentiles.

The tip floor is available as the JSON-RPC method getTipFloor and as GET /tip_floor. Both need an API key and return the same JSON.

Request
{"jsonrpc":"2.0","id":1,"method":"getTipFloor"}
GET /tip_floor
curl -sS "https://fra.sol.zerocopy.sh/tip_floor" -H "x-api-key: $SWQOS_API_KEY"

Params

None. params, when present, is ignored.

Result

An array holding zero or one object. GET /tip_floor returns the array itself as application/json; getTipFloor returns it as result.

Result shape
[
  {
    "time": "YYYY-MM-DDTHH:MM:SSZ",
    "landed_tips_25th_percentile": LAMPORTS,
    "landed_tips_50th_percentile": LAMPORTS,
    "landed_tips_75th_percentile": LAMPORTS,
    "landed_tips_95th_percentile": LAMPORTS,
    "landed_tips_99th_percentile": LAMPORTS
  }
]
FieldTypeMeaning
timestringWhen the snapshot was computed, RFC 3339 in UTC, to the second.
landed_tips_Nth_percentileinteger, lamportsThe region's Nth landed-tip percentile.

An empty array means no recent landing data is available.

Using the floor

The floor is an observation, not a required tip or a prediction of landing. Your key's minimum tip still applies.

Regions report their own values. Use a named regional hostname when comparing responses.

The SWQoS agent does not serve the tip floor; ask a region.

Errors

ReasonHTTPCodeWhen
unauthorized401-32000The key is missing, unknown or revoked.
invalid_request200see codesThe body is not a valid JSON-RPC request.
unsupported404 for GET /tip_floor, 200 for JSON-RPC-32601Asked of the SWQoS agent, which does not serve it.

Examples

tip-floor.ts
import { call } from './swqos.ts'

type TipFloor = {
  time: string
  landed_tips_25th_percentile: number
  landed_tips_50th_percentile: number
  landed_tips_75th_percentile: number
  landed_tips_95th_percentile: number
  landed_tips_99th_percentile: number
}

const [floor] = await call<TipFloor[]>('getTipFloor')
if (floor) console.log(`${floor.time}: median landed tip ${floor.landed_tips_50th_percentile} lamports`)
else console.log('no recent landing data')

On this page