Request a quote

Requests a firm, expiring TOC quote priced from `sellAmount` (the ZAR amount the client sells). The response includes the rate, fees, and the total ZAR debit (`totalDebitAmount = sellAmount + fee`). The quote is retrievable via `GET /v1/toc/quotes/{quoteId}`. Idempotency: **none** - clients may fire multiple requests for quotes.

Authentication

AuthorizationBearer
Token obtained via the login flow.

Request

This endpoint expects an object.
sellCurrencystringRequired

Currency the client sells (ISO 4217). Only ZAR is supported at present; unsupported values return 400.

buyCurrencystringRequired

Currency the client receives (ISO 4217).

sellAmountstringOptional

Positive decimal string in sellCurrency the client wishes to sell. Mutually exclusive with buyAmount.

buyAmountstringOptional

Positive decimal string in buyCurrency the client wishes to receive. Mutually exclusive with sellAmount.

Response

A firm TOC quote active until expiresAt.

quoteIdstring
statusenum
sellCurrencystring
buyCurrencystring
sellAmountstring
ZAR amount the client sells at the specified rate.
buyAmountstring

Amount in buyCurrency the client receives.

ratestring

Amount of buy currency received per unit of sell currency. 1 sellCurrency = <rate> buyCurrency.

feestring
Total fee in ZAR.
totalDebitAmountstring

Total ZAR debit. sellAmount + fee.

createdAtdatetime
expiresAtdatetime

Quote is active strictly before this time, expired thereafter and cannot be accepted.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error