# List contracts

The workspace's buying and selling contracts, newest first.

`GET https://api.goldmine.to/v1/contracts`

## Query parameters

- `limit` (integer, default 25, 1 to 100): How many to return, 1 to 100.
- `cursor` (string): The next_cursor of the previous page. Send the same other parameters with it.
- `type` (string, one of buying, selling): Only contracts of this type.
- `status` (string): Only contracts in these states, comma separated.
- `query` (string): Only contracts whose name, or an item they match, contains this text.

## Response (200)

- `data` (array<Contract>, required): This page, in the list's order.
  - `created_at` (string, required): When it was created.
  - `description` (string): The contract's description.
  - `evaluated_at` (string): When its targets were last worked out.
  - `id` (string, required): The contract's id.
  - `limits` (ContractLimits, required): The limits it trades within. An absent limit is no limit.
    - `most_owned_per_item` (integer): The most copies of one item the workspace may hold at once.
    - `purchases` (PurchaseLimit): The most purchases it may make in a rolling window.
      - `count` (integer, required): The most purchases in the window.
      - `window_seconds` (integer, required): The length of the rolling window, in seconds.
    - `spend` (SpendLimit): The most it may spend in a rolling window.
      - `amount` (Money, required): The most it may spend in the window.
        - `amount` (string, required): The amount as a decimal string, exact, with at least two decimal places.
        - `currency` (string, required): The ISO 4217 currency code.
      - `window_seconds` (integer, required): The length of the rolling window, in seconds.
  - `markets` (array<string>, required): The markets it trades on, by key, such as csfloat, dmarket and market-csgo.
  - `matched_items` (integer): Items its rules matched in its latest evaluation, priced or not.
  - `name` (string, required): The contract's name.
  - `prices_good_until` (string): When the prices behind its current targets stop holding.
  - `problems` (array<string>, required, one of evaluation_failed, holdings_unconfirmed, targets_outdated, unknown, unpriced_items): Conditions that need a look, empty when there are none.
  - `status` (string, required, one of off, on, starting, unknown): off: saved but not trading. starting: switched on, its first targets being worked out. on: trading.
  - `type` (string, required, one of buying, selling, unknown): Whether it buys or sells.
  - `unpriced_items` (integer): Of the matched items, those it could not price and so cannot trade.
  - `updated_at` (string, required): When its settings were last changed.
  - `version` (integer, required): Its settings version. Every saved change adds one.
- `has_more` (boolean, required): True when another page follows.
- `next_cursor` (string): The cursor of the next page. Absent on the last page.

Errors answer the error body described in the overview: https://goldmine.to/llms.mdx/docs/index.md

## Example request

```shell
curl "https://api.goldmine.to/v1/contracts?limit=25" \
  -H "Authorization: Bearer $CSTRADER_API_KEY"
```

## Example response

```json
{
  "data": [
    {
      "created_at": "2026-11-21T09:30:00Z",
      "description": "Field-Tested rifles the market sells below their price",
      "evaluated_at": "2026-11-21T09:30:00Z",
      "id": "ctr_0190f3c2a1b47c3d8e9f0a1b2c3d4e5f",
      "limits": {
        "most_owned_per_item": 2,
        "purchases": {
          "count": 20,
          "window_seconds": 86400
        },
        "spend": {
          "amount": {
            "amount": "12.34",
            "currency": "USD"
          },
          "window_seconds": 86400
        }
      },
      "markets": [
        "csfloat"
      ],
      "matched_items": 128,
      "name": "Rifles under 50",
      "prices_good_until": "2026-11-21T09:30:00Z",
      "problems": [],
      "status": "off",
      "type": "buying",
      "unpriced_items": 3,
      "updated_at": "2026-11-21T09:30:00Z",
      "version": 4
    }
  ],
  "has_more": true,
  "next_cursor": "eyJwIjoiY3RyXzAxOTBmM2MyIn0"
}
```
