Real Time Quotes

circle-check

For architecture overview check:

Oauth2 streaming workflowchevron-right

Step 1: Connect to websocket

Websocket URL is different for each sandbox environment.

circle-info

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]envelope

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:

circle-check

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

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

Simple HTML demo
circle-check
circle-exclamation

Step 3: Subscribe in Request For Stream mode

JSON Message example:

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