# Rates


Use these operations to manage your rates.

| Operation | Method | Description |
| -- | -- | -- |
| [Get rates](/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/getrates)         | GET    | Gets a list of configured exchange rates. |
| [Create rate](/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/createrate)     | POST   | Creates an exchange rate for a specified currency pair. |
| [Get rate by ID](/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/getratebyid) | GET    | Gets a configured exchange rate by ID. |
| [Update rate](/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/updaterate)     | PUT    | Updates an existing exchange rate. |
| [Delete rate](/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/deleterate)     | DELETE | Deletes an exchange rate. Once deleted, an exchange rate cannot be accessed. |


## Get rates

 - [GET /config/rates](https://docs.ripple.com/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/getrates.md): Gets a list of configured exchange rates.

## Create rate

 - [POST /config/rates](https://docs.ripple.com/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/createrate.md): Creates an exchange rate for a specified currency pair.

Example - Applying a margin to the live FX rate:
A USD-GBP live FX rate of 0.80 is provided by a third-party rate provider and you want to reduce that rate by 20 BPS. In this API call, you would set "value_type": "MARGIN", then "margin_type": "BPS", and "rate": "20". After that, during the Get quotes call, the final FX rate will be calculated as 0.80*(1-(20/10000))=0.7984 and then applied during quote creation.

## Get rate by ID

 - [GET /config/rates/{rate_id}](https://docs.ripple.com/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/getratebyid.md): Gets a configured exchange rate by ID.

## Update rate

 - [PUT /config/rates/{rate_id}](https://docs.ripple.com/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/updaterate.md): Updates an existing exchange rate. With this call, you can change value_type from RATE to MARGIN (and vice versa), change the actual rate value of the specified value type, or both.

Example - Updating an existing margin applied to the live FX rate:
A USD-GBP live FX rate of 0.80 is provided by a third-party rate provider and you currently reduce that rate by 20 BPS. You now want to change it and reduce it by 10 BPS instead. To do so, set "rate": "10" in the request. Once the change is applied, the final FX rate is calculated as 0.80*(1-(10/10000))=0.7992 during the Get quotes call, and then applied during quote creation.

## Delete rate

 - [DELETE /config/rates/{rate_id}](https://docs.ripple.com/products/payments-odl/api-docs/ripplenet/reference/openapi/rates/deleterate.md): Deletes an exchange rate. Once deleted, an exchange rate cannot be accessed.

