Real Time Quotes

For architecture overview check:

Oauth2 streaming workflow

Step 1: Connect to websocket

Websocket URL is different for each sandbox environment.

Please do not use below server for any other purpose than initial phase. Below service does not contain any security rules and is created just to the purpose of this web-page. Please request your own sandbox environment via email to: [email protected]

To connect client needs a Key from Auth Server. Before Real-time delivery of FX rates FXWebAPI will validate this key with Auth Server.

Key is passed inside of "key" parameter in websocket URL

var uri = 'wss://demo.fxcib.com/api/WebSocket/Getees?key=123123123';
websocket = new WebSocket(uri);

websocket.onopen = function () {
    console.log("Connected");
    event.preventDefault();
}

After successful Oauth2 authentication user can subscribe to receive real time FX rates

Step 2: Subscribe in Streaming mode

To subscribe for particular currency pair, please send following message:

{ 
   "messageType":2,
   "pair":"EUR/USD"
}

To fully understand this service your you can use our debugging console: http://websocket.fxcib.com/

You can also check our very simple HTML demo: http://webstream.fxcib.com/

Simple HTML demo

Step 3: Subscribe in Request For Stream mode

JSON Message example:

{ 
   "messageType":1, 
   "pair":"EUR/USD", 
   "side":1,
   "amount":"2",
   "action":"1",
   "SettlementDate":"0c5b6754-492b-443b-9c45-b294ae0f8850"
}

OPTIONS wss://demo.fxcib.com/api/WebSocket/Getees?key=123123123/

Request Body

Name
Type
Description

messageType

string

For RFS always 1

pair

string

Currency Pair

side

number

1 = Buy, 2 = Sell

amount

string

trade amount

action

string

For RFS always 1

SettlementDate

object

SettlementDate in ddmmyyyy format ex. 21072022 would be 21st of July 2022

Last updated