# Account

Credits used and remaining for your organisation, broken down by endpoint and key.

## Credits used and remaining

GET `/v1/usage` 

 Free Operation ID `account.usage`

Usage of the calling key's organisation over a UTC window, by key and endpoint. Defaults to the current billing period. Figures can trail live traffic by a few seconds.

### Query parameters

- `from` timestamp  
Start of the window, rounded down to the hour
- `to` timestamp  
End of the window, rounded up to the hour

### Response

- `data` object  

  - `creditsRemaining` integer or null  
  Credits left under the tightest limit right now, null when unlimited
  - `creditsUsed` integer
  - `from` timestamp
  - `keyId` string  
  The key making this call
  - `lines` array of objects  

    - `credits` integer
    - `keyId` string
    - `operationId` string
    - `requests` integer
  - `to` timestamp
- `meta` object  

  - `asOf` timestamp or null  
  The point in time this data describes, like when a filing was published. Null where that doesn't apply, as with account data
  - `credits` integer  
  Credits this call cost
  - `requestId` string

### Errors

`400` Bad Request`401` Unauthorized`402` Payment Required`403` Forbidden`422` Unprocessable Entity`429` Too Many Requests`500` Internal Server Error`503` Service Unavailable

Every error body is problem+json with a stable `code`. See [errors](https://quova.io/docs/index.md#errors).

```shell
curl "https://api.quova.io/v1/usage?from=2026-09-01T00:00:00Z&to=2026-09-01T01:00:00Z" \
  -H "Authorization: Bearer $QUOVA_API_KEY"
```

Response 

 200 OK 

```json
{
  "data": {
    "from": "2026-09-01T00:00:00Z",
    "to": "2026-09-01T01:00:00Z",
    "keyId": "key_34VnNEw7nejTxHjGSfO8B",
    "creditsUsed": 26,
    "creditsRemaining": 465983,
    "lines": [
      {
        "keyId": "key_34VILoAcw8KPgYm9abGg7",
        "operationId": "funds.profiles",
        "requests": 1,
        "credits": 1
      },
      {
        "keyId": "key_34VILoAcw8KPgYm9abGg7",
        "operationId": "screener.run",
        "requests": 1,
        "credits": 10
      },
      {
        "keyId": "key_34VILoN0VTKoIF0uzBZ7Y",
        "operationId": "income.dividends",
        "requests": 1,
        "credits": 2
      },
      {
        "keyId": "key_34VILoN0VTKoIF0uzBZ7Y",
        "operationId": "prices.daily",
        "requests": 1,
        "credits": 4
      },
      {
        "keyId": "key_34VILoN0VTKoIF0uzBZ7Y",
        "operationId": "prices.quotes",
        "requests": 1,
        "credits": 2
      },
      {
        "keyId": "key_34VILoVCAUQ9YdAt3Cenl",
        "operationId": "funds.profiles",
        "requests": 1,
        "credits": 4
      },
      {
        "keyId": "key_34VILoVCAUQ9YdAt3Cenl",
        "operationId": "prices.daily",
        "requests": 1,
        "credits": 1
      },
      {
        "keyId": "key_34VILoVCAUQ9YdAt3Cenl",
        "operationId": "prices.quotes",
        "requests": 1,
        "credits": 2
      }
    ]
  },
  "meta": {
    "credits": 0,
    "requestId": "req_34Voxwoy1MoMBaiedkbhv",
    "asOf": null
  }
}
```
