NGM Data API

Version:
6.0.0

General

Authentication

Every request must authenticate with an API key sent as HTTP Basic Auth in the Authorization header:

curl -u username:password "https://mdapi.ngm.se/search.xml"

Alternatively, an OIDC bearer token can be sent as Authorization: Bearer <token>.

Data format selection

Endpoints that support multiple output formats select the format via the Accept header, e.g.:

curl -u username:password -H "Accept: application/json" "https://mdapi.ngm.se/tabular/example-eod-prices?fromDate=2026-08-01&toDate=2026-08-10"

Recognized media types are:

Parameter types

Query parameters across the API (both search.xml and tabular) are one of the following types:

TypeFormat
StringFree text.
IntegerWhole number.
FloatBinary floating-point number.
DecimalDecimal number.
BooleanLowercase true or false.
DateRFC 3339 full-date, e.g. 2026-07-28.
DateTimeRFC 3339 date-time, up to nanosecond precision, e.g. 2026-07-28T14:23:01.000.
TimeRFC 3339 partial-time, up to nanosecond precision, e.g. 14:23:01.000.

Repeatable (or array) query parameters may be specified multiple times (e.g. ?show=list&show=trades) or be separated by the pipe character (e.g. ?show=list|trades)

Responses

StatusDescription
200Successful request; body streamed in the resolved format.
400Invalid parameter value or missing required parameter.
401No credentials supplied, or the supplied credentials are invalid.
403The product has not been purchased.
404The endpoint or product does not exist.
429The product's request-limit throttle was exceeded.
500Internal error. Contact NGM Support if the error persists.

MDAPI Search

Searches for markets and instruments, optionally including trades, closing data, level data, and other instrument or market segment detail.

Supported response formats are XML (default) and JSON. The format selection may also be done with a suffix (.xml or .json), which takes precedence over the Accept header. For backwards compatibility reasons the format may also be done with the format query parameter, which takes precedence over the other methods, e.g. /search.xml?format=json is served as JSON.

Request

GETsearch

GETsearch.{format}

Authentication

In addition to the standard Basic Auth / bearer token authentication described above this endpoint also accepts the username and password as the user and password query parameters. This method is deprecated and only available for backwards compatibility reasons. The Authorization header takes precedence.

Parameters

NameTypeRequiredDescription
productStringNoThe productCode of the purchased product to serve the request with, selecting which product's request limit applies. If omitted, the smallest purchased product covering the request is selected automatically. The requested show, mktSegm, and instrumentState must be within the named product's scope, otherwise the request is rejected; and when no mktSegm is given the search is scoped to the named product's markets.
showString (repeatable)No (default: list)Which instrument/market segment data to include: list (default), levelData, closingDatas, instrumentDetail, trades, listingInfo, corporateActions, turnoverSummary. See Response data below.
mktSegmString MIC:Segment (repeatable)NoA market segment to search instead of the default (entitled) markets. The specified markets must still be a subset of the entitled markets.
symbolString (repeatable)NoInstrument symbol(s) to include in the search result.
isinString (repeatable)NoInstrument ISIN code(s) to include in the search result. Takes priority over symbol when both are specified. If used together with instrumentState, instrumentState must correctly reflect whether the instrument is listed or delisted, otherwise an error is returned.
instrumentStateStringNo (default: listed)listed or delisted. If delisted then either delistDate or isin is required.
delistDateDateApplicable and conditionally required when instrumentState=delistedExact date of delisting.
knockedStringNo (default: both)yes, no, or both. Applies to both listed and delisted instruments.
fromTimeDateTimeNo (default: today 00:00)Lower bound of the time range for trades or closingDatas results.
toTimeDateTimeNo (default: now)Upper bound of the time range for trades or closingDatas results.
sortDirectionStringNo (default: ASC)Sorts market segments and instruments in natural order, ASC or DESC.
skipEmptyBooleanNo (default: false)If true, empty instrument nodes (e.g. instruments without trades) are omitted from the result.
rawPricesBooleanNo (default: false)If true, prices/turnovers/etc. are formatted as raw integers with 3 implicit decimals (e.g. 1234 instead of 1.234), "to avoid loss of precision". Deprecated since the original values are actually loss-less JSON numbers (depending on how they are parsed), while the integers with 3 fixed decimals may be lossy when the real value has more decimals.
instrumentWildcardStringNoMatches the instrument's name or symbol. Uses exactly two wildcard characters, applied across the whole value: % matches zero or more characters, and _ matches exactly one character.
formatStringNoXML or JSON. Takes precedence over both the path's .xml/.json suffix and the Accept header. Deprecated.

