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.
Endpoint
POST /maker/v1/quote
Examples¶
This example requests a disposable quote. Use your wallet’s own values for a swap you intend to accept.
cURL
curl -sS "https://api-testnet.veylor.cash/maker/v1/quote" \
-H 'Content-Type: application/json' \
--data '{
"units": 1000000,
"payout": "0x0000000000000000000000000000000000000001"
}'
HTTP 200
{
"quoteId": "0xc23b099dfc1dcd33cdce8ba6ae5ef95cc0f93cdb2f2978b2d331e1d524a5c2c6",
"maker": "0x2bac02b5032e9092493814c705f156b49e288922",
"makerShare": "0x3c1fa8f04403fe16f3e8d3e5ed1416ef0b47df48e080d9987c43dab2075e47d9228603d1c4f138675b95e30610f7529453116e134664786a9fbdb3556dbbbe38",
"makerProof": "0x1f596afec98fe35ed210223ac18953f6a40db59e51eec70ddd8c0163307bf7bb2603b327b228d425246c6347f78f75b8ca3b3e18991305fae8221504d6c4241e",
"chainId": 11155111,
"contract": "0x62ce626c5a30528b8ee33145d491785082a6cf8a",
"token": "0x64c4a5cb09fe0b706d4cf24dc0a45fff275d727c",
"amount": "1000000",
"depositZat": 158186,
"expiresAt": 1795993989,
"networkCost": "129867",
"openFee": {
"zat": 20000,
"address": "utest1aqmefv584p6y0t96lurfhaepmk44hfyq2m7xvx73s7nqtns9f5f2k795zk5x2te5ntxg3myw5cs9x4uxd5rd4g808kx44dkgsqttfqhu"
}
}
Request body¶
object · ForwardQuoteRequest
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
units |
integer · Uint32 |
Required | Number of the maker's token denominations to receive. The maker publishes a deployment-specific cap. |
payout |
string · EthereumAddress |
Required | Nonzero Ethereum account that authorizes the payout. For the account route, use the receiving signer. |
payoutNote |
string · Hex32 or null |
Optional | Hash committing to the shield note for a RAILGUN payout. Omit for an account payout. |
Responses¶
HTTP 200¶
object · ForwardQuote
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
quoteId |
string · Hex32 |
Required | Identifier used in the acceptance URL. |
maker |
string · EthereumAddress |
Required | Maker's Ethereum address. |
makerShare |
string · Hex64 |
Required | Maker's public Pallas share, encoded as two 32-byte affine coordinates. |
makerProof |
string · Hex64 |
Required | Proof that the maker knows its share. |
chainId |
integer · Uint64 |
Required | EIP-155 chain ID of the settlement network. |
contract |
string · EthereumAddress |
Required | Ethereum address of the settlement contract. |
token |
string · EthereumAddress |
Required | Ethereum address of the escrow token. |
amount |
string · DecimalUint128 |
Required | Gross escrow value in token base units. |
depositZat |
integer · Uint64 |
Required | Zcash amount payable to the joint account, in zatoshis (100,000,000 per coin). |
expiresAt |
integer · UnixSeconds |
Required | Quote expiry in Unix seconds. |
networkCost |
string · DecimalUint128 |
Optional | Maker's estimated network cost already included in the quote, in token base units. |
openFee |
object · OpenFee |
Optional | A forward maker may require this separate Zcash payment before acceptance. |
Fields of openFee
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
zat |
integer · 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 |
Malformed input or a request rejected for this swap. |
| 413 | object · ErrorResponse |
The request exceeds the service’s body limit. |
| 415 | object · ErrorResponse |
Use Content-Type: application/json. |
| 422 | object · ErrorResponse |
The JSON fields or encoded values do not match the request type. |
| 503 | object · 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 |
Other service error. Read code and error. |
ErrorResponse fields
| Field | JSON type | Presence | Meaning |
|---|---|---|---|
code |
string · ErrorCode |
Required | Machine-readable service error code. |
error |
string |
Required | Human-readable detail. |