Creating a FOREX Spot Trade
Tip: To use the Temenos developer sandbox, you'll need an API key. To learn more, see the Sandbox Guide.
About this Guide
This guide explains how to create a Forex Spot Trade. It's made up of two parts:
- Trade Initiation
- Detail Retrieval
What is FOREX?
- It stands for 'foreign exchange' and includes foreign currency purchases by individuals at bank branches for vacations or other personal reasons.
- It also includes large volumes, exchanged between businesses and corporations and their respective banks.
- The largest component of the forex market, however, is the interbank market. The interbank market is an over-the-counter (OTC) market dominated by large financial institutions that buy and sell currencies among themselves.
You can use many instruments to trade and hedge foreign currencies such as FX Forwards, FX Swaps, Options and Futures. In this example, we examine how to create an FX Spot deal.
What is an FX or FOREX Spot deal?
A Foreign Exchange Spot Deal, also known as an FX Spot Trade, is an agreement between two parties to buy one currency against selling another currency at an agreed price for settlement on the spot date. The result is two payments, one in each currency, to the respective buying and selling counter-party. The spot date is the date of delivery. In most currencies, this occurs two days after the trade date (today).
FX Spot Trades are the most commonly traded instrument on the foreign exchange markets. Below you can see the overall process flow, which applies to a user-initiated trade, perhaps from a mobile app or web-based system.
This user guide is made up of two parts:
- Trade initiation
- Detail retrieval
Process Flow of a User-Initiated Trade
Quick-start Sample POST Payload
Create a basic payload providing just enough information to get Transact to create the trade.
Post a payload of instructions to the Transact application to begin the process.
Note: For a full list of the FOREX trade parameters, go to the 'Create Payment Order' section of the Payment Orders API.
Part One - Procedure: Creating a FOREX Spot Trade
1. Create a new POST API request with your preferred API project management tool.
For this procedure, we're using Postman.
2. Paste the https://api.temenos.com/api/v1.0.0/order/forexOrders endpoint URL into the new POST request.
3. Paste the sample code from the Quick Start – Sample Payload section above, changing the Body Type to 'Raw' and the Text Type to JSON.
4. Click Send.
A 200 OK Success Message will display, which returns a TRADE_ID as confirmation.
To request data on that TRADE_ ID refer to Retrieve Trade Details via API below.
Part Two - Procedure: Retrieve Trade Details via API
1. Create a new GET API request with your preferred API test tool.
For this example, we're using Postman and the Holdings Treasury Reports API.
2. Create a new Request in Postman, giving it a title (suggest holdings/reports/treasuryBlotter) then pasting the API endpoint URL into the address bar of your holdings/reports/treasuryBlotter request.
3. Insert the trade ID you created before into the header information of the API request, shown here:
Note: Check out the list below if you need some more sample IDs.
4. Click Send.
A 200 OK Success Message will display, which displays the details of the trade.
More examples of Spot FX Trades
API Used :
|FX Order API
|Get Blotter Report