Response data

For instruments, the result always includes the public ID, name, symbol, and ISIN code; for market segments, the MIC, segment ID, and name. Additional data is requested via the show parameter:

Response schema

The result's XML data model is defined by:

JSON format

When format=json, the XML result is converted to JSON as follows:

Examples

  1. Fetch an instrument's current level data
    curl -u username:password "https://mdapi.ngm.se/search.xml?symbol=testInstrumentRights1&show=levelData"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" time="2017-03-03T17:44:08.547+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNKO" name="Knock-Outs NO">
                            <Instrument id="1890" isin="DE000CK69S77" name="B LONGDAX AJ CZK" symbol="testInstrumentRights1">
                                    <LevelData buyPrice="10.62" buyQuantity="300000" diffPercent="0.453" diffPrice="0.46" previousClosingPrice="8.31" sellPrice="10.63" sellQuantity="300000" status="OPEN" turnover="0" volume="0"/>
                            </Instrument>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        
  2. Fetch all instruments in the NGM Equity market segment
    curl -u username:password "https://mdapi.ngm.se/search.xml?mktSegm=XNGM:NDXN"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-06T09:57:50.411+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNCE" name="Certificates NO">
                            <Instrument id="18LN" isin="DE000CZ354Y9" name="BEAR AKSO X3 CZ" symbol="BEAR AKSO X3 CZ"/>
                            <Instrument id="12JR" isin="DE000CZ351R9" name="BEAR AMAZ X3 CZ" symbol="BEAR AMAZ X3 CZ"/>
                    </MarketSegment>
                    <MarketSegment marketId="XNGM" segmentId="DNEX" name="Exotics NO"/>
            </MarketSegment>
    </ExchangeData>
                                        
  3. Fetch an instrument's trades for a certain time interval
    curl -u username:password "https://mdapi.ngm.se/search.xml?symbol=testInstrumentRights1&show=trades&fromTime=2013-03-05&toTime=2013-03-05T09:30:00"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" tradeCount="-1" time="2017-03-06T10:01:27.157+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNKO" name="Knock-Outs NO">
                            <Instrument id="1890" isin="DE000CK69S77" name="B LONGDAX AJ CZK" symbol="testInstrumentRights1">
                                    <Trades fromTime="2013-03-05T00:00:00+01:00" toTime="2013-03-05T09:30:00+01:00"/>
                            </Instrument>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        
  4. Fetch an instrument's description information
    curl -u username:password "https://mdapi.ngm.se/search.xml?symbol=testInstrumentRights1&show=instrumentDetail"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" time="2017-03-06T10:04:13.092+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNKO" name="Knock-Outs NO">
                            <Instrument id="1890" isin="DE000CK69S77" name="B LONGDAX AJ CZK" symbol="testInstrumentRights1">
                                    <InstrumentDetail>
                                            <MinTradeVol>1</MinTradeVol>
                                            <RoundLot>1</RoundLot>
                                            <Currency>EUR</Currency>
                                            <PriceType>PerUnit</PriceType>
                                            <TickRules>0.01:0.01:0.99,1:0.1:9.9,10:1:99,100:5:995,1000:100:inf</TickRules>
                                    </InstrumentDetail>
                            </Instrument>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        
  5. Fetch instruments that are delisted because of a knock out on a specific date
    curl -u username:password "https://mdapi.ngm.se/search.xml?instrumentState=delisted&knocked=yes&delistDate=2014-05-22"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-16T10:05:33.25+01:00">
        <MarketSegment marketId="XNGM" segmentId="NDXF" name="NDX Finland">
        <MarketSegment marketId="XNGM" segmentId="DFKO" name="Knock-Outs FI">
            <Instrument id="1Y0D" isin="DE000CZ6JKN6" name="B SHRTNDX BL CZB" symbol="B SHRTNDX BL CZB"/>
            <Instrument id="1XDC" isin="DE000CZ6JAL1" name="B SHRTNOK FJ CZB" symbol="B SHRTNOK FJ CZB"/>
        </MarketSegment>
        </MarketSegment>
    </ExchangeData>
                                        
  6. Fetch instruments that are still listed but have financial status knock out, with listing info
    curl -u username:password "https://mdapi.ngm.se/search.xml?instrumentState=listed&knocked=yes&show=listingInfo"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-06T10:21:35.421+01:00">
        <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                <MarketSegment marketId="XNGM" segmentId="DNCE" name="Certificates NO">
                        <Instrument id="18LS" isin="DE000CZ355C2" name="BEAR RCL X3 CZ" symbol="BEAR RCL X3 CZ">
                                <ListingInfo listed="true" knockStatus="KNOCK_OUT_BUYBACK"/>
                        </Instrument>
                </MarketSegment>
        </MarketSegment>
    </ExchangeData>
                                        
  7. Fetch instruments delisted on a specific date, with listing info
    curl -u username:password "https://mdapi.ngm.se/search.xml?instrumentState=delisted&delistDate=2013-02-15&show=listingInfo"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-06T10:22:52.845+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNKO" name="Knock-Outs NO">
                            <Instrument id="1D2X" isin="DE000CK6JNU2" name="B LONGAKSO L CZK" symbol="B LONGAKSO L CZK">
                                    <ListingInfo listed="false" knockStatus="KNOCK_OUT" delistDate="2013-02-15"/>
                            </Instrument>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        
  8. Fetch instruments that reached knock-out level today, with listing info

    This needs two queries: one for listed instruments with the knocked flag, and one for instruments delisted today as a result of a knock-out.

    curl -u username:password "https://mdapi.ngm.se/search.xml?instrumentState=listed&knocked=yes&show=listingInfo"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-06T10:25:03.797+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNCE" name="Certificates NO">
                            <Instrument id="18LS" isin="DE000CZ355C2" name="BEAR RCL X3 CZ" symbol="BEAR RCL X3 CZ">
                                    <ListingInfo listed="true" knockStatus="KNOCK_OUT_BUYBACK"/>
                            </Instrument>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        

    Then, fetch instruments delisted today with delist reason knock-out (replace delistDate with the current date):

    curl -u username:password "https://mdapi.ngm.se/search.xml?instrumentState=delisted&knocked=no&delistDate=2026-08-19&show=listingInfo"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-06T10:25:58.489+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNCE" name="Certificates NO"/>
            </MarketSegment>
    </ExchangeData>
                                        
  9. Fetch turnover summary without listing instruments (show=turnoverSummary, skipEmpty)
    curl -u username:password "https://mdapi.ngm.se/search.xml?skipEmpty=true&show=turnoverSummary"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-06T10:27:00.322+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNCE" name="Certificates NO">
                            <TurnoverSummary currency="NOK" priceType="PER_UNIT" turnover="273229.00" volume="19100"/>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        
  10. Sort markets and instruments in descending order (sortDirection)
    curl -u username:password "https://mdapi.ngm.se/search.xml?symbol=testInstrumentRights1&symbol=testInstrumentRights2&sortDirection=DESC"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" time="2017-03-06T10:29:21.529+01:00">
            <MarketSegment marketId="XNGM" segmentId="NDXN" name="NDX Norway">
                    <MarketSegment marketId="XNGM" segmentId="DNKO" name="Knock-Outs NO">
                            <Instrument id="1891" isin="DE000CK69S85" name="B LONGDAX AK CZK" symbol="testInstrumentRights2"/>
                            <Instrument id="1890" isin="DE000CK69S77" name="B LONGDAX AJ CZK" symbol="testInstrumentRights1"/>
                    </MarketSegment>
            </MarketSegment>
    </ExchangeData>
                                        
  11. Get turnover in fixed point notation instead of floating point (rawPrices, turnoverSummary)
    curl -u username:password "https://mdapi.ngm.se/search.xml?symbol=SBC&rawPrices=true&show=turnoverSummary"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" time="2017-03-16T12:59:58.917+01:00">
        <MarketSegment marketId="XNGM" segmentId="NEST" name="NGM Equity">
            <MarketSegment marketId="XNGM" segmentId="EQST" name="Equity Stockholm">
                <Instrument id="7YF" isin="SE0005932605" name="SVERIGES BOSTADSRÄTTSCENTRUM" symbol="SBC"/>
                <TurnoverSummary currency="SEK" priceType="PER_UNIT" turnover="4480000" volume="350"/>
            </MarketSegment>
        </MarketSegment>
    </ExchangeData>
                                        
  12. Get all shares with a name or symbol starting with "G" (instrumentWildcard)
    curl -u username:password "https://mdapi.ngm.se/search.xml?mktSegm=XNGM:EQST&instrumentWildcard=G%25"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="-1" time="2017-03-16T10:24:32.055+01:00">
        <MarketSegment marketId="XNGM" segmentId="NEST" name="NGM Equity">
            <MarketSegment marketId="XNGM" segmentId="EQST" name="Equity Stockholm">
                <Instrument id="2E" isin="SE0000524530" name="GLYCOREX TRANSPLANTATION B" symbol="GTAB B"/>
                <Instrument id="20E" isin="SE0005562014" name="GUIDELINE GEO" symbol="GGEO"/>
            </MarketSegment>
        </MarketSegment>
    </ExchangeData>
                                        
  13. Fetch instruments' closing data in JSON format (format=json)
    curl -u username:password "https://mdapi.ngm.se/search.xml?symbol=testInstrumentRights1&show=closingDatas&format=json"
    {"ExchangeData":{"MarketSegments":[{"MarketSegments":[{"Instruments":[{"parentMarketSegment":"XNGM:DNKO","closingDatas":{"fromTime":"2017-03-06T00:00:00.000+01:00","toTime":"2017-03-06T12:18:42.077+01:00"},"id":"1890","isin":"DE000CK69S77","name":"B LONGDAX AJ CZK","symbol":"testInstrumentRights1"}],"marketId":"XNGM","segmentId":"DNKO","name":"Knock-Outs NO"}],"marketId":"XNGM","segmentId":"NDXN","name":"NDX Norway"}],"instrumentCount":0,"time":"2017-03-06T12:18:42.093+01:00"}}
                                        
  14. The same request, selected via the path's .json suffix instead
    curl -u username:password "https://mdapi.ngm.se/search.json?symbol=testInstrumentRights1&show=closingDatas"
    {"ExchangeData":{"MarketSegments":[{"MarketSegments":[{"Instruments":[{"parentMarketSegment":"XNGM:DNKO","closingDatas":{"fromTime":"2017-03-06T00:00:00.000+01:00","toTime":"2017-03-06T12:18:42.077+01:00"},"id":"1890","isin":"DE000CK69S77","name":"B LONGDAX AJ CZK","symbol":"testInstrumentRights1"}],"marketId":"XNGM","segmentId":"DNKO","name":"Knock-Outs NO"}],"marketId":"XNGM","segmentId":"NDXN","name":"NDX Norway"}],"instrumentCount":0,"time":"2017-03-06T12:18:42.093+01:00"}}
                                        
  15. Search for an instrument by ISIN
    curl -u paout:heslo "https://mdapi.ngm.se/search.xml?isin=SE0000598278"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" time="2017-03-16T13:48:56.877+01:00">
        <MarketSegment marketId="XNGM" segmentId="NEST" name="NGM Equity">
            <MarketSegment marketId="XNGM" segmentId="EQST" name="Equity Stockholm">
                <Instrument id="2X7" isin="SE0000598278" name="AIK FOTBOLL B" symbol="AIK B"/>
            </MarketSegment>
        </MarketSegment>
    </ExchangeData>
                                        
  16. Search for a delisted instrument by ISIN

    Note: this returns an error if the ISIN's actual state does not match the requested instrumentState (e.g. requesting a listed ISIN with instrumentState=delisted).

    curl -u username:password "https://mdapi.ngm.se/search.xml?isin=GB00B8RSFD07&instrumentState=delisted"
    <ExchangeData xmlns="http://www.ngm.se/ns/ExchangeDataSchema/2.9" instrumentCount="0" time="2017-03-16T14:21:49.966+01:00">
        <MarketSegment marketId="XNGM" segmentId="NDXS" name="NDX Sweden">
            <MarketSegment marketId="XNGM" segmentId="DSKO" name="Knock-Outs SE">
                <Instrument id="1BPE" isin="GB00B8RSFD07" name="MINILONG ASSA M RBS" symbol="MINILONG ASSA M"/>
            </MarketSegment>
        </MarketSegment>
    </ExchangeData>
                                        

