Historical Rates for charts

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: Get Historical Rates

To get Historical Rates for charts request data via Websocket service.

JSON Message example without date filter (returns lattes data points):

{ 
   "messageType":4,
   "currencyPair":"EUR/HUF",
   "priceType":"Bid",
   "granularity":"S5"
}

JSON Message example with date filter:

{ 
   "messageType":4,
   "currencyPair":"EUR/USD",
   "priceType":"Ask",
   "granularity":"H4",
   "start":"2019-09-01T18:25:43.511Z",
   "end":"2019-09-18T18:25:43.511Z"
}

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

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

Request Body

Name
Type
Description

messageType

string

For Chart Data always 4

currencyPair

string

Currency Pair

priceType

string

Possible Values Bid or Ask

granularity

string

Possible Values M1 = 1 minute H1 = 1 hour H4 = 8 hours H8 = 8 hours H12 = 12 hours D = day W = week M = month

start

string

start date (optional)

end

string

end date (optional)

Last updated