MATLAB SDK
Windows Installation
The OpenDataDSL MATLAB SDK requires a java SDK version of at least 11 - here are instructions from MathWorks on how to upgrade your version of java.
Follow these instructions to install the matlab client and configure it in MATLAB
- Download the matlab-client zip file
- Unzip the installation to a directory on your local drive
- Edit or create the file %USER_HOME%\AppData\Roaming\MathWorks\MATLAB\R2023b\javaclasspath.txt
- Add an entry in there that points to the odsl-sdk.jar file in the lib directory of the unzipped matlab-client
Example ( if you extracted the zip to c:\ ):
c:\matlab-client\lib\odsl-sdk.jar
- Start or restart MATLAB
Getting started
Connecting
To connect to OpenDataDSL, you need to create an instance of the sdk.ODSL class and then call login() as follows:
Interactive login
% Connect
ODSL=sdk.ODSL();
ODSL.login();
Using a secret
% Connect
ODSL=sdk.ODSL();
ODSL.loginWithSecret("tenant id", "client id", "secret");
Getting data
To read from any of the ODSL services, you need to use the get method on the ODSL sdk with the following syntax:
var = odsl.get(service, source, id);
e.g. to the timeseries for the EUR/GBP FX rate from ABN Amro
fx = odsl.get('data', 'public', '#ABN_FX.EURGBP:SPOT');
Updating data
To write to any of the ODSL services, you need to use the update method on the ODSL sdk with the following syntax:
odsl.update(service, source, Var, [options]);
e.g. to update some Master Data using the object service:
AAA = VarDynamicObject('AAA');
odsl.update('object', 'private', AAA);
Building curves
We have added support for building curves externally using any language. Curves can be built either as:
- Event triggered using Smart Curves
- Manual or time triggered using Standard Curves