# Request a forward quote

Preview the Zcash deposit and gross token payout. The sample response is an expired testnet quote. Use the opening fee and address from your wallet’s own fresh quote when you fund a swap.

```text title="Endpoint"
POST /maker/v1/quote
```

## Examples

**cURL**

This example requests a disposable quote. Use your wallet’s own values for a swap you intend to accept.

```bash title="cURL"
curl -sS "https://api-testnet.veylor.cash/maker/v1/quote" \
  -H 'Content-Type: application/json' \
  --data '{
  "units": 5000000,
  "payout": "0x0000000000000000000000000000000000000001"
}'
```

**200 JSON**

```json title="HTTP 200"
{
  "quoteId": "0xa207a4067e7798fcd5fd9a711af5525904329914b56ab9f895e06bd50eb2595f",
  "maker": "0x2bac02b5032e9092493814c705f156b49e288922",
  "makerShare": "0x3eacf761db4497874deb6ce154a7427f9d1289311833cda4891269809bed010b001153dec672f6ccdf49345424a90afe319bfc6eb52c9c146613170be8e9cdd7",
  "makerProof": "0x14ef76a53a1ce9c2e39562f171d7bfbbebf77cc94d650f04f4d2eba344cb0807d2171b54c675cfae57256787bf27c6c6a681c8d3d3de9f6547b75603359eda3d",
  "chainId": 11155111,
  "contract": "0x62ce626c5a30528b8ee33145d491785082a6cf8a",
  "token": "0x64c4a5cb09fe0b706d4cf24dc0a45fff275d727c",
  "amount": "5000000",
  "depositZat": 696768,
  "expiresAt": 1795996377,
  "networkCost": "133969",
  "openFee": {
    "zat": 20000,
    "address": "utest1hly5nu0c9jq5gwrrthaflv3e2wvkh784ztf2u367uzddpjwytusuw30dx4r0thpyclr6es4tv376wvev4fgdx6ahz074lt2wegna2s7l"
  }
}
```

**400 JSON**

```json title="HTTP 400"
{
  "code": "rejected",
  "error": "1 units is outside the quotable range, 5000000 to 50000000"
}
```

## Request body

`object` · [ForwardQuoteRequest](https://docs.veylor.cash/api-types/#forwardquoterequest)

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `units` | `integer` · [Uint32](https://docs.veylor.cash/api-types/#uint32) | Required | Number of maker denominations to receive. On this testnet deployment 1000000 units is 1 tUSD. Request a quote to check the current size limits. |
| `payout` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Nonzero Ethereum account that authorizes the payout. For the account route, use the receiving signer. |
| `payoutNote` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) or `null` | *Optional* | Hash committing to the shield note for a RAILGUN payout. Omit for an account payout. |

## Responses

### HTTP 200

`object` · [ForwardQuote](https://docs.veylor.cash/api-types/#forwardquote)

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `quoteId` | `string` · [Hex32](https://docs.veylor.cash/api-types/#hex32) | Required | Identifier used in the acceptance URL. |
| `maker` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Maker's Ethereum address. |
| `makerShare` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Maker's public Pallas share, encoded as two 32-byte affine coordinates. |
| `makerProof` | `string` · [Hex64](https://docs.veylor.cash/api-types/#hex64) | Required | Proof that the maker knows its share. |
| `chainId` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | EIP-155 chain ID of the settlement network. |
| `contract` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the settlement contract. |
| `token` | `string` · [EthereumAddress](https://docs.veylor.cash/api-types/#ethereumaddress) | Required | Ethereum address of the escrow token. |
| `amount` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | Required | Gross escrow value in token base units. |
| `depositZat` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Zcash amount payable to the joint account, in zatoshis (100,000,000 per coin). |
| `expiresAt` | `integer` · [UnixSeconds](https://docs.veylor.cash/api-types/#unixseconds) | Required | Quote expiry in Unix seconds. |
| `networkCost` | `string` · [DecimalUint128](https://docs.veylor.cash/api-types/#decimaluint128) | *Optional* | Maker's estimated network cost already included in the quote, in token base units. |
| `openFee` | `object` · [OpenFee](https://docs.veylor.cash/api-types/#openfee) | *Optional* | A forward maker may require this separate Zcash payment before acceptance. |

**Fields of openFee**

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `zat` | `integer` · [Uint64](https://docs.veylor.cash/api-types/#uint64) | Required | Fee in zatoshis. |
| `address` | `string` | Required | Quote-specific unified address on the maker's Zcash network with an Orchard-only receiver. |

### Errors

| HTTP | Body | Meaning |
| --- | --- | --- |
| 400 | `object` · [ErrorResponse](https://docs.veylor.cash/api-types/#errorresponse) | Malformed request or a quote the maker rejected. For an out-of-range size the maker reports its current inclusive bounds in units. Other rejections have different reasons. |
| 413 | `object` · [ErrorResponse](https://docs.veylor.cash/api-types/#errorresponse) | The request exceeds the service’s body limit. |
| 415 | `object` · [ErrorResponse](https://docs.veylor.cash/api-types/#errorresponse) | Use Content-Type: application/json. |
| 422 | `object` · [ErrorResponse](https://docs.veylor.cash/api-types/#errorresponse) | The JSON fields or encoded values do not match the request type. |
| 503 | `object` · [ErrorResponse](https://docs.veylor.cash/api-types/#errorresponse) | Temporarily unavailable, throttled, or waiting for a chain event. Respect Retry-After when present. `Retry-After` — Seconds to wait before retrying, when supplied. |
| Other | `object` · [ErrorResponse](https://docs.veylor.cash/api-types/#errorresponse) | Other service error. Read code and error. |

**ErrorResponse fields**

| Field | JSON type | Presence | Meaning |
| --- | --- | --- | --- |
| `code` | `string` · [ErrorCode](https://docs.veylor.cash/api-types/#errorcode) | Required | Machine-readable service error code. |
| `error` | `string` | Required | Human-readable detail. |
