Skip to content

Get spot rate by type and symbol

Request

Get real-time spot bid and offer rates by rate type and symbol. Returns an aggregated list of rates, which may include prices from multiple liquidity providers or external market data sources.

Security
SSO_TOKEN
Path
typestring, <= 32 charactersrequired

The type of rates requested: TOB=top of book, FULL=full book, RAW=raw rates

Default:"TOB"
Query
symbolstring, <= 35 charactersrequired

Base and term currency separated by a slash /.

Example:symbol=EUR/USD
JavaScript
const query = new URLSearchParams({symbol: 'EUR/USD'}).toString();

const type = 'YOUR_type_PARAMETER';
const resp = await fetch(
  `https://docs.fxinside.net/_mock/openapi/integral-api-reference/rest/v2/rates/spot/${type}?${query}`,
  {
    method: 'GET',
    headers: {
      SSO_TOKEN: 'YOUR_API_KEY_HERE'
    }
  }
);

const data = await resp.text();
console.log(data);

Responses

A spot rate object with one or more spot rates depending on the request.

Bodyapplication/json
One of:
symbolstring, <= 35 characters
bidnumber, (double)
offernumber, (double)
bidLimitnumber, (double)
offerLimitnumber, (double)
timeinteger, (int64)
rateIdstring, <= 255 characters
Response

type=TOB (spot rate object with top-of-book rates)

{ "symbol": "EUR/USD", "bid": 1.1863, "offer": 1.18638, "bidLimit": 1000000, "offerLimit": 1000000, "time": 1602536120080, "rateId": "2022-11-10-EURUSD-SPOT-435ef73249" }