# Quote

Endpoints for currency exchange quotes

## Get currency exchange quote

> Fetch latest exchange rates and calculate quote amount based on base currency, quote currency, and base amount.

```json
{"openapi":"3.0.3","info":{"title":"Madra Finance Quote API","version":"1.0.0"},"tags":[{"name":"Quote","description":"Endpoints for currency exchange quotes"}],"servers":[{"url":"https://platform.madra.finance","description":"Production environment"}],"paths":{"/api/trade/quote":{"post":{"tags":["Quote"],"summary":"Get currency exchange quote","description":"Fetch latest exchange rates and calculate quote amount based on base currency, quote currency, and base amount.","operationId":"getQuote","requestBody":{"description":"Input base currency, quote currency and base amount","required":true,"content":{"application/json":{"schema":{"type":"object","required":["baseCurrency","quoteCurrency","baseAmount"],"properties":{"baseCurrency":{"type":"string","description":"ISO currency code of the base currency"},"quoteCurrency":{"type":"string","description":"ISO currency code of the quote currency"},"baseAmount":{"type":"number","description":"Amount of base currency to convert"}}}}}},"responses":{"200":{"description":"Successful currency exchange quote","content":{"application/json":{"schema":{"type":"object","properties":{"baseCurrency":{"type":"string"},"quoteCurrency":{"type":"string"},"baseAmount":{"type":"number"},"quoteAmount":{"type":"string","description":"Calculated quote amount in quote currency, rounded to two decimals"},"exchangeRate":{"type":"string","description":"Exchange rate from base to quote currency, rounded to six decimals"},"transactionDetails":{"type":"object","properties":{"minimumReceived":{"type":"number","description":"Minimum amount expected to be received after slippage"},"slippage":{"type":"number","description":"Slippage percentage considered"}}}},"required":["baseCurrency","quoteCurrency","baseAmount","quoteAmount","exchangeRate","transactionDetails"]}}}},"400":{"description":"Invalid currency code supplied","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"500":{"description":"Internal server error or external API failure","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}
```
