# Quote an offer

`POST /forwards/offers/check` · Lithos client API · Difficulty Forwards

Source: https://lithosprotocol.org/docs/api/check-df-offer

What creating an offer would lock and when it would expire, without sending anything. The same checks as `POST /forwards/offers`, and the conditions worth reading first as `warnings`.

## Request body

`DFOfferRequest`, application/json.

- `makerSide` (string, required, one of long, short): The side this wallet takes.
- `strike` (string, required): Difficulty the window's mean is measured against.
- `notional` (string, required): LIT base units. Each side's margin is a fifth of it.
- `windowStart` (integer · int32, required): First epoch of the window, 2 to 120 epochs after the current one.
- `windowLength` (integer · int32, required)
- `expiry` (integer · int32): Last height a fill can be mined at. Defaults to the last block of the current epoch.

## Responses

### 200: Quote for the offer

`DFOfferQuote`

- `makerSide` (string, required, one of long, short)
- `strike` (string, required)
- `notional` (string, required)
- `margin` (string, required)
- `windowStart` (integer · int32, required)
- `windowLength` (integer · int32, required)
- `windowEnd` (integer · int32, required)
- `expiry` (integer · int32, required)
- `expiresInBlocks` (integer · int32, required): Blocks after the next one until the offer expires.
- `lastFillHeight` (integer · int32, required)
- `lit` (string, required): LIT base units locked in the offer, the margin plus 7.5 LIT of rewards.
- `nanoErgs` (string, required): nanoERG locked in the offer.
- `networkFee` (string, required)
- `maxLoss` (string, required): The most this wallet can lose once the offer is filled, its margin plus 7.5 LIT.
- `impliedMove` (number · double)
- `impliedMoveNext` (number · double)
- `warnings` (string[], required)

### 400: Malformed body, or terms no fill accepts.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 422: No fill could reach the window, the notional is over the short-window limit, or no accumulator is deployed.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: Node unavailable. Retry.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### default: Error

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X POST "http://localhost:9000/forwards/offers/check" \
  -H "Content-Type: application/json" \
  -d '{ "makerSide": "long", "strike": "64000000000000", "notional": "10000000000000", "windowStart": 0, "windowLength": 1, "expiry": 0 }'
```

## Example response

```json
{
  "makerSide": "long",
  "strike": "string",
  "notional": "string",
  "margin": "string",
  "windowStart": 0,
  "windowLength": 0,
  "windowEnd": 0,
  "expiry": 0,
  "expiresInBlocks": 0,
  "lastFillHeight": 0,
  "lit": "string",
  "nanoErgs": "string",
  "networkFee": "string",
  "maxLoss": "string",
  "impliedMove": 0,
  "impliedMoveNext": 0,
  "warnings": [
    "string"
  ]
}
```
