openapi: 3.1.0 info: version: '' title: InstantFX Order description: > The FX orders API allows you to submit a request for standard orders, drawdowns, pre-orders (intent to pay), forecast, and refund orders. Both individual and multi-order requests are accepted. ### Web Sockets The response to this endpoint will be sent via web socket connection. Refer to the User Guide tab for more information on enabling a web socket connection. This allows you to integrate the responses you receive from Citi into your workflow for automated processing. Ensure that you have an open web socket session before sending any requests to consume the response. ### Trading Rules Please contact your Citi representative to obtain a list of currency pairs currently supported by Instant FX. #### Platform Operational Hours The Instant FX platform is available during standard FX market trading hours. The platform is not available during weekend hours. * Start of business is Monday 07:00 NZDT New Zealand/Auckland * End of business is Friday 17:00 EST New York servers: - url: https://api.citivelocity.com/markets description: production gateway URL - url: https://sandbox.api.citivelocity.com/markets description: sandbox URL security: - OAuth2: - fxapi paths: /fxgateway/async/instantfxorder/api/v1: post: parameters: - name: client_id in: query description: >- Your unique identifier shared during your API onboarding. It is the same client_id used for oauth token generation. required: true schema: type: string summary: Order request description: > Use this endpoint to request a rate for standard, drawdowns, pre-orders (intent to pay), forecast, and refund orders. Both individual and multi-order requests are accepted. requestBody: content: application/json: schema: $ref: '#/components/schemas/FXTradeRequest' required: true responses: '200': description: >- OK Acknowledged. Note: The orders response message will be sent via web socket. Please see the User Guide tab for more information on using the web socket connection. content: application/json: schema: $ref: '#/components/schemas/ExecutionReport' '401': description: Unauthorized user error '403': description: Access Forbidden error '500': description: Internal Server Error x-codeSamples: - lang: cURL label: cURL source: >- curl --request POST \ --url 'https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2' \ --header 'accept: application/json' \ --header 'authorization: Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ' \ --header 'content-type: application/json' \ --data '{ "action": "order-request", "senderCompId": "IFXCLIENT0", "onBehalfOfCompId": "IFXCLIENT0", "jsonReqId": "brs-25-09-2018-03", "sendingTime": "20180927-12:12:56.807", "deals": [ { "clOrdId": "st85589-27-09-2018-req4", "account": "XXXXXXXXXXX", "ccyPair": "EURUSD", "tenor": "SP", "valueDate": "", "dealtCcy": "EUR", "side": "B", "orderQty": "100","rateSetId": "142310", "ordType": "STANDARD" } ] }' - lang: python label: Python source: >- import http.client #If a proxy is used, set the tunnel as per below: #conn=http.client.HTTPSConnection("your_proxy_host",your_proxy_port) #conn.set_tunnel("api.citivelocity.com",443) conn = http.client.HTTPSConnection("api.citivelocity.com") payload = "{ \"action\": \"order-request\", \"senderCompId\": \"IFXCLIENT0\", \"onBehalfOfCompId\": \"IFXCLIENT0\", \"jsonReqId\": \"brs-25-09-2018-03\", \"sendingTime\": \"20180927-12:12:56.807\", \"deals\": [ { \"clOrdId\": \"st85589-27-09-2018-req4\", \"account\": \"XXXXXXXXXXX\", \"ccyPair\": \"EURUSD\", \"tenor\": \"SP\", \"valueDate\": \"\", \"dealtCcy\": \"EUR\", \"side\": \"B\", \"orderQty\": \"100\",\"rateSetId\": \"142310\", \"ordType\": \"STANDARD\" } ] }" headers = { 'content-type': "application/json", 'accept': "application/json", 'authorization': "Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ" } conn.request("POST", "/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) - lang: PHP label: PHP source: >- "https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2 ", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => " ", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "{ \"action\": \"order-request\", \"senderCompId\": \"IFXCLIENT0\", \"onBehalfOfCompId\": \"IFXCLIENT0\", \"jsonReqId\": \"brs-25-09-2018-03\", \"sendingTime\": \"20180927-12:12:56.807\", \"deals\": [ { \"clOrdId\": \"st85589-27-09-2018-req4\", \"account\": \"XXXXXXXXXXX\", \"ccyPair\": \"EURUSD\", \"tenor\": \"SP\", \"valueDate\": \"\", \"dealtCcy\": \"EUR\", \"side\": \"B\", \"orderQty\": \"100\",\"rateSetId\": \"142310\", \"ordType\": \"STANDARD\" } ] }", CURLOPT_HTTPHEADER => array( "accept: application/json", "authorization: Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ", "content-type: application/json", ), )); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; } - lang: JAVA label: Java source: |- /**Include following Maven dependency com.squareup.okhttp3 okhttp3 3.9.0 */ import java.io.IOException; import java.net.InetSocketAddress; import java.net.Proxy; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public class Main { public static void main(String[] args) { OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{ \"action\": \"order-request\", \"senderCompId\": \"IFXCLIENT0\", \"onBehalfOfCompId\": \"IFXCLIENT0\", \"jsonReqId\": \"brs-25-09-2018-03\", \"sendingTime\": \"20180927-12:12:56.807\", \"deals\": [ { \"clOrdId\": \"st85589-27-09-2018-req4\", \"account\": \"XXXXXXXXXXX\", \"ccyPair\": \"EURUSD\", \"tenor\": \"SP\", \"valueDate\": \"\", \"dealtCcy\": \"EUR\", \"side\": \"B\", \"orderQty\": \"100\",\"rateSetId\": \"142310\", \"ordType\": \"STANDARD\" } ] }"); Request request = new Request.Builder() .url("https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2") .post(body) .addHeader("content-type", "application/json") .addHeader("accept", "application/json") .addHeader("authorization", "Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ") .build(); try { Response response = client.newCall(request).execute(); } catch (IOException e) { e.printStackTrace(); } } } - lang: Javacript label: Node source: |2- // Install request by running "npm install --save request" var request = require("request"); var options = { method: 'POST', url: 'https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1', qs: { client_id: 'REPLACE_THIS_VALUE' }, headers: { authorization: 'Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ', accept: 'application/json', 'content-type': 'application/json' }, body: { "action": "order-request", "senderCompId": "IFXCLIENT0", "onBehalfOfCompId": "IFXCLIENT0", "jsonReqId": "brs-25-09-2018-03", "sendingTime": "20180927-12:12:56.807", "deals": [ { "clOrdId": "st85589-27-09-2018-req4", "account": "XXXXXXXXXXX", "ccyPair": "EURUSD", "tenor": "SP", "valueDate": "", "dealtCcy": "EUR", "side": "B", "orderQty": "100","rateSetId": "142310", "ordType": "STANDARD" } ] }, json: true }; request(options, function (error, response, body) { if (error) return console.error('Failed: %s', error.message); console.log('Success: ', body); }); - lang: Go label: Go source: >- package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2" payload := strings.NewReader("{ \"action\": \"order-request\", \"senderCompId\": \"IFXCLIENT0\", \"onBehalfOfCompId\": \"IFXCLIENT0\", \"jsonReqId\": \"brs-25-09-2018-03\", \"sendingTime\": \"20180927-12:12:56.807\", \"deals\": [ { \"clOrdId\": \"st85589-27-09-2018-req4\", \"account\": \"XXXXXXXXXXX\", \"ccyPair\": \"EURUSD\", \"tenor\": \"SP\", \"valueDate\": \"\", \"dealtCcy\": \"EUR\", \"side\": \"B\", \"orderQty\": \"100\",\"rateSetId\": \"142310\", \"ordType\": \"STANDARD\" } ] }") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("content-type", "application/json") req.Header.Add("accept", "application/json") req.Header.Add("authorization", "Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } - lang: Swift label: Swift source: >- import Foundation let headers = [ "content-type": "application/json", "authorization": "Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ", "accept": "application/json" var request = URLRequest(url: URL(string: "https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2")!, cachePolicy: .reloadIgnoringLocalAndRemoteCacheData, timeoutInterval: 10.0) let data: [String: Any] = ["action": "order-request", "senderCompId": "IFXCLIENT0", "onBehalfOfCompId": "IFXCLIENT0", "jsonReqId": "brs-25-09-2018-03", "sendingTime": "20180927-12:12:56.807", "deals": [ [ "clOrdId": "st85589-27-09-2018-req4", "account": "XXXXXXXXXXX", "ccyPair": "EURUSD", "tenor": "SP", "valueDate": "", "dealtCcy": "EUR", "side": "B", "orderQty": "100","rateSetId": "142310", "ordType": "STANDARD" ] ] ] let jsonData: Data do { jsonData = try JSONSerialization.data(withJSONObject: data, options: []) request.httpBody = jsonData } catch { print("Error: cannot create JSON from todo") } request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let task = session.dataTask(with: request, completionHandler: { (data, response, error) in guard let data = data, error == nil else { // check for fundamental networking error print("error=\(String(describing: error))") return } if let httpStatus = response as? HTTPURLResponse, httpStatus.statusCode != 200 { // check for http errors print("statusCode should be 200, but is \(httpStatus.statusCode)") print("response = \(String(describing: response))") } let responseString = String(data: data, encoding: .utf8) print("responseString = \(String(describing: responseString))") }) task.resume() - lang: R label: R source: >- ## install the packages httr,jsonlite library(httr) library(jsonlite) url<- 'https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2' req<- '{ "action": "order-request", "senderCompId": "IFXCLIENT0", "onBehalfOfCompId": "IFXCLIENT0", "jsonReqId": "brs-25-09-2018-03", "sendingTime": "20180927-12:12:56.807", "deals": [ { "clOrdId": "st85589-27-09-2018-req4", "account": "XXXXXXXXXXX", "ccyPair": "EURUSD", "tenor": "SP", "valueDate": "", "dealtCcy": "EUR", "side": "B", "orderQty": "100","rateSetId": "142310", "ordType": "STANDARD" } ] }' resp<- POST(url , body=req, add_headers("accept" = "applicaton/json","authorization" ="Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ", "content-type" = "application/json")) data<- (toJSON(content(resp, as = "parsed"))) prettify(data) - lang: Ruby label: Ruby source: >- require 'uri' require 'openssl' require 'net/http' url = URI("https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_PEER request = Net::HTTP::Post.new(url) request["content-type"] = 'application/json' request["accept"] = 'application/json' request["authorization"] = 'Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ' request.body = "{ \"action\": \"order-request\", \"senderCompId\": \"IFXCLIENT0\", \"onBehalfOfCompId\": \"IFXCLIENT0\", \"jsonReqId\": \"brs-25-09-2018-03\", \"sendingTime\": \"20180927-12:12:56.807\", \"deals\": [ { \"clOrdId\": \"st85589-27-09-2018-req4\", \"account\": \"XXXXXXXXXXX\", \"ccyPair\": \"EURUSD\", \"tenor\": \"SP\", \"valueDate\": \"\", \"dealtCcy\": \"EUR\", \"side\": \"B\", \"orderQty\": \"100\",\"rateSetId\": \"142310\", \"ordType\": \"STANDARD\" } ] }" response = http.request(request) puts response.read_body.force_encoding("utf-8") - lang: C# label: C# source: |- using System; using System.Collections.Generic; using System.Linq; using System.Text; using System; using System.Web; using System.Net; using System.IO; namespace ConsoleProgram { public class Class1 { private const string URL = "https://api.citivelocity.com/markets/fxgateway/async/instantfxorder/api/v1?client_id=da41c8aa-c96b-437c-ad95-dade40c85fa2"; private const string DATA = @"{ \"action\": \"order-request\", \"senderCompId\": \"IFXCLIENT0\", \"onBehalfOfCompId\": \"IFXCLIENT0\", \"jsonReqId\": \"brs-25-09-2018-03\", \"sendingTime\": \"20180927-12:12:56.807\", \"deals\": [ { \"clOrdId\": \"st85589-27-09-2018-req4\", \"account\": \"XXXXXXXXXXX\", \"ccyPair\": \"EURUSD\", \"tenor\": \"SP\", \"valueDate\": \"\", \"dealtCcy\": \"EUR\", \"side\": \"B\", \"orderQty\": \"100\",\"rateSetId\": \"142310\", \"ordType\": \"STANDARD\" } ] }"; static void Main(string[] args) { Class1.CreateObject(); } private static void CreateObject() { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URL); request.Method = "POST"; request.ContentType = "application/json"; request.ContentLength = DATA.Length; request.Headers["authorization"] = "Bearer AAIkZGE0MWM4YWEtYzk2Yi00MzdjLWFkOTUtZGFkZTQwYzg1ZmEy9q61Vj0ly6PHyTj84qbE5UaKGxf3fdz2ARY15Kszu-zf_SWLloRClpkg6aBQxG9I608HzrBB7FSV3DVJcyrpjsGtJx0rOfNEO_Sn708nqxQsBuPzn03YZ2OHi5Q0jLpLpvE-s5XoaAf74nLYKLHtnQ"; using (Stream webStream = request.GetRequestStream()) using (StreamWriter requestWriter = new StreamWriter(webStream, System.Text.Encoding.ASCII)) { requestWriter.Write(DATA); } try { WebResponse webResponse = request.GetResponse(); using (Stream webStream = webResponse.GetResponseStream() ?? Stream.Null) using (StreamReader responseReader = new StreamReader(webStream)) { string response = responseReader.ReadToEnd(); Console.Out.WriteLine(response); } }catch (Exception e) { Console.Out.WriteLine("-----------------"); Console.Out.WriteLine(e.Message); } } } } components: securitySchemes: OAuth2: type: oauth2 description: >- Citi Velocity APIs use the oAuth2 authentication scheme, which requires a bearer token to authenticate your API call. See the Citi Authentication API reference for information on requesting a token. flows: clientCredentials: scopes: fxapi: '' tokenUrl: https://api.citivelocity.com/markets/cv/api/fx/oauth2/token schemas: FXTradeRequest: type: object required: - action - jsonReqId - senderCompId - onBehalfOfCompId - sendingTime - deals properties: action: type: string description: 'The service you are requesting. Allowed values: order-request.' maxLength: 20 jsonReqId: type: string example: Req20181011776 description: >- The unique identifier that you assign in the JSON request. Must be alphanumeric. maxLength: 100 senderCompId: type: string description: >- The Citi-assigned value used to identify the message sender. May contain special characters ( ‘_’, ‘.’, ‘-‘). maxLength: 20 example: ClientName onBehalfOfCompId: type: string description: >- The Citi-assigned value used to identify the sub-entity. May contain special characters ( ‘_’, ‘.’, ‘-‘). maxLength: 20 example: ClientName sendingTime: type: string description: >- The time of the message transmission expressed in UTC (Universal Time Coordinated, also known as "GMT") in format YYYYMMDD-HH:MM:SS.mmm example: 20180820-04:48:29.125 deals: type: array items: required: - account - clOrdId - tenor - dealtCcy - ccyPair - side - orderQty - rateSetId - ordType properties: account: type: string description: >- Your Citi-assigned client identifier. This may contain special characters ( ‘_’, ‘.’, ‘-‘). maxLength: 50 example: '109430258' clOrdId: type: string description: >- The unique identifier of the order that you assign. It should be a reference specific to the client/request combination. maxLength: 64 example: TEST12345 tenor: type: string description: "The following FX standard tenors are supported:\n\n|Tenor |\tValue|\n| ----- | ------------|\n|Overnight\t| ON\t|\n|Tom/Next | TN\t|\n|Spot |SP\t|\n|Spot/Next |SN\t|\n|One Week |1W\t|\n|Two Week |2W\t|\n|Three Week |3W\t|\n|One Month |1M\t|\n|Two Month |2M\t|\n|Three Month |3M\t|\n|Four Month |4M\t|\n|Five Month |5M\t|\n|Six Month |6M\t|\n|Seven Month |7M\t|\n|Eight Month |8M\t|\n|Nine Month |9M\t|\n|Ten Month |10M\t|\n|Eleven Month |11M\t|\n|One Year |1Y\t|\n|Fifteen Months |15M\t|\n|Eighteen Months |18M\t|\n|Twenty One Months |21M\t|\n|Two Years |2Y\t|\n|Specify a Broken Date| BROKEN |\n\nIf providing a Broken Date, i.e. a Value Date is specified, the Tenor must be populated with ‘BROKEN’." maxLength: 10 example: SP valueDate: type: string format: date description: >- The value date the order is being placed for. Only required if tenor=’BROKEN’. Format: yyyy-MM-dd. example: '2011-05-05' dealtCcy: type: string description: >- The Currency that you wish to deal on. Please contact your Citi representative to obtain a list supported currency pairs. maxLength: 3 example: GBP ccyPair: type: string description: >- The Currency Pair that you are dealing on. Please discuss with your Citi Representative on your preference of sending the value of currency pair in either BaseTerm format or alphabetic sort order. maxLength: 6 example: GBPUSD side: type: string enum: - B - S description: >- The Buy Or Sell indicator from your perspective. B=Client buys dealt ccy S=Client sells dealt ccy. example: B orderQty: type: number format: double description: The Order quantity of the dealt currency. example: 100000 customTenorUnit: type: integer description: >- The tenor unit to be used when booking a trade with a Tenor type of T. Current supported values are 1, 3, 5. Field Type: Integer. example: 1 clientData: type: string description: > Optional. This field will take a string value and whatever you send in it will be sent back to you as we received it. This field value will be available in the final report. Key1:Value1|Key2:Value2|Key3:Value maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData2: type: string description: > Optional. This field will take a string value and whatever you send in it will be sent back to you as we received it. This field may be available in the final report. Key1:Value1|Key2:Value2|Key3:Value maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData3: type: string description: > Optional. This field will take a string value and whatever you send in it will be sent back to you as we received it. Key1:Value1|Key2:Value2|Key3:Value" example: Amount:1234|onBehalfOf:ClientB maxLength: 30 clientData4: type: string description: > Optional. This field will take a string value and whatever you send in it will be sent back to you as we received it. Key1:Value1|Key2:Value2|Key3:Value" maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData5: type: string description: > Optional. This field will take a string value and whatever you send in it will be sent back to you as we received it. .Key1:Value1|Key2:Value2|Key3:Value" maxLength: 30 example: Amount:1234|onBehalfOf:ClientB rateSetId: type: integer format: int32 description: >- Required for all InstantFX destined orders and should contain the IFX RateSetID as the value. example: 417323 ordType: type: string description: 'The Order type. Should be one of the following values:' enum: - STANDARD - PRE - DRAWDOWN - REFUND - FORECAST - STAGING example: STANDARD maxLength: 15 origClOrdId: type: string format: int64 description: >- Conditional field. Mandatory if ordType =”REFUND”. Send the value received in the “orderId” field of the standard order response published by Citi. example: '12345' udc1: type: string description: >- Optional field for the purpose code defined for your branch if a purpose code is mandatory as per regulation. maxLength: 1 example: '3' udc2: type: string description: >- Optional field for the purpose code defined for your branch if a purpose code is mandatory as per regulation. maxLength: 1 example: '2' udc3: type: string description: >- Optional field for the purpose code defined for your branch if a purpose code is mandatory as per regulation. maxLength: 1 example: '1' example: action: order-request senderCompId: IFXCLIENT0 onBehalfOfCompId: IFXCLIENT0 jsonReqId: brs-25-09-2018-03 sendingTime: 20180927-12:12:56.807 deals: - clOrdId: test1134-27-09-2018-req4 account: XXXXXXXXXXX ccyPair: EURUSD tenor: SP dealtCcy: EUR side: B orderQty: 100 rateSetId: 142310 ordType: STANDARD ExecutionReport: description: >- Note: The order response message will be published via web socket. Please see the User Guide tab for more information on using the web socket connection. type: object required: - action - jsonReqId - senderCompId - onBehalfOfCompId - sendingTime properties: action: type: string description: Defines the action of the message. Value will be order-response. maxLength: 20 example: order-response jsonReqId: type: string description: The unique identifier for the JSON request. Format is alphanumeric. maxLength: 100 example: Req20181011776 senderCompId: type: string description: >- The Citi-assigned value used to identify the firm sending the message. maxLength: 20 example: clientname onBehalfOfCompId: type: string description: >- The Citi-assigned value used to identify the sub-entity. May contain special characters ( ‘_’, ‘.’, ‘-‘). maxLength: 20 example: clientname sendingTime: type: string description: > "The time of message transmission. Always expressed in UTC (Universal Time Coordinated, also known as "GMT") in format: YYYYMMDD-HH:MM:SS.mmm." example: 20180820-04:48:31.155 errorCode: type: integer description: >- The error code associated with the response. See the Error Codes tab for a complete list. example: 99 errorMessage: type: string description: >- The error message associated with the response. See the Error Codes tab for a complete list. example: unable to process your request dealResponses: type: array items: required: - clOrdId - account - orderId - ordStatus - ccyPair - tenor - dealtCcy - side - orderQty - rateSetId - counterCcy - contAmtValue - lastSpotRate - lastForwardPoints - outrightRate - rejectCode - citiMergedOrder - customTenorUnit - ordType - isBookedWithMktRate - isBookedWithMRF - mrfPercentage - mrfComparisionRate - mrfVariance properties: clOrdId: type: string description: The unique identifier of the order that you assigned. maxLength: 64 example: '22136' account: type: string description: >- Your account ID. May contain special characters ( ‘_’, ‘.’, ‘-‘). maxLength: 50 example: ABC123 orderId: type: string format: int64 description: The Citi-assigned Order reference. example: '123456' ordStatus: type: string maxLength: 15 enum: - BOOKED - MERGED - PENDING - ACCEPTED - REJECTED description: > Status description: - PENDING: For InstantFX credit check failed orders/late orders/refund tolerance failed orders. - MERGED: Applicable only to ‘Net & Merge’ InstantFX clients; where two or more orders are for the same ccy pair and value date are merged to create a single, netted Order and the original, contributing orders will be flagged as ‘Merged’ orders with a cross reference to the Citi created order. - BOOKED: Order is booked. - ACCEPTED: Applicable only for pre-orders (intent to pay). - REJECTED: Order request rejected. example: BOOKED ccyPair: type: string description: >- The currency pair that you are trading on. Please discuss your preference of sending the value of currency pair in either BaseTerm format or alphabetic sort order with your Citi Representative. maxLength: 6 example: GBPUSD tenor: type: string description: The Tenor the order is being placed for. maxLength: 10 example: BROKEN valueDate: type: string format: date description: 'The value date of the order in format: yyyy-MM-dd' example: '2012-11-15' dealtCcy: type: string description: The currency for which you supplied the dealt amount. maxLength: 3 example: USD side: type: string description: >- Indicates whether you are buying (B) or selling (S) the dealt ccy. enum: - B - S example: S orderQty: type: string format: double description: The dealt ccy amount example: '1000' rateSetId: type: integer description: >- If the rating method was IFX, this is the Rate Set Id used in the rating of the order. For Live Rates orders, this will be set to zero. In case of a Refund order, it is the rate set Id previously used to book original order. example: 41319 counterCcy: type: string description: The counter ccy of the ccy pair, not the dealt ccy. example: GBP maxLength: 3 contAmtValue: type: string format: double description: The calculated counter ccy amount. example: '6543.65' lastSpotRate: type: string format: double description: The spot rate applied to the order. example: '1.5282' lastForwardPoints: type: string format: double description: >- The forward points applied to the order. Will be zero for spot transactions. example: '0' outrightRate: type: string format: double description: The outright (spot and fwd points) rate applied to the Order. example: '1.5282' rejectCode: type: integer description: The reject code if order status = ‘REJECTED’ (rejected). example: 99 rejectReason: type: string description: >- The reason for rejection if order status = ‘REJECTED’’ (rejected). maxLength: 250 citiMergedOrder: type: boolean description: >- Indicates whether this is a merged order created by Citi. Only applicable to ‘Net & Merge’ clients. clOrdLinkId: type: string format: int64 description: > The Citi-assigned Merged Order reference. This is applicable only to ‘Net & Merge’ InstantFX clients; where two or more orders are for the same ccy pair and value date, will be merged to create a single, netted Order and the original, contributing orders will be flagged as ‘Merged’ orders with a cross reference to the Citi created order. fixingDate: type: string format: date description: >- Optional field relating to NDF trades only. The fixing date of the NDF Order in format: yyyy-MM-dd example: '2012-11-12' customTenorUnit: type: integer description: >- The tenor unit to be used when booking a trade with a Tenor type of T. Current supported values are 1, 3, 5. example: 1 clientData: type: string description: Contains the value that was sent in the original request. maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData2: type: string description: Contains the value that was sent in the original request. maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData3: type: string description: Contains the value that was sent in the original request. maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData4: type: string description: Contains the value that was sent in the original request. maxLength: 30 example: Amount:1234|onBehalfOf:ClientB clientData5: type: string description: Contains the value that was sent in the original request. maxLength: 30 example: Amount:1234|onBehalfOf:ClientB origClOrdId: type: string format: int64 description: >- Conditional field. Mandatory for ordType =”REFUND”. The value received in the “orderId” field of the standard order response published by Citi. example: '123456' ordType: description: The order type. Will be one of the following values type: string maxLength: 15 enum: - STANDARD - REFUND - PRE - DRAWDOWN - FORECAST - STAGING example: STANDARD isBookedWithMRF: type: boolean description: >- This flag will be set if the order is booked with an adjusted rate. Note: Deals will be booked with an adjusted rate whenever MRF happens if you opted for it. isBookedWithMktRate: type: boolean description: Flag to indicate if the order is booked on market rate mrfId: type: string fomrat: int32 description: >- Conditional field. The reference number for the adjusted rate if isBookedWithMRF =”TRUE”. example: '9123' mrfPercentage: type: string format: double description: Percentage that is used to adjust the rate. example: '3.54' mrfComparisionRate: type: string format: double description: Rate at which Citi compared in market while order booking. example: '1.5982' mrfVariance: type: string format: double description: The variance between rate set rate and current market rate. example: '4.58' udc1: type: string description: The purpose code received in the order request. example: '3' udc2: type: string description: Purpose code received in the order request. example: '2' udc3: type: string description: Purpose code received in the order request. example: '1' backOffRef: type: string description: >- Back office settlement reference number for booked orders. Value will be null in the order response. The value can be obtained through a report request for the booked order. Please contact your Citi Representative to request the report. maxLength: 60 example: 1054T31966 uniqueTradeIdentifier: type: string description: >- UTI value for booked orders. This value will be null in the order response. The value can be obtained through Report request for the booked order. Please contact your Citi Representative to request the report. example: '1.0308657177112268e+21' example: action: order-response jsonReqId: brs-25-09-2018-03 senderCompId: IFXCLIENT0 onBehalfOfCompId: IFXCLIENT0 sendingTime: 20180927-08:16:39.905 dealResponses: - clOrdId: test1134-27-09-2018-req52 account: XXXXXXXXXXX orderId: '2755429' ordStatus: BOOKED ccyPair: EURGBP tenor: BROKEN valueDate: '2018-10-05' dealtCcy: EUR side: B orderQty: '100' rateSetId: 142314 counterCcy: GBP contAmtValue: '89.52' lastSpotRate: '0.89516' lastForwardPoints: '0' outrightRate: '0.89516' rejectCode: 0 citiMergedOrder: false fixingDate: '2018-10-25' customTenorUnit: 0 ordType: STANDARD isBookedWithMktRate: false isBookedWithMRF: false mrfPercentage: '0' mrfComparisionRate: '0' mrfVariance: '0' backOffRef: '' uniqueTradeIdentifier: '' - clOrdId: test1134-27-09-2018-req51 account: XXXXXXXXXXX orderId: '2755432' ordStatus: BOOKED ccyPair: EURUSD tenor: SP valueDate: '2018-10-01' dealtCcy: EUR side: B orderQty: '100' rateSetId: 142314 counterCcy: USD contAmtValue: '117.5' lastSpotRate: '1.175' lastForwardPoints: '0' outrightRate: '1.175' rejectCode: 0 citiMergedOrder: false fixingDate: '2018-10-25' customTenorUnit: 0 ordType: STANDARD isBookedWithMktRate: false isBookedWithMRF: false mrfPercentage: '0' mrfComparisionRate: '0' mrfVariance: '0' backOffRef: '' uniqueTradeIdentifier: '' tags: []