# Pagination / Throttling

### Pagination

There are variables for limit and page available on some Queries. This is because, in theory, this query could return multiple results. You would use these variables to loop through the pages of returned results.&#x20;

```graphql
{
  Orders(
    page: 1
    limit: 10
    created_at: "2025-02-03 00:00:00"
  ) {
    data {
      LineItems {
        id
        created_at
        Transaction {
            merchant_transaction_reference
        }
        Card {
            card_reference
            balance
            expiry_time
        }
      }
    }
  }
}
```

### Throttling

In order to protect our infrastructure, we throttle incoming API requests to prevent overloading. Every request made by your API user has a 'cost' which replenishes, and this threshold should be fairly high and is rarely hit for most use cases, although if you were looking to generate 10,000 cards via the API in bulk - you might hit the limit and it would be best to engage with our technical team.&#x20;

These limits can be configured on Toggles side, and can be increased or decreased. However, at the time of writing;

* 8000 maximum threshold
* 5000 replenish rate every 10mins

With the response on every request, you will get an updated amount of credits returned. If you notice that you are approaching 0 (`currentlyAvailable`) then we would suggest you back off for a short period - otherwise all requests will get rejected until more credits become available.

```json
    "extensions": {
        "cost": {
            "actualQueryCost": 16,
            "throttleStatus": {
                "maximumAvailable": 8000,
                "currentlyAvailable": 7986
            }
        }
    }
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.usetoggle.com/graphql/pagination-throttling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
