Foreign Currency Exchange
Overview
The Foreign Exchange module provides the infrastructure to carry out currency exchanges on behalf of customers —a particularly important feature for platforms that accommodate multiple currencies. This module includes a series of endpoints tailored to the needs of users looking to perform, monitor, and manage asset exchanges for their customers.
Offering functions from quoting to execution, along with detailed tracking mechanisms, the Foreign Exchange module endpoints include:
Get Available Currency Pairs: Provides a full list of currency pairs available for exchange.
Get Account Details: This endpoint will return available source and destination accounts the customer can choose to do the exchange.
Get Quote for Exchange: Provides an estimate for an exchange, detailing the source and destination amount before the actual exchange is executed, ensuring that the customer is informed about the potential transaction.
Execute Exchange: Execute the quote exchange using the id received from the quote for exchange.
Overall, the Exchange module is designed to offer a seamless and secure experience for handling the exchange requirements of customers, ensuring that users can manage these operations effectively with great precision and control.
Get Available Currency Pairs
Provides a full list of asset pairs enabled for the API user. The response will also include information on limits and minimums associated with each asset pair for exchanges.
Endpoint:
/api/v1/customer/foreign-exchanges/pairs
Method:
GET
Success Response Example:
Get Account Details
Provides list of source and destination accounts based on the source and destination currency provided for the customer.
Endpoint:
/api/v1/customer/foreign-exchanges/account-details
Method:
GET
Success Response Example:
Get Quote for Exchange
This endpoint provides a quoted market price for a proposed asset exchange for a particular customer, detailing the source and destination amount for either a "Buy" or "Sell" exchange type. By specifying details of the desired trade, a customer can see the cost or proceeds they might expect from completing a transaction, including any applicable fees. This helps customers decide whether to proceed with an exchange based on real-time financial data.
Endpoint:
/api/v1/customer/foreign-exchanges/quote
Method: POST
Request Example:
Success Response Example:
Possible Error Codes
Execute Exchange
This endpoint is designed to initiate a sell exchange, allowing a customer to sell an asset at a given price or for a specific amount.
Endpoint:
/api/v1/customer/foreign-exchanges/executeexchange
Method:
POST
Request Body Example:
Success Response Example:
Possible Error Codes
Last updated