Python access to Datascope Select

Hi, Can someone please help me get started with a simple query template for retrieving some mutual fund data on DSS with Python from the restAPI?

Ideally i would like to see

import [any required libraries for DSS access]

code to access:

api_key

url =

query criteria

{mutual funds,

domicile:uk

fund size gbp}


just looking for a simple query to get me going.

Cheers

Matt





Tagged:

Best Answer

  • Hello Matt,

    I would like to suggest a two-step approach to getting started and completing successfully the quickest way, while learning how to work with DSS REST API in python toward your next integration requirements:

    1. Identify and tune HTTP REST request(s) that you require using tool Postman.

    REST API Tutorials Introduction

    I think the request you are looking for is FundsSearch request, the full spec can be found at REST API Reference Tree and a FundsSearch request will look similar to

    {
    "SearchRequest": {
    "DomicileCodes": ["GB"],
    "CurrencyCodes": null,
    "SubTypes": null,
    "IdentifierType": "Ric",
    "PreferredIdentifierType": "Ric"
    }
    }

    Resulting in

    {
    "@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#Collection(DataScope.Select.Api.Search.FundSearchResult)",
    "value": [
    {
    "Identifier": "LP60001964",
    "IdentifierType": "Ric",
    "Key": "VjF8MHgwMDAzZjgwNmViMzYzZjFmfE1GUVV8TFA2MDAwMTk2NHxSSUM",
    "Description": "Equitable Life German Managed",
    "InstrumentType": "Fund",
    "FundName": "Equitable Life German Managed",
    "FundAdministrator": "INSIGHT INVESTMENT FUNDS MANAGEMENT LIMITED",
    "PortfolioManager": "EQUITABLE LIFE ASSURANCE SOCIETY,(THE)",
    "DomicileCode": "GB",
    "CurrencyCode": "EUR",
    "InvestmentType": "Equity",
    "SubType": "InsuranceFund",
    "AssetStatus": "Active",
    "IssuerName": "",
    "IssuerOrgId": "117139"
    },
    {
    "Identifier": "LP60001970",
    "IdentifierType": "Ric",
    "Key": "VjF8MHgwMDAzZjgwNmViMzY0NTY1fE1GUVV8TFA2MDAwMTk3MHxSSUM",
    "Description": "Equitable Irish Managed",
    "InstrumentType": "Fund",
    "FundName": "Equitable Irish Managed",
    "FundAdministrator": "INSIGHT INVESTMENT FUNDS MANAGEMENT LIMITED",
    "PortfolioManager": "EQUITABLE LIFE ASSURANCE SOCIETY,(THE)",
    "DomicileCode": "GB",
    "CurrencyCode": "EUR",
    "InvestmentType": "Mixed Assets",
    "SubType": "InsuranceFund",
    "AssetStatus": "Active",
    "IssuerName": "",
    "IssuerOrgId": "117139"
    }
    ...
    "@odata.nextlink": "https://selectapi.datascope.refinitiv.com/RestApi/v1/Search/FundSearch?$skiptoken='MjUw'"

    Notice the next link at the end- this result is large and paginated, so next links will have to be requested iteratively till the result is exhausted.

    2. Wrap working HTTP REST request(s) in working python code.

    I would suggest downloading RTH Python Code Samples, and in OnDemandIntradayBar example replacing request with your request.

    From the content perspective, I do not see the capability from FundsSearch to filter by fund size.

    From what I know of this content, a relevant secondary request may be FundAllocation ExtractionRequest, please see REST API Reference Tree -> Extractions ->ExtractRaw adn select FundAllocationExtractionRequest from the dropdown list to see the complete spec.

    However, for the best help on content, how to identify per your requirements, you may wish to additionally advise with Refinitiv content experts via Refinitiv Helpdesk Online -> Content -> DSS