Tabular Data

Exposes a customized or standardized data report in tabular format addressed by the product's productCode. The response columns follow the same data format as query parameters, and are specified per product. Repeatable (array) data is represented as an array in JSON, list of <item> tags in XML, and separated by pipe char | in CSV.

The supported formats are CSV (default), JSON and XML. The format selection may also be done with a suffix (.csv, .json, or .xml) after the productCode, which takes precedence over the Accept header.

Request

GETtabular/{productCode}

GETtabular/{productCode}.{format}

Parameters

NameTypeRequiredDescription
limitIntegerNoMaximum number of rows to return. Must be at least 1. Omitting it returns all rows.
offsetIntegerNoNumber of rows to skip. Must not be negative. Omitting it starts from the first row.
Plus any parameters declared by the specific product.

Example product

The following is an illustrative product definition, not a real one, to show the shape of a tabular product:

Product NameCodeDescription
Example: End-of-Day Pricesexample-eod-pricesDaily closing prices for a symbol over a date range.
Parameter NameTypeRequiredDescription
fromDateDateYesStart of the date range (inclusive).
toDateDateYesEnd of the date range (exclusive).
Column NameTypeRequiredDescription
symbolStringYesInstrument symbol.
tradeDateDateYesTrading date the price applies to.
closePriceDecimalYesClosing price of the instrument on that date.

Examples

  1. Run the example product as CSV (the default)
    curl -u username:password "https://mdapi.ngm.se/tabular/example-eod-prices?fromDate=2026-08-01&toDate=2026-08-10"
    symbol,tradeDate,closePrice
    ACME,2026-08-01,102.50
    ACME,2026-08-02,103.10
                                        
  2. The same product as JSON, selected via the path's .json suffix
    curl -u username:password "https://mdapi.ngm.se/tabular/example-eod-prices.json?fromDate=2026-08-01&toDate=2026-08-10"
    [{"symbol":"ACME","tradeDate":"2026-08-01","closePrice":102.50},{"symbol":"ACME","tradeDate":"2026-08-02","closePrice":103.10}]
                                        
  3. Equivalently, via the Accept header instead of the suffix
    curl -u username:password -H "Accept: application/json" "https://mdapi.ngm.se/tabular/example-eod-prices?fromDate=2026-08-01&toDate=2026-08-10"
    [{"symbol":"ACME","tradeDate":"2026-08-01","closePrice":102.50},{"symbol":"ACME","tradeDate":"2026-08-02","closePrice":103.10}]