Bexs Gateway - Quote Flow
Reference Documents
| Reference | Document Location |
|---|---|
| Product Document | New Product Design Committee - EBO for Brazilian Clients |
| Bexs Gateway - RFC I | First RFC describing the overall architecture |
Problem Description
Quote creation and spread calculation have been managed by FX Suite and BOS, and in the current state, BRL exchanges are not available. To tackle that, Bexs Gateway has to provide a solution for quoting and estimated quote calculation that will enable FX operations for Brazilian companies.
Bexs is the liquidity provider with an exposed Digital FX API for registered partners which will allow BRL exchanges. The trade management will be handled by Bexs Gateway, although an integration solution for quoting is still pending.
With this document, we intend to describe quoting requirements of Bexs Gateway and the architectural decision of the integration component.
Background
Ebury has acquired Bexs in order to provide FX solutions to Brazilian companies. An RFC has been published containing a solution for trade management of Brazilian companies and the overall architecture of the service named Bexs Gateway.
To complement that work, there is a need for a quote management solution for trades with BRL, and this solution must include the integration with Bexs' REST API which provides such capabilities.
Bexs Gateway has to provide: - Estimated Quote of given currencies - Create/Accept/Reject quotes capabilities
Solution
Request for Quote via Liquidity Service
The new Liquidity Service is a framework that integrates liquidity providers to Ebury and is finally used by channels or other services for the quoting process. Any liquidity provider can be integrated into this system even if it's exposing REST services or FIX protocol.
Bexs Gateway (BGW) will request quotes from Bexs which provides on its side a REST API for all operations. This quoting mechanism can be integrated as a new client library that can be imported inside the Liquidity Service.
This new integration component will be responsible for handling quote requests, covering actions such as create, accept and reject, and finally integrating with Bexs’ API. It will also manage authentication/session for this integration.
While the Liquidity Service is unavailable, an MVP strategy should be followed to avoid blockages and enable the needed features in time. The MVP scope will be detailed in the next section.
MVP Scope
This is a transition phase and consists of the integration with Bexs for quote estimation requests and quote actions led by direct integration between Bexs Gateway and Bexs.
Thus, for displaying estimated quotes to users, EBO is going to communicate with Bexs Gateway, asking for the estimated quote information. With a Bexs API Client inside of Bexs Gateway, the system is going to request the estimated quote information from Bexs’ Digital FX API.
Similarly to the current process, BGW will request a quote from the Bexs API and reject it right away to prevent any further usage. Then, the estimated quote information given to EBO will be calculated inside the BGW.
Likewise estimated quotes, which are calculated and displayed to users, the quotes must be created in Bexs using its REST API services. The BGW may also use Bexs API Client, and send Create/Accept/Reject Quote requests to Bexs system directly. Thus, operates on trade actions without any intervention or intermediation, and stores all data on its local storage.
To achieve that, we must consider: - Bexs API Client implementation as an internal library of Ebury, so it will be used by Bexs Gateway and other services - Local implementation of quote management service named Trade Service (Local Liquidity Service) - Spread calculation logics to be implemented outside the BGW domain

Caveats
Whenever the Liquidity Service is available, the responsibility of handling quotes will be handed over to the liquidity domain, and the strategy to migrate such features shall be discussed at the proper moment.