# Packages endpoint

GET /packages returns every package on the account with its state. Available ones can be launched.

```
GET https://www.dextrending.net/api/v1/packages
```

Returns every package ever credited to the account, newest first. There is no pagination; accounts do
not accumulate enough packages to need it.

## Response

```
{
  "packages": [
    {
      "credit_id": 20,
      "package_id": "sol-24h",
      "package": "24 Hour Window",
      "hours": 24,
      "chain_group": "solana",
      "status": "available",
      "order_id": null,
      "bought_at": "2026-08-21T15:18:05+00:00",
      "used_at": null
    }
  ],
  "count": 1
}
```

## Fields

| Field | Type | Notes |
| ------------- | --------------- | ------------------------------------------------------ |
| `credit_id` | integer | The identifier you pass to `POST /campaigns` |
| `package_id` | string | `evm-12h`, `evm-24h`, `sol-12h` or `sol-24h` |
| `package` | string | Human-readable name, for example `24 Hour Window` |
| `hours` | integer | Hours on the trending list: 12 or 24 |
| `chain_group` | string | `solana` or `evm`. The campaign chain must match this. |
| `status` | string | `available` or `used` |
| `order_id` | integer or null | The campaign that consumed it, once used |
| `bought_at` | string | ISO 8601 UTC |
| `used_at` | string or null | ISO 8601 UTC, set when launched |

## Picking one to launch

Filter on `status` and match `chain_group` against the chain you intend to run
on. Launching a Solana package against an EVM pair returns a 400 without consuming it, but checking
first is cleaner.

```
const { packages } = await dt("/packages");

const ready = packages.find(
  p => p.status === "available" && p.chain_group === "solana"
);

if (!ready) throw new Error("No Solana package left");
```

## Notes

- Packages never expire, so `available` stays available indefinitely.

- `count` is the total returned, not a page size.

- Packages appear here the moment a payment confirms, which can be before you reload the panel.

## Questions

**How do I find a package I can launch?**

Filter the list for status "available" and a chain_group that matches the chain you want to run on.

**Do packages expire?**

No. An available package stays available until you spend it.

**Is the list paginated?**

No. Accounts do not hold enough packages for pagination to be useful, so the full list is returned.

