Quotes API for digital portals

Overview

The quotes API combines endpoints for retrieving security end-of-day, delayed, and realtime prices with performance key figures and basic reference data on the security and market level.

See the Time Series API for Digital Portals for direct access to price histories.

API Definition

swagger_file_format

API Documentation

SDK Library

Code Snippet

Quick search for a listing (text based)

The first JavaScript example uses the JavaScript Client Library to implement a text-based security search and display the response data.

const params = {
  searchValue: 'daimler',
  popularity : 1,
  nsins      : 'wkn',
  assetClass : 'stock',
  _attributes: [
    'id', 'instrument.id', 'instrument.name'
  ].join(','),
};

mdg2Client.requestEndpoint('GET', '/api/v1/notation/search/basic', params)
    .then(response => response.data)
    .then(responseData => {
      console.log(`Identifier of the notation: ${responseData[0].id},\n`,
          `Identifier of the instrument of the notation: ${responseData[0].instrument.id},\n`,
          `Asset class-unspecific name in English: ${responseData[0].instrument.name}`
      );
    })
    .catch(error => {
      console.warn('mdg2Client request failed: ', error);
    });


// Console output will be:
// Identifier of the notation: 161766,
//  Identifier of the instrument of the notation: 82840,
//  Asset class-unspecific name in English: DAIMLER AG ORD NPV(REGD) (CHF)
Fetching a price of a security at a given market

The next JavaScript example uses the JavaScript Client Library to fetch the latest price and the trading currency. The security is given by its ID_NOTATION - the listing-level identifier on FactSet's Wealth Management platform.

const params = {
  id: '161766',
    _attributes: [
      'latest.price', 'valueUnit.id'
    ].join(','),

};

mdg2Client.requestEndpoint('GET', '/api/v1/prices/get', params)
    .then(response => response.data)
    .then(responseData => {
      console.log(`Price value: ${responseData.latest.price},\n`,
          `Identifier of the valueUnit: ${responseData.valueUnit.id},`
      );

      mdg2Client.requestEndpoint('GET', '/api/v1/basic/valueUnit/get', {id: responseData.valueUnit.id})
          .then(response => response.data)
          .then(responseData => {
              console.log(`Name of the value unit: ${responseData.name}`);
          });
    })
    .catch(error => {
      console.warn('mdg2Client request failed: ', error);
    });

// Console output will be:
// Price value: 47.5,
//  Identifier of the valueUnit: 63,
// Name of the value unit: Euro
Quick search for a listing (text based)

The first JavaScript example uses the JavaScript Client Library to implement a text-based security search and display the response data.

const params = {
  searchValue: 'daimler',
  popularity : 1,
  nsins      : 'wkn',
  assetClass : 'stock',
  _attributes: [
    'id', 'instrument.id', 'instrument.name'
  ].join(','),
};

mdg2Client.requestEndpoint('GET', '/api/v1/notation/search/basic', params)
    .then(response => response.data)
    .then(responseData => {
      console.log(`Identifier of the notation: ${responseData[0].id},\n`,
          `Identifier of the instrument of the notation: ${responseData[0].instrument.id},\n`,
          `Asset class-unspecific name in English: ${responseData[0].instrument.name}`
      );
    })
    .catch(error => {
      console.warn('mdg2Client request failed: ', error);
    });


// Console output will be:
// Identifier of the notation: 161766,
//  Identifier of the instrument of the notation: 82840,
//  Asset class-unspecific name in English: DAIMLER AG ORD NPV(REGD) (CHF)
Fetching a price of a security at a given market

The next JavaScript example uses the JavaScript Client Library to fetch the latest price and the trading currency. The security is given by its ID_NOTATION - the listing-level identifier on FactSet's Wealth Management platform.

const params = {
  id: '161766',
    _attributes: [
      'latest.price', 'valueUnit.id'
    ].join(','),

};

mdg2Client.requestEndpoint('GET', '/api/v1/prices/get', params)
    .then(response => response.data)
    .then(responseData => {
      console.log(`Price value: ${responseData.latest.price},\n`,
          `Identifier of the valueUnit: ${responseData.valueUnit.id},`
      );

      mdg2Client.requestEndpoint('GET', '/api/v1/basic/valueUnit/get', {id: responseData.valueUnit.id})
          .then(response => response.data)
          .then(responseData => {
              console.log(`Name of the value unit: ${responseData.name}`);
          });
    })
    .catch(error => {
      console.warn('mdg2Client request failed: ', error);
    });

// Console output will be:
// Price value: 47.5,
//  Identifier of the valueUnit: 63,
// Name of the value unit: Euro
Quick search for a listing (text based)

The first JavaScript example uses the JavaScript Client Library to implement a text-based security search and display the response data.

const params = {
  searchValue: 'daimler',
  popularity : 1,
  nsins      : 'wkn',
  assetClass : 'stock',
  _attributes: [
    'id', 'instrument.id', 'instrument.name'
  ].join(','),
};

mdg2Client.requestEndpoint('GET', '/api/v1/notation/search/basic', params)
    .then(response => response.data)
    .then(responseData => {
      console.log(`Identifier of the notation: ${responseData[0].id},\n`,
          `Identifier of the instrument of the notation: ${responseData[0].instrument.id},\n`,
          `Asset class-unspecific name in English: ${responseData[0].instrument.name}`
      );
    })
    .catch(error => {
      console.warn('mdg2Client request failed: ', error);
    });


// Console output will be:
// Identifier of the notation: 161766,
//  Identifier of the instrument of the notation: 82840,
//  Asset class-unspecific name in English: DAIMLER AG ORD NPV(REGD) (CHF)
Fetching a price of a security at a given market

The next JavaScript example uses the JavaScript Client Library to fetch the latest price and the trading currency. The security is given by its ID_NOTATION - the listing-level identifier on FactSet's Wealth Management platform.

const params = {
  id: '161766',
    _attributes: [
      'latest.price', 'valueUnit.id'
    ].join(','),

};

mdg2Client.requestEndpoint('GET', '/api/v1/prices/get', params)
    .then(response => response.data)
    .then(responseData => {
      console.log(`Price value: ${responseData.latest.price},\n`,
          `Identifier of the valueUnit: ${responseData.valueUnit.id},`
      );

      mdg2Client.requestEndpoint('GET', '/api/v1/basic/valueUnit/get', {id: responseData.valueUnit.id})
          .then(response => response.data)
          .then(responseData => {
              console.log(`Name of the value unit: ${responseData.name}`);
          });
    })
    .catch(error => {
      console.warn('mdg2Client request failed: ', error);
    });

// Console output will be:
// Price value: 47.5,
//  Identifier of the valueUnit: 63,
// Name of the value unit: Euro

Change Logs