Appearance
Get brokerage instruction quote
POST
/v2/brokerage/quote
Generate a new brokerage instruction quote.
This quote is not guaranteed but serves as an indicator of how the brokerage instruction will execute.
The brokerage instruction system automatically determines the necessary trades to convert from the pay currency to the receive currency, potentially using intermediate currency pairs. For example, converting ZAR to XRP might route as ZAR→USDT→XRP if no direct ZAR/XRP pair exists.
Important Notes
- The account on which the trade is performed can be specified using the HTTP header. Please see our Subaccounts section for more information. Not including the header will result in the order being placed against your main account.
- feeAccountId: This account cannot be the same as the account in which the simple order / simple swap is placed.
- feeCurrency: If the
feeCurrencymatches thepayCurrencythen the brokerage fee will be calculated from thepayAmountprior to the simple order being placed. If thefeeCurrencymatches thereceiveCurrencythen the brokerage fee will be calculated after the simple order / swap has completed and will be a percentage of the received amount.
Authorizations
apiKey
Your API key
Type
API Key (header: X-VALR-API-KEY)
apiSignature
HMAC SHA512 signature of the request (see Authentication section)
Type
API Key (header: X-VALR-SIGNATURE)
apiTimestamp
Request timestamp in milliseconds
Type
API Key (header: X-VALR-TIMESTAMP)
Request Body
application/json
JSON
{
"payAmount": "100",
"payCurrency": "ZAR",
"receiveCurrency": "XRP",
"feeRate": "0.01",
"feeCurrency": "XRP",
"feeAccountId": 1315586846625202200,
"customerOrderId": "brokerage-order-01"
}
Responses
Quote generated successfully
application/json
JSON
{
"requestPayAmount": "100",
"actualPayAmount": "100",
"payCurrency": "ZAR",
"receiveCurrency": "XRP",
"receiveAmount": "75",
"averagePrice": "1.3",
"leg1CurrencyPair": "USDTZAR",
"leg2CurrencyPair": "XRPUSDT",
"averagePriceInPayCurrency": "1.3",
"averagePriceInReceiveCurrency": "0.786",
"feeRate": "0.01",
"feeAmount": "0.75",
"feeCurrency": "XRP",
"feeAccountId": 1315586846625202200,
"customerOrderId": "brokerage-order-01",
"leg1TradeFeeAmount": "0.031413",
"leg1TradeFeeCurrency": "USDT",
"leg2TradeFeeAmount": "0.456",
"leg2TradeFeeCurrency": "XRP"
}