Skip to content

Get swap status

Read the maker’s progress for an accepted swap.

Endpoint
GET /maker/v1/reverse/swaps/{swapId}

Examples

Set SWAP_ID to the swapId returned by the maker.

cURL
curl -sS "https://api-testnet.veylor.cash/maker/v1/reverse/swaps/${SWAP_ID:?}"
HTTP 200
{
  "swapId": "0x0000000000000000000000000000000000000000000000000000000000000001",
  "phase": "awaitingFunding",
  "depositTxid": null,
  "readyDeadline": 1900000000,
  "refundAfter": 1900003600
}
HTTP 404
{
  "code": "unknownSwap",
  "error": "swap is unknown"
}

Request parameters

Name In Type Presence Meaning
swapId path string · Hex32 Required The swapId returned by acceptance.

Responses

HTTP 200

object · ReverseStatus

Field JSON type Presence Meaning
swapId string · Hex32 Required 32-byte escrow identifier.
phase string · ReversePhase Required Latest progress recorded by the maker.
depositTxid string or null Required Hex Zcash transaction ID with no 0x prefix, or null until the maker records a deposit.
readyDeadline integer · UnixSeconds Required Ready deadline (t0) in Unix seconds.
refundAfter integer · UnixSeconds Required Ready escrow refund boundary (t1) in Unix seconds.

Errors

HTTP Body Meaning
400 object · ErrorResponse Malformed input or a request rejected for this swap.
404 object · ErrorResponse The maker has no record of this swap ID.
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.