0Bit Documentation

Use pagination and filters

Page through documented list endpoints with bounded limits, stable filters, and support-safe exports.

List endpoints can differ by product surface. Use only the pagination and filter parameters documented for the operation you are calling. Do not assume every endpoint uses the same cursor, page, limit, skip, or status model.

Read the operation contract

Webhook delivery listing documents status, limit, and skip. Other list endpoints may use different parameters. Keep guide code generic unless the API reference names the fields.

0Pools trades feed uses cursor pagination

GET /pools/trades does not use the offset/page model shown here. It is cursor-based: pass ?cursor=<last transactId> and read nextCursor and hasMore from the response. Use ?limit (1–100, default 50) to bound each page, and filter with side, status, created_after, and created_before. See the 0Pools API reference for the field contract.

List loop

Generic page helper

async function listWebhookDeliveries(input: { status?: string }) {
  const rows = [];
  let skip = 0;
  const limit = 50;

  while (true) {
    const page = await productWebhooks.listDeliveries({
      status: input.status,
      limit,
      skip,
    });

    rows.push(...page.data);
    if (!page.has_more) break;
    skip += limit;
  }

  return rows;
}

Rules

RuleWhy
Keep limits bounded.Avoid heavy reads and rate limits.
Use documented filters only.Unknown filters can be ignored or rejected.
Store checkpoints for long jobs.Support exports should resume safely.
Redact exported rows.List results may include operational or customer-adjacent data.
Avoid polling tight loops.Back off and use webhooks where available.

On this page