API reference
getTipAccounts and getBundleTipAccounts
Read the live set of accounts a transfer must reach to count as a SWQoS tip.
Both methods return the same list: the tip accounts SWQoS accepts right now, for transactions and bundles alike.
{"jsonrpc":"2.0","id":1,"method":"getTipAccounts"}Params
None. params, when present, is ignored.
Result
A JSON array of base58 account addresses.
{"jsonrpc":"2.0","result":["TIP_ACCOUNT_1","TIP_ACCOUNT_2","..."],"id":1}| Property | Behavior |
|---|---|
| Order | Any entry is valid. The starting entry can change; order does not indicate priority. |
| Membership | Only the returned addresses count as tip recipients. Membership can change. |
| Empty array | No tip account is available. Submissions return not_ready, waiting_for: tip_vaults. |
Do not hard-code the list. Refresh cached addresses before using them and after not_ready with tip_vaults, or a missing_tip whose found is lower than expected. See Tips for qualifying transfers.
Queries do not use your send rate. The agent also serves both methods locally.
Errors
| Reason | HTTP | Code | When |
|---|---|---|---|
unauthorized | 401 | -32000 | The key is missing, unknown or revoked. |
invalid_request | 200 | see codes | The body is not a valid JSON-RPC request. |
Examples
curl -sS "https://sol.zerocopy.sh" \
-H "x-api-key: $SWQOS_API_KEY" \
-H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"getTipAccounts"}'import { call } from './swqos.ts'
const accounts = await call<string[]>('getTipAccounts')
const tipAccount = accounts[Math.floor(Math.random() * accounts.length)]
if (!tipAccount) throw new Error('no tip account is live; retry shortly')
console.log(tipAccount)