You can integrate SIX Group's SIX API with your LUSID domain to fetch real-time prices for your instruments as you perform valuations or rebalance portfolios. Rather than importing data and storing it in LUSID, the data is fetched from SIX and displayed as needed in LUSID to ensure you only see the latest available prices.
To get started connecting SIX API to your LUSID domain:
Contact your FINBOURNE sales representative to provision your LUSID domain with the SIX API integration.
Ensure you have access to a SIX API account; you'll need to supply LUSID with your credentials.
If your domain has been provisioned with the integration and you have access to a SIX API account, you can use the following steps as a guide to perform your own real-time valuations:
Step 1: Populate instruments with SIX instrument identifiers
In order for LUSID to fetch real-time prices for an instrument, the instrument must have at least one of the following LUSID instrument identifier types populated:
LUSID instrument identifier type | Can be mapped from SIX identifier type |
|
|
|
|
|
|
|
|
|
|
Note: If your LUSID domain does not have access to the above LUSID instrument identifier types, please contact support.
For example, you might populate an Apple instrument with the SixValoren_BC
value 908440_13
to retrieve real-time prices from the Frankfurt Stock Exchange when you perform a valuation.
There are two ways you can populate your instruments with the above instrument identifiers:
Note your SIX API account must have the appropriate entitlements to access data for the exchange you specify a BorseCode (BC) for.
Step 2: Supply your LUSID domain with your SIX API credentials
To allow LUSID to access and fetch price data, you must supply your SIX API credentials to LUSID securely via the Configuration Store. See how to do this.
Step 3: Create a SIX-specific recipe
With your LUSID domain linked up to the SIX API, you can create a recipe that allows you to value portfolios using real-time market prices supplied by SIX. To ensure your recipe uses SIX data, you must specify at least one market data rule containing the following:
A key specifying
Quote.<IdentifierType>.<IdentifierValue>
where<IdentifierType>
is one of the SIX-specific instrument identifier types from step 1.A
supplier
value ofSIX
.A
dataScope
ofLUSID-SIX
.A
quoteType
ofPrice
.A
sourceSystem
value ofSIX/Streaming
.A
quoteInterval
of1D.Live
.A
priceSource
of eitherrealtime
ordelayed
.
Note it is currently only possible to retrieve real-time prices for equities.
For example, to create a simple recipe that might be suitable to value a portfolios of equities containing instruments with the SixValoren_BC
identifier populated, you could call the UpsertConfigurationRecipe API as follows:
curl -X POST 'https://<your-domain>.lusid.com/api/api/recipes'
-H 'Content-Type: application/json-patch+json'
-H 'Authorization: Bearer <your-API-access-token>'
-d '{
"configurationRecipe": {
"scope": "Finbourne-Examples",
"code": "SixEquitiesRealtimePricing",
"market": {
"marketRules": [
{
"key": "Quote.SixValoren_BC.*",
"supplier": "SIX",
"dataScope": "LUSID-SIX",
"quoteType": "Price",
"field": "Last",
"sourceSystem": "SIX/Streaming",
"quoteInterval": "1D.Live",
"priceSource": "realtime"
},
{
"key": "Fx.CurrencyPair.*",
"supplier": "Lusid",
"dataScope": "realtime-valuation",
"quoteType": "Rate",
"field": "mid"
}
],
"options": {
"defaultSupplier": "Lusid",
"defaultInstrumentCodeType": "LusidInstrumentId",
"defaultScope": "Finbourne-Examples",
"attemptToInferMissingFx": true
}
},
"pricing": {
"options": { "allowPartiallySuccessfulEvaluation": true }
},
"description": "Simple recipe to value equities using SIX real-time prices along with some supporting FX rates"
}
}'
Step 4: Perform a valuation using your recipe
Now you have a recipe, you can use it to value a portfolio containing instruments with the relevant identifier types populated.
For example, to perform a real-time valuation on a portfolio of US equity instruments with the SixValoren_BC
identifier populated, you can sign in to the LUSID web app and navigate to Dashboard > Valuations, selecting your Portfolio and Recipe. You can adjust the refresh rate to ensure you always see the latest prices:
Note the following:
Prices update as changes are made available via the SIX API.
The valuation
effectiveAt
datetime doesn't have an impact on real-time valuations; LUSID always retrieves the latest available price from SIX.LUSID only displays real-time prices when a specified exchange is open. You can specify additional
marketRules
in your recipe to implement fallback logic if a real-time price cannot be retrieved.
You can also use real-time prices to help you rebalance your portfolios using the latest market data. Read more on rebalancing in LUSID.
For more information, you can work through this Jupyter Notebook tutorial.