GET /v1/fx/spread · Esencial or higher. Compares BCV with another market; it is not an exchange’s bid/ask spread.
Request
against is optional and defaults to parallel. base only accepts USD (the default). Do not compare against reference or eur_reference. Supports format and only the documented parameters.
Run these examples on your server. JavaScript and Python use the clients in the quickstart; configure COTIZAVE_API_KEY there.
Response
Illustrative response: figures and dates are not current quotes.absolute = compared.value - reference.value, rounded to 4 decimal places. percentage = absolute / reference.value × 100, calculated before rounding and returned with 2 decimal places. direction is higher, lower or equal; absolute can be negative.
Indicators and alerts
Display the spread with bothupdated_at values; sources have different update frequencies. To compare several markets in a UI, you can use one snapshot and apply the same formula to USD quotes.
Errors
The common errors for authentication, quota and availability also apply. API error responses are JSON; branch on
code, not on the text of message.