MantaRisk REST API

Analytics

historyAnalyticsGet

Single instrument analytics

Returns the following analytics for the given price curve: - **Correlation based exposure** to MantaRisk's risk factors. Each factor exposure carries a beta coefficient, and factors are typed as one of: government, moneymarket, geographic, sector, currency, style, crypto, commodity or corporate (fixed income is represented via the government, corporate and moneymarket types). Only the most relevant factors are provided in any given analysis. - **Idiosyncratic risk**: the residual (error term) in the regression; random fluctuations not explained by factors. Returned per horizon (daily, weekly, monthly, quarterly, year-to-date and yearly). - **Alpha**: the intercept of the regression; the expected return not explained by factor exposures. - **R-squared**: the regression's goodness of fit, i.e. the proportion of variation explained by the factors. - **CVAR** over daily, weekly and monthly periods for the 2.5%, 5% and 10% quantiles - **VAR** over daily, weekly and monthly periods for the 2.5%, 5% and 10% quantiles - **Volatility** over daily, weekly and monthly periods - **Sample based expected returns**: defined as the average return over 5 years. Provided either equally or exponentially weighted and over daily, weekly, monthly, quarterly, year-to-date and yearly timeframes. These are price returns (dividend/split-adjusted for equities and funds, clean for fixed income) and exclude coupon income, which is forecast separately by the cashflow endpoint. - **Factor based expected returns**: model that calculates an asset's anticipated performance based on its exposure to MantaRisk's risk factors that are believed to drive investment returns. Provided either equally or exponentially weighted and over daily, weekly, monthly, quarterly, year-to-date and yearly timeframes. This endpoint can be used with any instruments including price curves you have entered through the PUT /history endpoint. This endpoint can be used to caculate analytics for a portfolio whose performance history has been entered through the PUT /history endpoint. A /portfolio/analytics endpoint is also offered to analyse a portfolio composition has opposed to the portfolio performance history. A time serie can be loaded in the platform using the PUT /history endpoint. Its instrument_code (provided by you in the previous endpoint) and your user apiid (see GET /api) can then be used here.


/history/analytics

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history/analytics?instrument_code=AAPL_XNGS&apiid=8"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String instrumentCode = AAPL_XNGS; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer apiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

        try {
            risk_exposure_report result = apiInstance.historyAnalyticsGet(instrumentCode, apiid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#historyAnalyticsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String instrumentCode = new String(); // String | Can be found using the GET /history or GET/history/instrument endpoints
final Integer apiid = new Integer(); // Integer | Can be found using the GET /history or GET/history/instrument endpoints

try {
    final result = await api_instance.historyAnalyticsGet(instrumentCode, apiid);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyAnalyticsGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String instrumentCode = AAPL_XNGS; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer apiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

        try {
            risk_exposure_report result = apiInstance.historyAnalyticsGet(instrumentCode, apiid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#historyAnalyticsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *instrumentCode = AAPL_XNGS; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)
Integer *apiid = 8; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)

// Single instrument analytics
[apiInstance historyAnalyticsGetWith:instrumentCode
    apiid:apiid
              completionHandler: ^(risk_exposure_report output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var instrumentCode = AAPL_XNGS; // {String} Can be found using the GET /history or GET/history/instrument endpoints
var apiid = 8; // {Integer} Can be found using the GET /history or GET/history/instrument endpoints

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyAnalyticsGet(instrumentCode, apiid, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyAnalyticsGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var instrumentCode = AAPL_XNGS;  // String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
            var apiid = 8;  // Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)

            try {
                // Single instrument analytics
                risk_exposure_report result = apiInstance.historyAnalyticsGet(instrumentCode, apiid);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.historyAnalyticsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$instrumentCode = AAPL_XNGS; // String | Can be found using the GET /history or GET/history/instrument endpoints
$apiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

try {
    $result = $api_instance->historyAnalyticsGet($instrumentCode, $apiid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->historyAnalyticsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $instrumentCode = AAPL_XNGS; # String | Can be found using the GET /history or GET/history/instrument endpoints
my $apiid = 8; # Integer | Can be found using the GET /history or GET/history/instrument endpoints

eval {
    my $result = $api_instance->historyAnalyticsGet(instrumentCode => $instrumentCode, apiid => $apiid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->historyAnalyticsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
instrumentCode = AAPL_XNGS # String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
apiid = 8 # Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)

try:
    # Single instrument analytics
    api_response = api_instance.history_analytics_get(instrumentCode, apiid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->historyAnalyticsGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let instrumentCode = AAPL_XNGS; // String
    let apiid = 8; // Integer

    let mut context = AnalyticsApi::Context::default();
    let result = client.historyAnalyticsGet(instrumentCode, apiid, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
instrument_code*
String
Can be found using the GET /history or GET/history/instrument endpoints
Required
apiid*
Integer
Can be found using the GET /history or GET/history/instrument endpoints
Required

Responses


historyBenchmarkGet

Single instrument benchmarking

Benchmark a specific instrument (or price curve e.g. portolfio returns) against another instrument / price curve e.g. the S&P 500. To compare a price curve (e.g. portfolio performance), it must be first entered into MantaRisk using the PUT /history endpoint. The following analytics are provided for the instrument: - **Alpha** measures the amount that the investment has returned in comparison to the benchmark that it is compared against. Alpha is expressed in log returns and is returned per horizon (alpha_by_horizon: daily, weekly, monthly, quarterly, year-to-date and yearly); the annualised figure is the `year` value, also surfaced as the human-readable `print_alpha`. As an example, a daily alpha of 0.01 means the instrument outperforms the benchmark by 1% on average daily. - **Beta** is an indication of the volatility of the instrument in comparison with the benchmark. The benchmark commonly is the S&P 500 as a proxy measurement for the market. The baseline number for beta is one, which indicates that the instrument's price moves exactly as the market moves. A beta of less than 1 means that the instrument is less volatile than the market, while a beta greater than 1 indicates that its price is more volatile than the market e.g. a beta of 1.5 is considered to be 50% more volatile than the overall market. - **Idiosyncratic risk** is the portion of the instrument which is uncorrelated to the benchmark e.g. sectorial trends, geopolitics etc. The term "risk" here is misleading. A high idiosyncratic risk just means the investment is not correlated with the benchmark. It is expressed as a return percentage and is returned across all six horizons (daily, weekly, monthly, quarterly, year-to-date and yearly), with the yearly figure also surfaced as `print_idiosyncratic_risk`. - **CVAR**: expected average loss in the percentile of the worst-case tail of the loss distribution. It is returned at the 2.5%, 5% and 10% quantiles (the 0.975, 0.95 and 0.9 confidence levels), not only the 95% level. - **VAR**: estimates the maximum expected loss over a given horizon at a specified confidence level, providing a probabilistic measure of downside risk. Like CVAR it is returned at the 2.5%, 5% and 10% quantiles. VAR identifies the threshold loss that will not be exceeded with a given confidence level, whereas CVAR, also known as Expected Shortfall, measures the average loss that occurs beyond that VaR threshold; in that sense CVAR is a more appropriate measure of risk. - **Volatility**: measures the degree of variation in the price or returns of an asset or portfolio over time, reflecting the magnitude of its fluctuations. - **R-squared** measures the proportion of variation in the asset or portfolio that can be explained by the benchmark, indicating how well the asset or portfolio fits the benchmark. - **Returns** provides the annualised return of both the input instrument and the benchmark, allowing for a direct comparison of performance. Note on horizons: VAR and CVAR are published at the daily, weekly and monthly horizons only; volatility and the other metrics are available at all horizons. A time serie can be loaded in the platform using the PUT /history endpoint. Its instrument_code (provided by you in the previous endpoint) and your user apiid (see GET /api) can then be used here.


/history/benchmark

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history/benchmark?instrument_code=AAPL_XNGS&apiid=8&benchmark_instrument_code=SPY_ARCX&benchmark_apiid=8"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String instrumentCode = AAPL_XNGS; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer apiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints
        String benchmarkInstrumentCode = SPY_ARCX; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer benchmarkApiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

        try {
            benchmark result = apiInstance.historyBenchmarkGet(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#historyBenchmarkGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String instrumentCode = new String(); // String | Can be found using the GET /history or GET/history/instrument endpoints
final Integer apiid = new Integer(); // Integer | Can be found using the GET /history or GET/history/instrument endpoints
final String benchmarkInstrumentCode = new String(); // String | Can be found using the GET /history or GET/history/instrument endpoints
final Integer benchmarkApiid = new Integer(); // Integer | Can be found using the GET /history or GET/history/instrument endpoints

try {
    final result = await api_instance.historyBenchmarkGet(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyBenchmarkGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String instrumentCode = AAPL_XNGS; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer apiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints
        String benchmarkInstrumentCode = SPY_ARCX; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer benchmarkApiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

        try {
            benchmark result = apiInstance.historyBenchmarkGet(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#historyBenchmarkGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *instrumentCode = AAPL_XNGS; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)
Integer *apiid = 8; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)
String *benchmarkInstrumentCode = SPY_ARCX; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)
Integer *benchmarkApiid = 8; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)

// Single instrument benchmarking
[apiInstance historyBenchmarkGetWith:instrumentCode
    apiid:apiid
    benchmarkInstrumentCode:benchmarkInstrumentCode
    benchmarkApiid:benchmarkApiid
              completionHandler: ^(benchmark output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var instrumentCode = AAPL_XNGS; // {String} Can be found using the GET /history or GET/history/instrument endpoints
var apiid = 8; // {Integer} Can be found using the GET /history or GET/history/instrument endpoints
var benchmarkInstrumentCode = SPY_ARCX; // {String} Can be found using the GET /history or GET/history/instrument endpoints
var benchmarkApiid = 8; // {Integer} Can be found using the GET /history or GET/history/instrument endpoints

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyBenchmarkGet(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyBenchmarkGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var instrumentCode = AAPL_XNGS;  // String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
            var apiid = 8;  // Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
            var benchmarkInstrumentCode = SPY_ARCX;  // String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
            var benchmarkApiid = 8;  // Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)

            try {
                // Single instrument benchmarking
                benchmark result = apiInstance.historyBenchmarkGet(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.historyBenchmarkGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$instrumentCode = AAPL_XNGS; // String | Can be found using the GET /history or GET/history/instrument endpoints
$apiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints
$benchmarkInstrumentCode = SPY_ARCX; // String | Can be found using the GET /history or GET/history/instrument endpoints
$benchmarkApiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

try {
    $result = $api_instance->historyBenchmarkGet($instrumentCode, $apiid, $benchmarkInstrumentCode, $benchmarkApiid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->historyBenchmarkGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $instrumentCode = AAPL_XNGS; # String | Can be found using the GET /history or GET/history/instrument endpoints
my $apiid = 8; # Integer | Can be found using the GET /history or GET/history/instrument endpoints
my $benchmarkInstrumentCode = SPY_ARCX; # String | Can be found using the GET /history or GET/history/instrument endpoints
my $benchmarkApiid = 8; # Integer | Can be found using the GET /history or GET/history/instrument endpoints

eval {
    my $result = $api_instance->historyBenchmarkGet(instrumentCode => $instrumentCode, apiid => $apiid, benchmarkInstrumentCode => $benchmarkInstrumentCode, benchmarkApiid => $benchmarkApiid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->historyBenchmarkGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
instrumentCode = AAPL_XNGS # String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
apiid = 8 # Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
benchmarkInstrumentCode = SPY_ARCX # String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
benchmarkApiid = 8 # Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)

try:
    # Single instrument benchmarking
    api_response = api_instance.history_benchmark_get(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->historyBenchmarkGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let instrumentCode = AAPL_XNGS; // String
    let apiid = 8; // Integer
    let benchmarkInstrumentCode = SPY_ARCX; // String
    let benchmarkApiid = 8; // Integer

    let mut context = AnalyticsApi::Context::default();
    let result = client.historyBenchmarkGet(instrumentCode, apiid, benchmarkInstrumentCode, benchmarkApiid, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
instrument_code*
String
Can be found using the GET /history or GET/history/instrument endpoints
Required
apiid*
Integer
Can be found using the GET /history or GET/history/instrument endpoints
Required
benchmark_instrument_code*
String
Can be found using the GET /history or GET/history/instrument endpoints
Required
benchmark_apiid*
Integer
Can be found using the GET /history or GET/history/instrument endpoints
Required

Responses


portfolioAnalyticsGet

Portfolio analytics

"Returns the following analytics for the given portfolio as defined by its open positions. If the portfolio passed to this method does not have at least a single open position, this method will not return anything. Risk and expected-return metrics are returned both at portfolio level and decomposed across seven dimensions: total, asset class, sector, country (domicile), currency, credit rating, and individual instrument. Per portfolio component: - **Factor exposure**: an array of risk-factor betas from MantaRisk's factor model. Each entry gives a factor's beta, factor_name and factor_type, where factor_type is one of government, moneymarket, geographic, sector, currency, style, crypto, commodity or corporate. This is a factor-model output, not a simple correlation to sectors/countries/currencies. - **CVAR** over daily, weekly and monthly periods for the 2.5%, 5% and 10% quantiles - **VAR** over daily, weekly and monthly periods for the 2.5%, 5% and 10% quantiles - **Volatility** over daily, weekly, monthly, quarterly, year-to-date and yearly periods - **Marginal contribution to risk** (at daily, weekly and monthly horizons), allowing to understand the individual contribution of an instrument to the overall risk of the portfolio - **Average returns**: defined as the average return over 5 years on a daily, weekly, monthly, quarterly, year-to-date or yearly timeframe - **Regression**: a per-component regression against the risk factors, returning the alpha (intercept), r_squared (goodness of fit) and idiosyncratic risk reported per horizon (daily, weekly, monthly, quarterly, year-to-date and yearly) At portfolio level: - **Factor exposure**: the portfolio's betas to MantaRisk's risk factors, using the same factor_type taxonomy as above - **CVAR** over daily, weekly and monthly periods for the 2.5%, 5% and 10% quantiles - **VAR** over daily, weekly and monthly periods for the 2.5%, 5% and 10% quantiles - **Volatility** over daily, weekly, monthly, quarterly, year-to-date and yearly periods - **Diversification ratio**: metric used to quantify the level of diversification within a portfolio. MantaRisk uses the definition according to Choueifaty and Coignard (2008) where this ratio considers both the number of assets in the portfolio and the correlations between them. A higher diversification ratio indicates a more diversified portfolio, meaning the assets are less likely to move in the same direction, reducing overall portfolio risk. - **Sample based expected returns**: defined as the average return over 5 years. Provided either equally or exponentially weighted and over daily, weekly, monthly, quarterly, year-to-date and yearly timeframes. These are price returns (dividend/split-adjusted for equities and funds, clean for fixed income) and exclude coupon income, which is forecast separately by the cashflow endpoint. - **Factor based expected returns**: model that calculates an asset's anticipated performance based on its exposure to MantaRisk's risk factors that are believed to drive investment returns. Provided either equally or exponentially weighted and over daily, weekly, monthly, quarterly, year-to-date and yearly timeframes. - **R Squared**: proportion of the variance explained by the risk factors. 1 - R^2 is therefore equivalent to the idiosyncratic risk i.e. the portion of the portfolio which cannot be explained by the risk factors. - **Risk coverage**: share of the portfolio's gross weight whose risk could actually be modelled. Holdings that were dropped in error, or for which no idiosyncratic risk could be estimated, are excluded from the numerator but still counted in the total, so a value below 1 tells you the metrics above describe only part of the portfolio. Portfolios can be entered into MantaRisk using the PUT /portfolio endpoint.


/portfolio/analytics

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/analytics?client_reference=clientReference_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio

        try {
            portfolio_analytics result = apiInstance.portfolioAnalyticsGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioAnalyticsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | unique identifier for the portfolio

try {
    final result = await api_instance.portfolioAnalyticsGet(clientReference);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioAnalyticsGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio

        try {
            portfolio_analytics result = apiInstance.portfolioAnalyticsGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioAnalyticsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *clientReference = clientReference_example; // unique identifier for the portfolio (default to null)

// Portfolio analytics
[apiInstance portfolioAnalyticsGetWith:clientReference
              completionHandler: ^(portfolio_analytics output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var clientReference = clientReference_example; // {String} unique identifier for the portfolio

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioAnalyticsGet(clientReference, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioAnalyticsGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var clientReference = clientReference_example;  // String | unique identifier for the portfolio (default to null)

            try {
                // Portfolio analytics
                portfolio_analytics result = apiInstance.portfolioAnalyticsGet(clientReference);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.portfolioAnalyticsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$clientReference = clientReference_example; // String | unique identifier for the portfolio

try {
    $result = $api_instance->portfolioAnalyticsGet($clientReference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->portfolioAnalyticsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $clientReference = clientReference_example; # String | unique identifier for the portfolio

eval {
    my $result = $api_instance->portfolioAnalyticsGet(clientReference => $clientReference);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->portfolioAnalyticsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
clientReference = clientReference_example # String | unique identifier for the portfolio (default to null)

try:
    # Portfolio analytics
    api_response = api_instance.portfolio_analytics_get(clientReference)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->portfolioAnalyticsGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let clientReference = clientReference_example; // String

    let mut context = AnalyticsApi::Context::default();
    let result = client.portfolioAnalyticsGet(clientReference, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
unique identifier for the portfolio
Required

Responses


portfolioBacktestGet

Get backtest results

Returns the results of a portfolio backtest. Check the status field of the response first. If the status is Completed then the response contains the results. If the status is Started then computations are underway and this call must be made again at a later stage to get the results. If the status is Not Queued then either the Put method has not been called or something went wrong. When complete, the results include: - **positions**: a trade-by-trade list, each entry carrying instrumentName, instrumentCode, openDate, closeDate, openPrice, closePrice, stop, limit, costs, pnL, currencyCode and a closed flag. - **pnLSerie**: a {date, value} time series tracking cumulative P&L (the equity curve) over the backtest window. - **Summary statistics**: yearlyReturn (annualised return), pnL (total P&L), lowestPnL (worst P&L drawdown), costs, nprofitToTotalRatio (win rate), avgProfitLossRatio and averageTradeDuration.


/portfolio/backtest

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/backtest?client_reference=clientReference_example&strategy_id=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio
        Integer strategyId = 56; // Integer | unique identifier for the risk management strategy

        try {
            apiInstance.portfolioBacktestGet(clientReference, strategyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioBacktestGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | unique identifier for the portfolio
final Integer strategyId = new Integer(); // Integer | unique identifier for the risk management strategy

try {
    final result = await api_instance.portfolioBacktestGet(clientReference, strategyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioBacktestGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio
        Integer strategyId = 56; // Integer | unique identifier for the risk management strategy

        try {
            apiInstance.portfolioBacktestGet(clientReference, strategyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioBacktestGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *clientReference = clientReference_example; // unique identifier for the portfolio (default to null)
Integer *strategyId = 56; // unique identifier for the risk management strategy (default to null)

// Get backtest results
[apiInstance portfolioBacktestGetWith:clientReference
    strategyId:strategyId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var clientReference = clientReference_example; // {String} unique identifier for the portfolio
var strategyId = 56; // {Integer} unique identifier for the risk management strategy

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.portfolioBacktestGet(clientReference, strategyId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioBacktestGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var clientReference = clientReference_example;  // String | unique identifier for the portfolio (default to null)
            var strategyId = 56;  // Integer | unique identifier for the risk management strategy (default to null)

            try {
                // Get backtest results
                apiInstance.portfolioBacktestGet(clientReference, strategyId);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.portfolioBacktestGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$clientReference = clientReference_example; // String | unique identifier for the portfolio
$strategyId = 56; // Integer | unique identifier for the risk management strategy

try {
    $api_instance->portfolioBacktestGet($clientReference, $strategyId);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->portfolioBacktestGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $clientReference = clientReference_example; # String | unique identifier for the portfolio
my $strategyId = 56; # Integer | unique identifier for the risk management strategy

eval {
    $api_instance->portfolioBacktestGet(clientReference => $clientReference, strategyId => $strategyId);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->portfolioBacktestGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
clientReference = clientReference_example # String | unique identifier for the portfolio (default to null)
strategyId = 56 # Integer | unique identifier for the risk management strategy (default to null)

try:
    # Get backtest results
    api_instance.portfolio_backtest_get(clientReference, strategyId)
except ApiException as e:
    print("Exception when calling AnalyticsApi->portfolioBacktestGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let strategyId = 56; // Integer

    let mut context = AnalyticsApi::Context::default();
    let result = client.portfolioBacktestGet(clientReference, strategyId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
unique identifier for the portfolio
Required
strategy_id*
Integer
unique identifier for the risk management strategy
Required

Responses


portfolioBacktestPut

Start portfolio backtest

Starts a portfolio backtest, use the get method endpoint to poll for the response.


/portfolio/backtest

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/backtest?client_reference=clientReference_example&strategy_id=56&start_date=2020-01-01&end_date=2023-12-30"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio
        Integer strategyId = 56; // Integer | unique identifier for the risk management strategy
        date startDate = 2020-01-01; // date | date from which the backtest is run (inclusive) in RFC3339 format
        date endDate = 2023-12-30; // date | date until which the backtest is run (inclusive) in RFC3339 format

        try {
            apiInstance.portfolioBacktestPut(clientReference, strategyId, startDate, endDate);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioBacktestPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | unique identifier for the portfolio
final Integer strategyId = new Integer(); // Integer | unique identifier for the risk management strategy
final date startDate = new date(); // date | date from which the backtest is run (inclusive) in RFC3339 format
final date endDate = new date(); // date | date until which the backtest is run (inclusive) in RFC3339 format

try {
    final result = await api_instance.portfolioBacktestPut(clientReference, strategyId, startDate, endDate);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioBacktestPut: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio
        Integer strategyId = 56; // Integer | unique identifier for the risk management strategy
        date startDate = 2020-01-01; // date | date from which the backtest is run (inclusive) in RFC3339 format
        date endDate = 2023-12-30; // date | date until which the backtest is run (inclusive) in RFC3339 format

        try {
            apiInstance.portfolioBacktestPut(clientReference, strategyId, startDate, endDate);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioBacktestPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *clientReference = clientReference_example; // unique identifier for the portfolio (default to null)
Integer *strategyId = 56; // unique identifier for the risk management strategy (default to null)
date *startDate = 2020-01-01; // date from which the backtest is run (inclusive) in RFC3339 format (default to null)
date *endDate = 2023-12-30; // date until which the backtest is run (inclusive) in RFC3339 format (default to null)

// Start portfolio backtest
[apiInstance portfolioBacktestPutWith:clientReference
    strategyId:strategyId
    startDate:startDate
    endDate:endDate
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var clientReference = clientReference_example; // {String} unique identifier for the portfolio
var strategyId = 56; // {Integer} unique identifier for the risk management strategy
var startDate = 2020-01-01; // {date} date from which the backtest is run (inclusive) in RFC3339 format
var endDate = 2023-12-30; // {date} date until which the backtest is run (inclusive) in RFC3339 format

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.portfolioBacktestPut(clientReference, strategyId, startDate, endDate, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioBacktestPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var clientReference = clientReference_example;  // String | unique identifier for the portfolio (default to null)
            var strategyId = 56;  // Integer | unique identifier for the risk management strategy (default to null)
            var startDate = 2020-01-01;  // date | date from which the backtest is run (inclusive) in RFC3339 format (default to null)
            var endDate = 2023-12-30;  // date | date until which the backtest is run (inclusive) in RFC3339 format (default to null)

            try {
                // Start portfolio backtest
                apiInstance.portfolioBacktestPut(clientReference, strategyId, startDate, endDate);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.portfolioBacktestPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$clientReference = clientReference_example; // String | unique identifier for the portfolio
$strategyId = 56; // Integer | unique identifier for the risk management strategy
$startDate = 2020-01-01; // date | date from which the backtest is run (inclusive) in RFC3339 format
$endDate = 2023-12-30; // date | date until which the backtest is run (inclusive) in RFC3339 format

try {
    $api_instance->portfolioBacktestPut($clientReference, $strategyId, $startDate, $endDate);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->portfolioBacktestPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $clientReference = clientReference_example; # String | unique identifier for the portfolio
my $strategyId = 56; # Integer | unique identifier for the risk management strategy
my $startDate = 2020-01-01; # date | date from which the backtest is run (inclusive) in RFC3339 format
my $endDate = 2023-12-30; # date | date until which the backtest is run (inclusive) in RFC3339 format

eval {
    $api_instance->portfolioBacktestPut(clientReference => $clientReference, strategyId => $strategyId, startDate => $startDate, endDate => $endDate);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->portfolioBacktestPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
clientReference = clientReference_example # String | unique identifier for the portfolio (default to null)
strategyId = 56 # Integer | unique identifier for the risk management strategy (default to null)
startDate = 2020-01-01 # date | date from which the backtest is run (inclusive) in RFC3339 format (default to null)
endDate = 2023-12-30 # date | date until which the backtest is run (inclusive) in RFC3339 format (default to null)

try:
    # Start portfolio backtest
    api_instance.portfolio_backtest_put(clientReference, strategyId, startDate, endDate)
except ApiException as e:
    print("Exception when calling AnalyticsApi->portfolioBacktestPut: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let strategyId = 56; // Integer
    let startDate = 2020-01-01; // date
    let endDate = 2023-12-30; // date

    let mut context = AnalyticsApi::Context::default();
    let result = client.portfolioBacktestPut(clientReference, strategyId, startDate, endDate, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
unique identifier for the portfolio
Required
strategy_id*
Integer
unique identifier for the risk management strategy
Required
start_date*
date (date)
date from which the backtest is run (inclusive) in RFC3339 format
Required
end_date*
date (date)
date until which the backtest is run (inclusive) in RFC3339 format
Required

Responses


portfolioBenchmarkGet

Portfolio benchmarking

Benchmark a portfolio against another instrument e.g. the S&P 500. The following analytics are provided for the portfolio: - **Alpha** measures the amount that the investment has returned in comparison to the benchmark that it is compared against. Alpha is expressed in log returns and is returned as a term structure across six horizons (alpha_by_horizon: daily, weekly, monthly, quarterly, year-to-date and yearly); it supersedes the former single scalar. The annualised figure is the `year` value, also surfaced as `print_alpha`. As an example, a daily alpha of 0.01 means the portfolio outperforms the benchmark by 1% on average daily. - **Beta** is an indication of the volatility of the instrument in comparison with the benchmark. The benchmark commonly is the S&P 500 as a proxy measurement for the market. The baseline number for beta is one, which indicates that the instrument's price moves exactly as the market moves. A beta of less than 1 means that the instrument is less volatile than the market, while a beta greater than 1 indicates that its price is more volatile than the market e.g. a beta of 1.5 is considered to be 50% more volatile than the overall market. - **Idiosyncratic risk** is the portion of the portfolio which is uncorrelated to the benchmark e.g. sectorial trends, geopolitics etc. The term "risk" here is misleading. A high idiosyncratic risk just means the investment is not correlated with the benchmark. It is expressed as a return percentage and is returned across all six horizons (daily, weekly, monthly, quarterly, year-to-date and yearly). - **Risk analytics** (VAR, CVAR and volatility) are returned per horizon: - **CVAR**: expected average loss in the worst-case tail of the loss distribution, returned at the 2.5%, 5% and 10% quantiles (the 0.975, 0.95 and 0.9 confidence levels). - **VAR**: the maximum expected loss over the horizon at a given confidence level, also returned at the 2.5%, 5% and 10% quantiles. VAR identifies the threshold loss that will not be exceeded at a given confidence level, whereas CVAR (Expected Shortfall) measures the average loss beyond that threshold. - VAR and CVAR are published at the daily, weekly and monthly horizons only, whereas **volatility** is returned at all six horizons (daily, weekly, monthly, quarterly, year-to-date and yearly). - **R-squared** measures the proportion of variation in the portfolio that can be explained by the benchmark, indicating how well it fits the benchmark. - **Returns** provides the annualised return of both the input portfolio and the benchmark, allowing for a direct comparison of performance. For bespoke benchmarks, a time serie can be loaded in the platform using the PUT /history endpoint. Its instrument_code (provided by you in the previous endpoint) and your user apiid (see GET /api) can then be used here as the benchmark.


/portfolio/benchmark

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/benchmark?client_reference=clientReference_example&model=model_example&benchmark_instrument_code=SPY_ARCX&benchmark_apiid=8"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
        String model = model_example; // String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
        String benchmarkInstrumentCode = SPY_ARCX; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer benchmarkApiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

        try {
            benchmark result = apiInstance.portfolioBenchmarkGet(clientReference, model, benchmarkInstrumentCode, benchmarkApiid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioBenchmarkGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
final String model = new String(); // String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
final String benchmarkInstrumentCode = new String(); // String | Can be found using the GET /history or GET/history/instrument endpoints
final Integer benchmarkApiid = new Integer(); // Integer | Can be found using the GET /history or GET/history/instrument endpoints

try {
    final result = await api_instance.portfolioBenchmarkGet(clientReference, model, benchmarkInstrumentCode, benchmarkApiid);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioBenchmarkGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
        String model = model_example; // String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
        String benchmarkInstrumentCode = SPY_ARCX; // String | Can be found using the GET /history or GET/history/instrument endpoints
        Integer benchmarkApiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

        try {
            benchmark result = apiInstance.portfolioBenchmarkGet(clientReference, model, benchmarkInstrumentCode, benchmarkApiid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioBenchmarkGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *clientReference = clientReference_example; // Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)
String *model = model_example; // Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark. (default to null)
String *benchmarkInstrumentCode = SPY_ARCX; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)
Integer *benchmarkApiid = 8; // Can be found using the GET /history or GET/history/instrument endpoints (default to null)

// Portfolio benchmarking
[apiInstance portfolioBenchmarkGetWith:clientReference
    model:model
    benchmarkInstrumentCode:benchmarkInstrumentCode
    benchmarkApiid:benchmarkApiid
              completionHandler: ^(benchmark output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var clientReference = clientReference_example; // {String} Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
var model = model_example; // {String} Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
var benchmarkInstrumentCode = SPY_ARCX; // {String} Can be found using the GET /history or GET/history/instrument endpoints
var benchmarkApiid = 8; // {Integer} Can be found using the GET /history or GET/history/instrument endpoints

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioBenchmarkGet(clientReference, model, benchmarkInstrumentCode, benchmarkApiid, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioBenchmarkGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var clientReference = clientReference_example;  // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)
            var model = model_example;  // String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark. (default to null)
            var benchmarkInstrumentCode = SPY_ARCX;  // String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
            var benchmarkApiid = 8;  // Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)

            try {
                // Portfolio benchmarking
                benchmark result = apiInstance.portfolioBenchmarkGet(clientReference, model, benchmarkInstrumentCode, benchmarkApiid);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.portfolioBenchmarkGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
$model = model_example; // String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
$benchmarkInstrumentCode = SPY_ARCX; // String | Can be found using the GET /history or GET/history/instrument endpoints
$benchmarkApiid = 8; // Integer | Can be found using the GET /history or GET/history/instrument endpoints

try {
    $result = $api_instance->portfolioBenchmarkGet($clientReference, $model, $benchmarkInstrumentCode, $benchmarkApiid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->portfolioBenchmarkGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $clientReference = clientReference_example; # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
my $model = model_example; # String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
my $benchmarkInstrumentCode = SPY_ARCX; # String | Can be found using the GET /history or GET/history/instrument endpoints
my $benchmarkApiid = 8; # Integer | Can be found using the GET /history or GET/history/instrument endpoints

eval {
    my $result = $api_instance->portfolioBenchmarkGet(clientReference => $clientReference, model => $model, benchmarkInstrumentCode => $benchmarkInstrumentCode, benchmarkApiid => $benchmarkApiid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->portfolioBenchmarkGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
clientReference = clientReference_example # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)
model = model_example # String | Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark. (default to null)
benchmarkInstrumentCode = SPY_ARCX # String | Can be found using the GET /history or GET/history/instrument endpoints (default to null)
benchmarkApiid = 8 # Integer | Can be found using the GET /history or GET/history/instrument endpoints (default to null)

try:
    # Portfolio benchmarking
    api_response = api_instance.portfolio_benchmark_get(clientReference, model, benchmarkInstrumentCode, benchmarkApiid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->portfolioBenchmarkGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let model = model_example; // String
    let benchmarkInstrumentCode = SPY_ARCX; // String
    let benchmarkApiid = 8; // Integer

    let mut context = AnalyticsApi::Context::default();
    let result = client.portfolioBenchmarkGet(clientReference, model, benchmarkInstrumentCode, benchmarkApiid, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
Required
model*
String
Historical benchmarks the historical performance (PnL) of the portfolio against the benchmark. CapitalAssetPricing provides the betas, etc of the current portfolio composition against the benchmark.
Required
benchmark_instrument_code*
String
Can be found using the GET /history or GET/history/instrument endpoints
Required
benchmark_apiid*
Integer
Can be found using the GET /history or GET/history/instrument endpoints
Required

Responses


portfolioCashflowGet

Portfolio cashflow forecasting

Provides a forecast of the portfolio's cashflow (dividends and coupon payments). The response includes: - **1-year and 5-year forecast summaries** (forecast_1_year and forecast_5_year), each with the period name and end date, the split into interest_amount and dividend_amount, the total_amount, a rate_of_return and a yearly_avg (average yearly cashflow over the period). - **Monthly aggregation** (cashflow_monthly): per-month cashflow totals with the month_ending date and the split between interest and dividend amounts. - **Per-instrument contribution** (contributors): for each instrument, its cashflow amount, instrument_key, and contribution as a fraction (0 to 1) of the total forecast cashflow. - **Cumulative cashflow** (cashflow_cumulative): a date/value series for plotting the growth of cumulative cashflow over time. - **Flat cashflow list** (cashflow): every individual forecast payment with its payment_date, amount, type and instrument_key. - **instrument_map**: resolves each instrument_key to its instrument metadata.


/portfolio/cashflow

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/cashflow?client_reference=clientReference_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

        try {
            cashflow_forecast result = apiInstance.portfolioCashflowGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioCashflowGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

try {
    final result = await api_instance.portfolioCashflowGet(clientReference);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioCashflowGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

        try {
            cashflow_forecast result = apiInstance.portfolioCashflowGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioCashflowGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *clientReference = clientReference_example; // Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)

// Portfolio cashflow forecasting
[apiInstance portfolioCashflowGetWith:clientReference
              completionHandler: ^(cashflow_forecast output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var clientReference = clientReference_example; // {String} Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioCashflowGet(clientReference, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioCashflowGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var clientReference = clientReference_example;  // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)

            try {
                // Portfolio cashflow forecasting
                cashflow_forecast result = apiInstance.portfolioCashflowGet(clientReference);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.portfolioCashflowGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

try {
    $result = $api_instance->portfolioCashflowGet($clientReference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->portfolioCashflowGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $clientReference = clientReference_example; # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

eval {
    my $result = $api_instance->portfolioCashflowGet(clientReference => $clientReference);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->portfolioCashflowGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
clientReference = clientReference_example # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)

try:
    # Portfolio cashflow forecasting
    api_response = api_instance.portfolio_cashflow_get(clientReference)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->portfolioCashflowGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let clientReference = clientReference_example; // String

    let mut context = AnalyticsApi::Context::default();
    let result = client.portfolioCashflowGet(clientReference, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
Required

Responses


portfolioPnlGet

Portfolio PnL

Provides the profit and loss of this portfolio as a time series.


/portfolio/pnl

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/pnl?client_reference=clientReference_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

        try {
            array[_portfolio_pnl_get_200_response_inner] result = apiInstance.portfolioPnlGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioPnlGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

try {
    final result = await api_instance.portfolioPnlGet(clientReference);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioPnlGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

        try {
            array[_portfolio_pnl_get_200_response_inner] result = apiInstance.portfolioPnlGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#portfolioPnlGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *clientReference = clientReference_example; // Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)

// Portfolio PnL
[apiInstance portfolioPnlGetWith:clientReference
              completionHandler: ^(array[_portfolio_pnl_get_200_response_inner] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var clientReference = clientReference_example; // {String} Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioPnlGet(clientReference, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioPnlGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var clientReference = clientReference_example;  // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)

            try {
                // Portfolio PnL
                array[_portfolio_pnl_get_200_response_inner] result = apiInstance.portfolioPnlGet(clientReference);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.portfolioPnlGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

try {
    $result = $api_instance->portfolioPnlGet($clientReference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->portfolioPnlGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $clientReference = clientReference_example; # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint

eval {
    my $result = $api_instance->portfolioPnlGet(clientReference => $clientReference);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->portfolioPnlGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
clientReference = clientReference_example # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)

try:
    # Portfolio PnL
    api_response = api_instance.portfolio_pnl_get(clientReference)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->portfolioPnlGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let clientReference = clientReference_example; // String

    let mut context = AnalyticsApi::Context::default();
    let result = client.portfolioPnlGet(clientReference, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
Required

Responses


strategyGet

View risk strategy(s)

This method provides the detail of one or more strategies. Strategies can be both created using MantaRisk's UI or this API. If a strategyid is provided, the query will return the detail of the specified strategy alongside any analysis that was carried on it. If a strategyid is not provided, the query will return the detail of all strategies but will not provide their associated analysis even if these are presetn in the system.


/strategy

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/strategy?strategy_id=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        Integer strategyId = 56; // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

        try {
            array[strategy_analysis] result = apiInstance.strategyGet(strategyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#strategyGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer strategyId = new Integer(); // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

try {
    final result = await api_instance.strategyGet(strategyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->strategyGet: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        Integer strategyId = 56; // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

        try {
            array[strategy_analysis] result = apiInstance.strategyGet(strategyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#strategyGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
Integer *strategyId = 56; // optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid (optional) (default to null)

// View risk strategy(s)
[apiInstance strategyGetWith:strategyId
              completionHandler: ^(array[strategy_analysis] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var opts = {
  'strategyId': 56 // {Integer} optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.strategyGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class strategyGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var strategyId = 56;  // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid (optional)  (default to null)

            try {
                // View risk strategy(s)
                array[strategy_analysis] result = apiInstance.strategyGet(strategyId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.strategyGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$strategyId = 56; // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

try {
    $result = $api_instance->strategyGet($strategyId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->strategyGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $strategyId = 56; # Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

eval {
    my $result = $api_instance->strategyGet(strategyId => $strategyId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->strategyGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
strategyId = 56 # Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid (optional) (default to null)

try:
    # View risk strategy(s)
    api_response = api_instance.strategy_get(strategyId=strategyId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AnalyticsApi->strategyGet: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let strategyId = 56; // Integer

    let mut context = AnalyticsApi::Context::default();
    let result = client.strategyGet(strategyId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
strategy_id
Integer
optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

Responses


strategyPost

Analyse a strategy

Trigger the analysis of the given strategy against all portfolios held within this account. The analysis is run asynchronously. The % completion of the analysis can be obtained through the /strategy GET method.


/strategy

Usage and SDK Samples

curl -X POST \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/strategy?strategy_id=strategyId_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AnalyticsApi;

import java.io.File;
import java.util.*;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        AnalyticsApi apiInstance = new AnalyticsApi();
        String strategyId = strategyId_example; // String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid

        try {
            apiInstance.strategyPost(strategyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#strategyPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String strategyId = new String(); // String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid

try {
    final result = await api_instance.strategyPost(strategyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->strategyPost: $e\n');
}

import org.openapitools.client.api.AnalyticsApi;

public class AnalyticsApiExample {
    public static void main(String[] args) {
        AnalyticsApi apiInstance = new AnalyticsApi();
        String strategyId = strategyId_example; // String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid

        try {
            apiInstance.strategyPost(strategyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AnalyticsApi#strategyPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
AnalyticsApi *apiInstance = [[AnalyticsApi alloc] init];
String *strategyId = strategyId_example; // the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid (default to null)

// Analyse a strategy
[apiInstance strategyPostWith:strategyId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.AnalyticsApi()
var strategyId = strategyId_example; // {String} the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.strategyPost(strategyId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class strategyPostExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new AnalyticsApi();
            var strategyId = strategyId_example;  // String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid (default to null)

            try {
                // Analyse a strategy
                apiInstance.strategyPost(strategyId);
            } catch (Exception e) {
                Debug.Print("Exception when calling AnalyticsApi.strategyPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\AnalyticsApi();
$strategyId = strategyId_example; // String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid

try {
    $api_instance->strategyPost($strategyId);
} catch (Exception $e) {
    echo 'Exception when calling AnalyticsApi->strategyPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::AnalyticsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::AnalyticsApi->new();
my $strategyId = strategyId_example; # String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid

eval {
    $api_instance->strategyPost(strategyId => $strategyId);
};
if ($@) {
    warn "Exception when calling AnalyticsApi->strategyPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.AnalyticsApi()
strategyId = strategyId_example # String | the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid (default to null)

try:
    # Analyse a strategy
    api_instance.strategy_post(strategyId)
except ApiException as e:
    print("Exception when calling AnalyticsApi->strategyPost: %s\n" % e)
extern crate AnalyticsApi;

pub fn main() {
    let strategyId = strategyId_example; // String

    let mut context = AnalyticsApi::Context::default();
    let result = client.strategyPost(strategyId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
strategy_id*
String
the strategy_id can be found on the MantaRisk UI or by using the /strategy GET method without specifying a strategyid
Required

Responses


HypotheticalStressTesting

referenceFactorsGet

List factors for hypothetical stress testing

List of factors which can be used to create hypothetical test scenarios


/reference/factors

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/reference/factors"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HypotheticalStressTestingApi;

import java.io.File;
import java.util.*;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();

        try {
            apiInstance.referenceFactorsGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#referenceFactorsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.referenceFactorsGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->referenceFactorsGet: $e\n');
}

import org.openapitools.client.api.HypotheticalStressTestingApi;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();

        try {
            apiInstance.referenceFactorsGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#referenceFactorsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
HypotheticalStressTestingApi *apiInstance = [[HypotheticalStressTestingApi alloc] init];

// List factors for hypothetical stress testing
[apiInstance referenceFactorsGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.HypotheticalStressTestingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.referenceFactorsGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class referenceFactorsGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new HypotheticalStressTestingApi();

            try {
                // List factors for hypothetical stress testing
                apiInstance.referenceFactorsGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling HypotheticalStressTestingApi.referenceFactorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HypotheticalStressTestingApi();

try {
    $api_instance->referenceFactorsGet();
} catch (Exception $e) {
    echo 'Exception when calling HypotheticalStressTestingApi->referenceFactorsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HypotheticalStressTestingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HypotheticalStressTestingApi->new();

eval {
    $api_instance->referenceFactorsGet();
};
if ($@) {
    warn "Exception when calling HypotheticalStressTestingApi->referenceFactorsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.HypotheticalStressTestingApi()

try:
    # List factors for hypothetical stress testing
    api_instance.reference_factors_get()
except ApiException as e:
    print("Exception when calling HypotheticalStressTestingApi->referenceFactorsGet: %s\n" % e)
extern crate HypotheticalStressTestingApi;

pub fn main() {

    let mut context = HypotheticalStressTestingApi::Context::default();
    let result = client.referenceFactorsGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


stressHypotheticalDelete

Delete a hypothetical scenario

Delete the given hypothetical scenario.


/stress/hypothetical

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 "https://api.mantarisk.com/v1/stress/hypothetical?scenario_name=scenarioName_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HypotheticalStressTestingApi;

import java.io.File;
import java.util.*;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();
        String scenarioName = scenarioName_example; // String | the unique name of the scenario

        try {
            apiInstance.stressHypotheticalDelete(scenarioName);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String scenarioName = new String(); // String | the unique name of the scenario

try {
    final result = await api_instance.stressHypotheticalDelete(scenarioName);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->stressHypotheticalDelete: $e\n');
}

import org.openapitools.client.api.HypotheticalStressTestingApi;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();
        String scenarioName = scenarioName_example; // String | the unique name of the scenario

        try {
            apiInstance.stressHypotheticalDelete(scenarioName);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
HypotheticalStressTestingApi *apiInstance = [[HypotheticalStressTestingApi alloc] init];
String *scenarioName = scenarioName_example; // the unique name of the scenario (default to null)

// Delete a hypothetical scenario
[apiInstance stressHypotheticalDeleteWith:scenarioName
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.HypotheticalStressTestingApi()
var scenarioName = scenarioName_example; // {String} the unique name of the scenario

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.stressHypotheticalDelete(scenarioName, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class stressHypotheticalDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new HypotheticalStressTestingApi();
            var scenarioName = scenarioName_example;  // String | the unique name of the scenario (default to null)

            try {
                // Delete a hypothetical scenario
                apiInstance.stressHypotheticalDelete(scenarioName);
            } catch (Exception e) {
                Debug.Print("Exception when calling HypotheticalStressTestingApi.stressHypotheticalDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HypotheticalStressTestingApi();
$scenarioName = scenarioName_example; // String | the unique name of the scenario

try {
    $api_instance->stressHypotheticalDelete($scenarioName);
} catch (Exception $e) {
    echo 'Exception when calling HypotheticalStressTestingApi->stressHypotheticalDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HypotheticalStressTestingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HypotheticalStressTestingApi->new();
my $scenarioName = scenarioName_example; # String | the unique name of the scenario

eval {
    $api_instance->stressHypotheticalDelete(scenarioName => $scenarioName);
};
if ($@) {
    warn "Exception when calling HypotheticalStressTestingApi->stressHypotheticalDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.HypotheticalStressTestingApi()
scenarioName = scenarioName_example # String | the unique name of the scenario (default to null)

try:
    # Delete a hypothetical scenario
    api_instance.stress_hypothetical_delete(scenarioName)
except ApiException as e:
    print("Exception when calling HypotheticalStressTestingApi->stressHypotheticalDelete: %s\n" % e)
extern crate HypotheticalStressTestingApi;

pub fn main() {
    let scenarioName = scenarioName_example; // String

    let mut context = HypotheticalStressTestingApi::Context::default();
    let result = client.stressHypotheticalDelete(scenarioName, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
scenario_name*
String
the unique name of the scenario
Required

Responses


stressHypotheticalGet

List hypothetical scenarios

Returns the list of scenarios available for hypothetical stress testing.


/stress/hypothetical

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/stress/hypothetical"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HypotheticalStressTestingApi;

import java.io.File;
import java.util.*;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();

        try {
            array[hypothetical_scenario] result = apiInstance.stressHypotheticalGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.stressHypotheticalGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->stressHypotheticalGet: $e\n');
}

import org.openapitools.client.api.HypotheticalStressTestingApi;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();

        try {
            array[hypothetical_scenario] result = apiInstance.stressHypotheticalGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
HypotheticalStressTestingApi *apiInstance = [[HypotheticalStressTestingApi alloc] init];

// List hypothetical scenarios
[apiInstance stressHypotheticalGetWithCompletionHandler: 
              ^(array[hypothetical_scenario] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.HypotheticalStressTestingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.stressHypotheticalGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class stressHypotheticalGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new HypotheticalStressTestingApi();

            try {
                // List hypothetical scenarios
                array[hypothetical_scenario] result = apiInstance.stressHypotheticalGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling HypotheticalStressTestingApi.stressHypotheticalGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HypotheticalStressTestingApi();

try {
    $result = $api_instance->stressHypotheticalGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HypotheticalStressTestingApi->stressHypotheticalGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HypotheticalStressTestingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HypotheticalStressTestingApi->new();

eval {
    my $result = $api_instance->stressHypotheticalGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HypotheticalStressTestingApi->stressHypotheticalGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.HypotheticalStressTestingApi()

try:
    # List hypothetical scenarios
    api_response = api_instance.stress_hypothetical_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HypotheticalStressTestingApi->stressHypotheticalGet: %s\n" % e)
extern crate HypotheticalStressTestingApi;

pub fn main() {

    let mut context = HypotheticalStressTestingApi::Context::default();
    let result = client.stressHypotheticalGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


stressHypotheticalPost

Run a hypothetical stress test

Run a hypothetical stress test on the given portfolio, for the given scenario and time horizon. The response returns: - **Return comparison**: the portfolio's hypothetical_return under the scenario alongside the original_return (the current expected return as an exponentially weighted moving average), so the stressed and current figures can be compared directly. - **Per-instrument impact** (instruments): for each instrument, its absolute impact on expected returns under the scenario and its hypothetical_contribution, with instrument_map resolving each instrument_key to its metadata. - **Per-factor contribution** (factors): a breakdown by risk factor (geographic, sector, etc.) giving each factor's original_contribution versus its hypothetical_contribution to expected returns under the scenario.


/stress/hypothetical

Usage and SDK Samples

curl -X POST \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/stress/hypothetical?client_reference=clientReference_example&scenario_name=scenarioName_example&horizon=horizon_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HypotheticalStressTestingApi;

import java.io.File;
import java.util.*;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();
        String clientReference = clientReference_example; // String | The unique reference of the portfolio
        String scenarioName = scenarioName_example; // String | The unique name of the scenario
        String horizon = horizon_example; // String | Horizon of the analysis.

        try {
            _stress_hypothetical_post_200_response result = apiInstance.stressHypotheticalPost(clientReference, scenarioName, horizon);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | The unique reference of the portfolio
final String scenarioName = new String(); // String | The unique name of the scenario
final String horizon = new String(); // String | Horizon of the analysis.

try {
    final result = await api_instance.stressHypotheticalPost(clientReference, scenarioName, horizon);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->stressHypotheticalPost: $e\n');
}

import org.openapitools.client.api.HypotheticalStressTestingApi;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();
        String clientReference = clientReference_example; // String | The unique reference of the portfolio
        String scenarioName = scenarioName_example; // String | The unique name of the scenario
        String horizon = horizon_example; // String | Horizon of the analysis.

        try {
            _stress_hypothetical_post_200_response result = apiInstance.stressHypotheticalPost(clientReference, scenarioName, horizon);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
HypotheticalStressTestingApi *apiInstance = [[HypotheticalStressTestingApi alloc] init];
String *clientReference = clientReference_example; // The unique reference of the portfolio (default to null)
String *scenarioName = scenarioName_example; // The unique name of the scenario (default to null)
String *horizon = horizon_example; // Horizon of the analysis. (optional) (default to year)

// Run a hypothetical stress test
[apiInstance stressHypotheticalPostWith:clientReference
    scenarioName:scenarioName
    horizon:horizon
              completionHandler: ^(_stress_hypothetical_post_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.HypotheticalStressTestingApi()
var clientReference = clientReference_example; // {String} The unique reference of the portfolio
var scenarioName = scenarioName_example; // {String} The unique name of the scenario
var opts = {
  'horizon': horizon_example // {String} Horizon of the analysis.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.stressHypotheticalPost(clientReference, scenarioName, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class stressHypotheticalPostExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new HypotheticalStressTestingApi();
            var clientReference = clientReference_example;  // String | The unique reference of the portfolio (default to null)
            var scenarioName = scenarioName_example;  // String | The unique name of the scenario (default to null)
            var horizon = horizon_example;  // String | Horizon of the analysis. (optional)  (default to year)

            try {
                // Run a hypothetical stress test
                _stress_hypothetical_post_200_response result = apiInstance.stressHypotheticalPost(clientReference, scenarioName, horizon);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling HypotheticalStressTestingApi.stressHypotheticalPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HypotheticalStressTestingApi();
$clientReference = clientReference_example; // String | The unique reference of the portfolio
$scenarioName = scenarioName_example; // String | The unique name of the scenario
$horizon = horizon_example; // String | Horizon of the analysis.

try {
    $result = $api_instance->stressHypotheticalPost($clientReference, $scenarioName, $horizon);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HypotheticalStressTestingApi->stressHypotheticalPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HypotheticalStressTestingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HypotheticalStressTestingApi->new();
my $clientReference = clientReference_example; # String | The unique reference of the portfolio
my $scenarioName = scenarioName_example; # String | The unique name of the scenario
my $horizon = horizon_example; # String | Horizon of the analysis.

eval {
    my $result = $api_instance->stressHypotheticalPost(clientReference => $clientReference, scenarioName => $scenarioName, horizon => $horizon);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling HypotheticalStressTestingApi->stressHypotheticalPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.HypotheticalStressTestingApi()
clientReference = clientReference_example # String | The unique reference of the portfolio (default to null)
scenarioName = scenarioName_example # String | The unique name of the scenario (default to null)
horizon = horizon_example # String | Horizon of the analysis. (optional) (default to year)

try:
    # Run a hypothetical stress test
    api_response = api_instance.stress_hypothetical_post(clientReference, scenarioName, horizon=horizon)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling HypotheticalStressTestingApi->stressHypotheticalPost: %s\n" % e)
extern crate HypotheticalStressTestingApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let scenarioName = scenarioName_example; // String
    let horizon = horizon_example; // String

    let mut context = HypotheticalStressTestingApi::Context::default();
    let result = client.stressHypotheticalPost(clientReference, scenarioName, horizon, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
The unique reference of the portfolio
Required
scenario_name*
String
The unique name of the scenario
Required
horizon
String
Horizon of the analysis.

Responses


stressHypotheticalPut

Save a hypothetical scenario

Add a hypothetical scenario into MantaRisk


/stress/hypothetical

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/stress/hypothetical" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.HypotheticalStressTestingApi;

import java.io.File;
import java.util.*;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();
        HypotheticalScenario hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]}; // HypotheticalScenario | 

        try {
            apiInstance.stressHypotheticalPut(hypotheticalScenario);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final HypotheticalScenario hypotheticalScenario = new HypotheticalScenario(); // HypotheticalScenario | 

try {
    final result = await api_instance.stressHypotheticalPut(hypotheticalScenario);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->stressHypotheticalPut: $e\n');
}

import org.openapitools.client.api.HypotheticalStressTestingApi;

public class HypotheticalStressTestingApiExample {
    public static void main(String[] args) {
        HypotheticalStressTestingApi apiInstance = new HypotheticalStressTestingApi();
        HypotheticalScenario hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]}; // HypotheticalScenario | 

        try {
            apiInstance.stressHypotheticalPut(hypotheticalScenario);
        } catch (ApiException e) {
            System.err.println("Exception when calling HypotheticalStressTestingApi#stressHypotheticalPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
HypotheticalStressTestingApi *apiInstance = [[HypotheticalStressTestingApi alloc] init];
HypotheticalScenario *hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]}; // 

// Save a hypothetical scenario
[apiInstance stressHypotheticalPutWith:hypotheticalScenario
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.HypotheticalStressTestingApi()
var hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]}; // {HypotheticalScenario} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.stressHypotheticalPut(hypotheticalScenario, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class stressHypotheticalPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new HypotheticalStressTestingApi();
            var hypotheticalScenario = new HypotheticalScenario(); // HypotheticalScenario | 

            try {
                // Save a hypothetical scenario
                apiInstance.stressHypotheticalPut(hypotheticalScenario);
            } catch (Exception e) {
                Debug.Print("Exception when calling HypotheticalStressTestingApi.stressHypotheticalPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\HypotheticalStressTestingApi();
$hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]}; // HypotheticalScenario | 

try {
    $api_instance->stressHypotheticalPut($hypotheticalScenario);
} catch (Exception $e) {
    echo 'Exception when calling HypotheticalStressTestingApi->stressHypotheticalPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::HypotheticalStressTestingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::HypotheticalStressTestingApi->new();
my $hypotheticalScenario = WWW::OPenAPIClient::Object::HypotheticalScenario->new(); # HypotheticalScenario | 

eval {
    $api_instance->stressHypotheticalPut(hypotheticalScenario => $hypotheticalScenario);
};
if ($@) {
    warn "Exception when calling HypotheticalStressTestingApi->stressHypotheticalPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.HypotheticalStressTestingApi()
hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]} # HypotheticalScenario | 

try:
    # Save a hypothetical scenario
    api_instance.stress_hypothetical_put(hypotheticalScenario)
except ApiException as e:
    print("Exception when calling HypotheticalStressTestingApi->stressHypotheticalPut: %s\n" % e)
extern crate HypotheticalStressTestingApi;

pub fn main() {
    let hypotheticalScenario = {"scenario_name":"Test Scenario","factors":[{"unique_key":"CSSMI_XSWX_8","hypothetical_contribution":0.1},{"unique_key":"IXN_ARCX_8","hypothetical_contribution":0.2}]}; // HypotheticalScenario

    let mut context = HypotheticalStressTestingApi::Context::default();
    let result = client.stressHypotheticalPut(hypotheticalScenario, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
hypotheticalScenario *

Responses


InstrumentDataManagement

historyApiGet

View data sources

Returns the list of the pricing data providers currently available on this account. The "User Feed" API denotes the API id which must be used to retrieve user inputted pricing data. It is static for a given environment but will differ from environment to environment. Other API ids are static across all environments and are provided by MantaRisk when searching for an instrument.


/history/api

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history/api"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();

        try {
            apiInstance.historyApiGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyApiGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.historyApiGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyApiGet: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();

        try {
            apiInstance.historyApiGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyApiGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];

// View data sources
[apiInstance historyApiGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.historyApiGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyApiGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();

            try {
                // View data sources
                apiInstance.historyApiGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyApiGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();

try {
    $api_instance->historyApiGet();
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyApiGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();

eval {
    $api_instance->historyApiGet();
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyApiGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()

try:
    # View data sources
    api_instance.history_api_get()
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyApiGet: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyApiGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


historyCoveragePut

Find best instrument match

Allows a user to confirm coverage for isin / currency or cusip / country pairs. This endpoint returns the best matching instrument, looking at exchange priority and also data quality. The **results should be stored by the user** and re-used with the rest of the API. **Choosing the right `Content-Type`:** when `format_input=JSON` (the default) send `Content-Type: application/json` with a JSON array body. When `format_input=CSV` the request **must** use `Content-Type: multipart/form-data` with the CSV uploaded as a file part — sending CSV as a raw `application/json` body is rejected by the server. Example `curl` for the CSV case: ```bash curl -X PUT "https://api.mantarisk.com/v1/history/coverage?method=ISIN_CURRENCY&format_input=CSV" \ -H "Authorization: Bearer $TOKEN" \ -F "file=@instruments.csv;type=text/csv" ```


/history/coverage

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json,multipart/form-data" \
 "https://api.mantarisk.com/v1/history/coverage?method=method_example&format_input=formatInput_example&format_output=formatOutput_example&user_feed_enabled=true" \
 -d '{
  "currency" : "EUR",
  "isin" : "US0378331005"
}' \
 -d 'Custom MIME type example not yet supported: multipart/form-data'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String method = method_example; // String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).

        array[_history_coverage_put_request_inner] historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}]; // array[_history_coverage_put_request_inner] | 
        String formatInput = formatInput_example; // String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.

        String formatOutput = formatOutput_example; // String | Format of the response from this endpoint.
        Boolean userFeedEnabled = true; // Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.

        try {
            array[coverage_result] result = apiInstance.historyCoveragePut(method, historyCoveragePutRequestInner, formatInput, formatOutput, userFeedEnabled);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyCoveragePut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String method = new String(); // String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).

final array[_history_coverage_put_request_inner] historyCoveragePutRequestInner = new array[_history_coverage_put_request_inner](); // array[_history_coverage_put_request_inner] | 
final String formatInput = new String(); // String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.

final String formatOutput = new String(); // String | Format of the response from this endpoint.
final Boolean userFeedEnabled = new Boolean(); // Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.

try {
    final result = await api_instance.historyCoveragePut(method, historyCoveragePutRequestInner, formatInput, formatOutput, userFeedEnabled);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyCoveragePut: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String method = method_example; // String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).

        array[_history_coverage_put_request_inner] historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}]; // array[_history_coverage_put_request_inner] | 
        String formatInput = formatInput_example; // String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.

        String formatOutput = formatOutput_example; // String | Format of the response from this endpoint.
        Boolean userFeedEnabled = true; // Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.

        try {
            array[coverage_result] result = apiInstance.historyCoveragePut(method, historyCoveragePutRequestInner, formatInput, formatOutput, userFeedEnabled);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyCoveragePut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
String *method = method_example; // **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).
 (default to ISIN_CURRENCY)
array[_history_coverage_put_request_inner] *historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}]; // 
String *formatInput = formatInput_example; // Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.
 (optional) (default to JSON)
String *formatOutput = formatOutput_example; // Format of the response from this endpoint. (optional) (default to JSON)
Boolean *userFeedEnabled = true; // If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources. (optional) (default to true)

// Find best instrument match
[apiInstance historyCoveragePutWith:method
    historyCoveragePutRequestInner:historyCoveragePutRequestInner
    formatInput:formatInput
    formatOutput:formatOutput
    userFeedEnabled:userFeedEnabled
              completionHandler: ^(array[coverage_result] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var method = method_example; // {String} **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).

var historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}]; // {array[_history_coverage_put_request_inner]} 
var opts = {
  'formatInput': formatInput_example, // {String} Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.

  'formatOutput': formatOutput_example, // {String} Format of the response from this endpoint.
  'userFeedEnabled': true // {Boolean} If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyCoveragePut(method, historyCoveragePutRequestInner, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyCoveragePutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var method = method_example;  // String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).
 (default to ISIN_CURRENCY)
            var historyCoveragePutRequestInner = new array[_history_coverage_put_request_inner](); // array[_history_coverage_put_request_inner] | 
            var formatInput = formatInput_example;  // String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.
 (optional)  (default to JSON)
            var formatOutput = formatOutput_example;  // String | Format of the response from this endpoint. (optional)  (default to JSON)
            var userFeedEnabled = true;  // Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources. (optional)  (default to true)

            try {
                // Find best instrument match
                array[coverage_result] result = apiInstance.historyCoveragePut(method, historyCoveragePutRequestInner, formatInput, formatOutput, userFeedEnabled);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyCoveragePut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$method = method_example; // String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).

$historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}]; // array[_history_coverage_put_request_inner] | 
$formatInput = formatInput_example; // String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.

$formatOutput = formatOutput_example; // String | Format of the response from this endpoint.
$userFeedEnabled = true; // Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.

try {
    $result = $api_instance->historyCoveragePut($method, $historyCoveragePutRequestInner, $formatInput, $formatOutput, $userFeedEnabled);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyCoveragePut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $method = method_example; # String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).

my $historyCoveragePutRequestInner = [WWW::OPenAPIClient::Object::array[_history_coverage_put_request_inner]->new()]; # array[_history_coverage_put_request_inner] | 
my $formatInput = formatInput_example; # String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.

my $formatOutput = formatOutput_example; # String | Format of the response from this endpoint.
my $userFeedEnabled = true; # Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.

eval {
    my $result = $api_instance->historyCoveragePut(method => $method, historyCoveragePutRequestInner => $historyCoveragePutRequestInner, formatInput => $formatInput, formatOutput => $formatOutput, userFeedEnabled => $userFeedEnabled);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyCoveragePut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
method = method_example # String | **ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns.
- International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security.
- Currency is the 3 alpha code following the ISO 4217 standard.

**CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns.
- Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities.
- Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).
 (default to ISIN_CURRENCY)
historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}] # array[_history_coverage_put_request_inner] | 
formatInput = formatInput_example # String | Format of the data passed in the body of this call. The format determines the required `Content-Type`:

- **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`.
- **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.
 (optional) (default to JSON)
formatOutput = formatOutput_example # String | Format of the response from this endpoint. (optional) (default to JSON)
userFeedEnabled = true # Boolean | If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources. (optional) (default to true)

try:
    # Find best instrument match
    api_response = api_instance.history_coverage_put(method, historyCoveragePutRequestInner, formatInput=formatInput, formatOutput=formatOutput, userFeedEnabled=userFeedEnabled)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyCoveragePut: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let method = method_example; // String
    let historyCoveragePutRequestInner = [{"isin":"US0378331005","currency":"USD"},{"isin":"US4592001014","currency":"USD"}]; // array[_history_coverage_put_request_inner]
    let formatInput = formatInput_example; // String
    let formatOutput = formatOutput_example; // String
    let userFeedEnabled = true; // Boolean

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyCoveragePut(method, historyCoveragePutRequestInner, formatInput, formatOutput, userFeedEnabled, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
historyCoveragePutRequestInner *

The body must match `format_input`: - When `format_input=JSON`, send a JSON array with `Content-Type: application/json`. - When `format_input=CSV`, send a `multipart/form-data` request with the CSV file as a file part. Sending CSV with `Content-Type: application/json` will fail server-side with `InvalidContentTypeException` ("the request doesn't contain a multipart/form-data or multipart/mixed stream"). Maximum upload size is 1 MB.

Query parameters
Name Description
method*
String
**ISIN_CURRENCY**, as an input, the JSON is an array of {isin, currency} objects and the CSV has isin and currency columns. - International Securities Identification Number (ISIN): 12-digit alphanumeric code that uniquely identifies a specific security. - Currency is the 3 alpha code following the ISO 4217 standard. **CUSIP_COUNTRY**, as an input, the JSON is an arry of {cusip, country} objects and the CSV has cusip and country columns. - Committee on Uniform Securities Identification Procedures (CUSIP): a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities. - Country is either US for US stocks or CA for Canadians stocks (ISO 3166 standard).
Required
format_input
String
Format of the data passed in the body of this call. The format determines the required `Content-Type`: - **JSON** (default) — send the payload as a JSON array in the request body with `Content-Type: application/json`. - **CSV** — the CSV data **cannot** be sent as a raw `application/json` body (this will fail with `InvalidContentTypeException`). It must be uploaded as a file part in a `multipart/form-data` request. The CSV file must include a header row matching the chosen `method` (`isin,currency` for `ISIN_CURRENCY`, `cusip,country` for `CUSIP_COUNTRY`). The form field name is not enforced — any file part is accepted; the first part with a `filename` in its `Content-Disposition` header is read.
format_output
String
Format of the response from this endpoint.
user_feed_enabled
Boolean
If false, does not take into account instruments created by the user (PUT /history). If true, coverage will try to match user instruments first and then instruments from MantaRisk's data sources.

Responses


historyDelete

Delete instrument data

Delete all data associated with this (user created) instrument.


/history

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history?instrument_code=instrumentCode_example&all_data=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String instrumentCode = instrumentCode_example; // String | 
        Boolean allData = true; // Boolean | if true, delete all historical data associated with this account. Use with care

        try {
            apiInstance.historyDelete(instrumentCode, allData);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String instrumentCode = new String(); // String | 
final Boolean allData = new Boolean(); // Boolean | if true, delete all historical data associated with this account. Use with care

try {
    final result = await api_instance.historyDelete(instrumentCode, allData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyDelete: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String instrumentCode = instrumentCode_example; // String | 
        Boolean allData = true; // Boolean | if true, delete all historical data associated with this account. Use with care

        try {
            apiInstance.historyDelete(instrumentCode, allData);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
String *instrumentCode = instrumentCode_example; //  (optional) (default to null)
Boolean *allData = true; // if true, delete all historical data associated with this account. Use with care (optional) (default to null)

// Delete instrument data
[apiInstance historyDeleteWith:instrumentCode
    allData:allData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var opts = {
  'instrumentCode': instrumentCode_example, // {String} 
  'allData': true // {Boolean} if true, delete all historical data associated with this account. Use with care
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.historyDelete(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var instrumentCode = instrumentCode_example;  // String |  (optional)  (default to null)
            var allData = true;  // Boolean | if true, delete all historical data associated with this account. Use with care (optional)  (default to null)

            try {
                // Delete instrument data
                apiInstance.historyDelete(instrumentCode, allData);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$instrumentCode = instrumentCode_example; // String | 
$allData = true; // Boolean | if true, delete all historical data associated with this account. Use with care

try {
    $api_instance->historyDelete($instrumentCode, $allData);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $instrumentCode = instrumentCode_example; # String | 
my $allData = true; # Boolean | if true, delete all historical data associated with this account. Use with care

eval {
    $api_instance->historyDelete(instrumentCode => $instrumentCode, allData => $allData);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
instrumentCode = instrumentCode_example # String |  (optional) (default to null)
allData = true # Boolean | if true, delete all historical data associated with this account. Use with care (optional) (default to null)

try:
    # Delete instrument data
    api_instance.history_delete(instrumentCode=instrumentCode, allData=allData)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyDelete: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let instrumentCode = instrumentCode_example; // String
    let allData = true; // Boolean

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyDelete(instrumentCode, allData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
instrument_code
String
all_data
Boolean
if true, delete all historical data associated with this account. Use with care

Responses


historyGet

View instrument data

Obtains the cache status for this instrument. If a timeframe is specified, returns the historical data associated with this instrument and timeframe Note that this endpoint will not return anything other than user inputted data. MantaRisk does not provide an endpoint to obtain historical prices for its own pricing data. The history endpoint allows a user of the API to inject and control its own data into the MantaRisk platform in case 1) the instrument coverage of the platform is not sufficient (e.g. missing instruments) or 2) to input a portfolio's historical performance for further analysis through the platform's analytics.


/history

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history?instrument_code=instrumentCode_example&timeframeid=56&start_date=2013-10-20T19:20:30+01:00¤cy=CHF"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String instrumentCode = instrumentCode_example; // String | 
        Integer timeframeid = 56; // Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
        Date startDate = 2013-10-20T19:20:30+01:00; // Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
        String currency = CHF; // String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.

        try {
            cache_status result = apiInstance.historyGet(instrumentCode, timeframeid, startDate, currency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String instrumentCode = new String(); // String | 
final Integer timeframeid = new Integer(); // Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
final Date startDate = new Date(); // Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
final String currency = new String(); // String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.

try {
    final result = await api_instance.historyGet(instrumentCode, timeframeid, startDate, currency);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyGet: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String instrumentCode = instrumentCode_example; // String | 
        Integer timeframeid = 56; // Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
        Date startDate = 2013-10-20T19:20:30+01:00; // Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
        String currency = CHF; // String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.

        try {
            cache_status result = apiInstance.historyGet(instrumentCode, timeframeid, startDate, currency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
String *instrumentCode = instrumentCode_example; //  (default to null)
Integer *timeframeid = 56; // 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes) (optional) (default to null)
Date *startDate = 2013-10-20T19:20:30+01:00; // start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z (optional) (default to null)
String *currency = CHF; // if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency. (optional) (default to null)

// View instrument data
[apiInstance historyGetWith:instrumentCode
    timeframeid:timeframeid
    startDate:startDate
    currency:currency
              completionHandler: ^(cache_status output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var instrumentCode = instrumentCode_example; // {String} 
var opts = {
  'timeframeid': 56, // {Integer} 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
  'startDate': 2013-10-20T19:20:30+01:00, // {Date} start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
  'currency': CHF // {String} if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyGet(instrumentCode, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var instrumentCode = instrumentCode_example;  // String |  (default to null)
            var timeframeid = 56;  // Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes) (optional)  (default to null)
            var startDate = 2013-10-20T19:20:30+01:00;  // Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z (optional)  (default to null)
            var currency = CHF;  // String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency. (optional)  (default to null)

            try {
                // View instrument data
                cache_status result = apiInstance.historyGet(instrumentCode, timeframeid, startDate, currency);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$instrumentCode = instrumentCode_example; // String | 
$timeframeid = 56; // Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
$startDate = 2013-10-20T19:20:30+01:00; // Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
$currency = CHF; // String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.

try {
    $result = $api_instance->historyGet($instrumentCode, $timeframeid, $startDate, $currency);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $instrumentCode = instrumentCode_example; # String | 
my $timeframeid = 56; # Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
my $startDate = 2013-10-20T19:20:30+01:00; # Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
my $currency = CHF; # String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.

eval {
    my $result = $api_instance->historyGet(instrumentCode => $instrumentCode, timeframeid => $timeframeid, startDate => $startDate, currency => $currency);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
instrumentCode = instrumentCode_example # String |  (default to null)
timeframeid = 56 # Integer | 0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes) (optional) (default to null)
startDate = 2013-10-20T19:20:30+01:00 # Date | start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z (optional) (default to null)
currency = CHF # String | if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency. (optional) (default to null)

try:
    # View instrument data
    api_response = api_instance.history_get(instrumentCode, timeframeid=timeframeid, startDate=startDate, currency=currency)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyGet: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let instrumentCode = instrumentCode_example; // String
    let timeframeid = 56; // Integer
    let startDate = 2013-10-20T19:20:30+01:00; // Date
    let currency = CHF; // String

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyGet(instrumentCode, timeframeid, startDate, currency, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
instrument_code*
String
Required
timeframeid
Integer
0 (week), 1 (day), 2 (2 hours), 3 (1 hour), 4 (15 minutes)
start_date
Date (date-time)
start of the period in RFC 3339 section 5.6 format e.g. 2019-10-12T07:20:50Z
currency
String (string)
if not specified, the historical data is returned in its local currency. If specified, it is converted to the given currency.

Responses


historyInstrumentGet

Search for an instrument

Allows a user to search the instruments available within the platform. This includes user fed instruments as well as the instrument coverage provided directly by MantaRisk. The results are ordered from the most likely primary exchange to the least.


/history/instrument

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history/instrument?searchstring=searchstring_example&symbol=AAPL&mic_code=XNGS&isin=US0378331005¤cy=USD"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String searchstring = searchstring_example; // String | Name or symbol of the instrument - excludes Fixed Income.
        String symbol = AAPL; // String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income.
        String micCode = XNGS; // String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
        String isin = US0378331005; // String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities

        String currency = USD; // String | Currency of the instrument - helps filtering if there are multiple results

        try {
            array[instrument] result = apiInstance.historyInstrumentGet(searchstring, symbol, micCode, isin, currency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyInstrumentGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String searchstring = new String(); // String | Name or symbol of the instrument - excludes Fixed Income.
final String symbol = new String(); // String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income.
final String micCode = new String(); // String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
final String isin = new String(); // String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities

final String currency = new String(); // String | Currency of the instrument - helps filtering if there are multiple results

try {
    final result = await api_instance.historyInstrumentGet(searchstring, symbol, micCode, isin, currency);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyInstrumentGet: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String searchstring = searchstring_example; // String | Name or symbol of the instrument - excludes Fixed Income.
        String symbol = AAPL; // String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income.
        String micCode = XNGS; // String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
        String isin = US0378331005; // String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities

        String currency = USD; // String | Currency of the instrument - helps filtering if there are multiple results

        try {
            array[instrument] result = apiInstance.historyInstrumentGet(searchstring, symbol, micCode, isin, currency);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyInstrumentGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
String *searchstring = searchstring_example; // Name or symbol of the instrument - excludes Fixed Income. (optional) (default to null)
String *symbol = AAPL; // Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income. (optional) (default to null)
String *micCode = XNGS; // Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments. (optional) (default to null)
String *isin = US0378331005; // EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities
 (optional) (default to null)
String *currency = USD; // Currency of the instrument - helps filtering if there are multiple results (optional) (default to null)

// Search for an instrument
[apiInstance historyInstrumentGetWith:searchstring
    symbol:symbol
    micCode:micCode
    isin:isin
    currency:currency
              completionHandler: ^(array[instrument] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var opts = {
  'searchstring': searchstring_example, // {String} Name or symbol of the instrument - excludes Fixed Income.
  'symbol': AAPL, // {String} Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income.
  'micCode': XNGS, // {String} Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
  'isin': US0378331005, // {String} EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities

  'currency': USD // {String} Currency of the instrument - helps filtering if there are multiple results
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyInstrumentGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyInstrumentGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var searchstring = searchstring_example;  // String | Name or symbol of the instrument - excludes Fixed Income. (optional)  (default to null)
            var symbol = AAPL;  // String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income. (optional)  (default to null)
            var micCode = XNGS;  // String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments. (optional)  (default to null)
            var isin = US0378331005;  // String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities
 (optional)  (default to null)
            var currency = USD;  // String | Currency of the instrument - helps filtering if there are multiple results (optional)  (default to null)

            try {
                // Search for an instrument
                array[instrument] result = apiInstance.historyInstrumentGet(searchstring, symbol, micCode, isin, currency);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyInstrumentGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$searchstring = searchstring_example; // String | Name or symbol of the instrument - excludes Fixed Income.
$symbol = AAPL; // String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income.
$micCode = XNGS; // String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
$isin = US0378331005; // String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities

$currency = USD; // String | Currency of the instrument - helps filtering if there are multiple results

try {
    $result = $api_instance->historyInstrumentGet($searchstring, $symbol, $micCode, $isin, $currency);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyInstrumentGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $searchstring = searchstring_example; # String | Name or symbol of the instrument - excludes Fixed Income.
my $symbol = AAPL; # String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income.
my $micCode = XNGS; # String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
my $isin = US0378331005; # String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities

my $currency = USD; # String | Currency of the instrument - helps filtering if there are multiple results

eval {
    my $result = $api_instance->historyInstrumentGet(searchstring => $searchstring, symbol => $symbol, micCode => $micCode, isin => $isin, currency => $currency);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyInstrumentGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
searchstring = searchstring_example # String | Name or symbol of the instrument - excludes Fixed Income. (optional) (default to null)
symbol = AAPL # String | Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc  - excludes Fixed Income. (optional) (default to null)
micCode = XNGS # String | Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments. (optional) (default to null)
isin = US0378331005 # String | EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security

OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities
 (optional) (default to null)
currency = USD # String | Currency of the instrument - helps filtering if there are multiple results (optional) (default to null)

try:
    # Search for an instrument
    api_response = api_instance.history_instrument_get(searchstring=searchstring, symbol=symbol, micCode=micCode, isin=isin, currency=currency)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyInstrumentGet: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let searchstring = searchstring_example; // String
    let symbol = AAPL; // String
    let micCode = XNGS; // String
    let isin = US0378331005; // String
    let currency = USD; // String

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyInstrumentGet(searchstring, symbol, micCode, isin, currency, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
searchstring
String
Name or symbol of the instrument - excludes Fixed Income.
symbol
String
Symbol ticker of the instrument e.g. AAPL, EUR/USD, etc - excludes Fixed Income.
mic_code
String
Market Identifier Code (MIC) under ISO 10383 standard. Allows to filter based on a specific exchange. Only valid for exchange traded instruments.
isin
String
EITHER International Securities Identification Number (ISIN) - 12-digit alphanumeric code that uniquely identifies a specific security OR CUSIP - a 9-character alphanumeric identifier used to uniquely identify US and Canadian securities
currency
String
Currency of the instrument - helps filtering if there are multiple results

Responses


historyPut

Save instrument data

This endpoint allows users to input their own bespoke instruments. The user has the choice to input the historical pricing data or use a proxy instrument. In the case of FixedIncome instruments, MantaRisk will reprice the instrument if neither historical data nor proxy has been provided. See [Loading Your Own Instruments](https://docs.mantarisk.com/loading-your-own-instruments) for more details. When providing historical data, the following needs to be taken into consideration: - the data must be adjusted for dividends and splits where relevant - for fixed income instruments the historical data is assumed to be the "clean" data i.e. without interest payments as these are specified in the instrument object. More information on how the proxy mechanism works is provided [here](https://docs.mantarisk.com/loading-your-own-instruments#3-proxy). This endpoint can also be used to create synthetic instruments. Examples include: - For blended benchmarks. More information on this is provided [here](https://docs.mantarisk.com/composite-blended-benchmarks) - Representing a portfolio's PnL to be benchmarked against another instrument


/history

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/history?top_up=true" \
 -d '{
  "proxy" : "",
  "instrument" : {
    "instrument_code" : "AAPL_XNGS",
    "asset_class" : "E",
    "currency" : "USD",
    "name" : "Apple Inc",
    "identifiers" : {
      "symbol" : "AAPL",
      "isin" : "US0378331005",
      "figi" : "BBG000B9Y5X2"
    },
    "exchange" : {
      "mic_code" : "XNGS"
    },
    "classification" : {
      "sector" : "Information Technology",
      "industry" : "Consumer Electronics",
      "primary_country" : "United States"
    },
    "margin_data" : {
      "deposit_factor" : 1
    }
  },
  "history" : [ {
    "datetime" : "2023-10-27T11:20:17Z",
    "open" : 100,
    "high" : 120.1,
    "low" : 99.2,
    "close" : 111.1,
    "volume" : 231654
  }, {
    "datetime" : "2023-10-27T11:20:17Z",
    "open" : 100,
    "high" : 120.1,
    "low" : 99.2,
    "close" : 111.1,
    "volume" : 231654
  } ],
  "timeframe_id" : 0
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        array[historical_data] historicalData = ; // array[historical_data] | 
        Boolean topUp = true; // Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.

        try {
            apiInstance.historyPut(historicalData, topUp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[historical_data] historicalData = new array[historical_data](); // array[historical_data] | 
final Boolean topUp = new Boolean(); // Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.

try {
    final result = await api_instance.historyPut(historicalData, topUp);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyPut: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        array[historical_data] historicalData = ; // array[historical_data] | 
        Boolean topUp = true; // Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.

        try {
            apiInstance.historyPut(historicalData, topUp);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
array[historical_data] *historicalData = ; // 
Boolean *topUp = true; // When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history. (optional) (default to false)

// Save instrument data
[apiInstance historyPutWith:historicalData
    topUp:topUp
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var historicalData = ; // {array[historical_data]} 
var opts = {
  'topUp': true // {Boolean} When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.historyPut(historicalData, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var historicalData = new array[historical_data](); // array[historical_data] | 
            var topUp = true;  // Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history. (optional)  (default to false)

            try {
                // Save instrument data
                apiInstance.historyPut(historicalData, topUp);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$historicalData = ; // array[historical_data] | 
$topUp = true; // Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.

try {
    $api_instance->historyPut($historicalData, $topUp);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $historicalData = [WWW::OPenAPIClient::Object::array[historical_data]->new()]; # array[historical_data] | 
my $topUp = true; # Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.

eval {
    $api_instance->historyPut(historicalData => $historicalData, topUp => $topUp);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
historicalData =  # array[historical_data] | 
topUp = true # Boolean | When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved.

Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history. (optional) (default to false)

try:
    # Save instrument data
    api_instance.history_put(historicalData, topUp=topUp)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyPut: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let historicalData = ; // array[historical_data]
    let topUp = true; // Boolean

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyPut(historicalData, topUp, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
historicalData *

Historical data

Query parameters
Name Description
top_up
Boolean
When false (default), every historical bar for the instrument is wiped before the new payload is written, so the payload becomes the complete series. When true, only bars on or after the payload's oldest date are replaced; older bars are preserved. Note: with `top_up=false` the wipe and the write run in two separate transactions. If the write fails after the wipe has committed, the instrument is left with no history.

Responses


historyScreenerDictionariesGet

Screener filter dictionaries

The filter vocabularies a screener UI needs to paint its filter panel: provider ids paired with human labels. Keys are friendly names, deliberately decoupled from the raw provider filter field names (`emitent_type`, `kind_id`, …) that a screener query still sends as `field`s. `universe=equity` returns the equity `exchanges` list only. Every other value — `bond`, absent, blank, or unrecognised — returns the fixed-income dictionaries; this endpoint does not reject an unknown universe, because that fall-through is also what warms the CBONDS scraping session ahead of a bond screen.


/history/screener/dictionaries

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history/screener/dictionaries?universe=bond"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String universe = bond; // String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.

        try {
            map['String', array[_history_screener_dictionaries_get_200_response_value_inner]] result = apiInstance.historyScreenerDictionariesGet(universe);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyScreenerDictionariesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String universe = new String(); // String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.

try {
    final result = await api_instance.historyScreenerDictionariesGet(universe);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyScreenerDictionariesGet: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        String universe = bond; // String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.

        try {
            map['String', array[_history_screener_dictionaries_get_200_response_value_inner]] result = apiInstance.historyScreenerDictionariesGet(universe);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyScreenerDictionariesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
String *universe = bond; // Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set. (optional) (default to null)

// Screener filter dictionaries
[apiInstance historyScreenerDictionariesGetWith:universe
              completionHandler: ^(map['String', array[_history_screener_dictionaries_get_200_response_value_inner]] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var opts = {
  'universe': bond // {String} Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyScreenerDictionariesGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyScreenerDictionariesGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var universe = bond;  // String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set. (optional)  (default to null)

            try {
                // Screener filter dictionaries
                map['String', array[_history_screener_dictionaries_get_200_response_value_inner]] result = apiInstance.historyScreenerDictionariesGet(universe);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyScreenerDictionariesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$universe = bond; // String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.

try {
    $result = $api_instance->historyScreenerDictionariesGet($universe);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyScreenerDictionariesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $universe = bond; # String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.

eval {
    my $result = $api_instance->historyScreenerDictionariesGet(universe => $universe);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyScreenerDictionariesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
universe = bond # String | Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set. (optional) (default to null)

try:
    # Screener filter dictionaries
    api_response = api_instance.history_screener_dictionaries_get(universe=universe)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyScreenerDictionariesGet: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let universe = bond; // String

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyScreenerDictionariesGet(universe, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
universe
String
Which universe's dictionaries to return. Anything other than `equity` yields the fixed-income set.

Responses


historyScreenerPost

Screen instruments by criteria

Screen an instrument universe by field/operator/value criteria with optional signals, sorting and pagination. A single query targets one universe, given by `universe`: `equity` for listed equities, `bond` for fixed income. The fields available depend on the universe chosen; unsupported field/operator combinations return 400. Sorting always orders the WHOLE matched set, never just the returned page. On `bond`, the fields that can be sorted are a smaller set than the fields that can be filtered: `document` (the issue name), `maturity_date`, `cupon_rate`, `indicative_yield`, `volume_usd`, `announced_volume`, `indicative_price`, `date_of_end_placing`, `liq_index`, plus `isin`, `currency`, `emitent_type` and `nominal_price`. A sort on any other field returns 400 rather than being silently ignored. The last four are ordered by MantaAPI itself over the whole matched set, so the first such request on a given filter set is slower than one the provider sorts.


/history/screener

Usage and SDK Samples

curl -X POST \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/history/screener" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.InstrumentDataManagementApi;

import java.io.File;
import java.util.*;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        ScreenerQuery screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0}; // ScreenerQuery | 

        try {
            _history_screener_post_200_response result = apiInstance.historyScreenerPost(screenerQuery);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyScreenerPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final ScreenerQuery screenerQuery = new ScreenerQuery(); // ScreenerQuery | 

try {
    final result = await api_instance.historyScreenerPost(screenerQuery);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyScreenerPost: $e\n');
}

import org.openapitools.client.api.InstrumentDataManagementApi;

public class InstrumentDataManagementApiExample {
    public static void main(String[] args) {
        InstrumentDataManagementApi apiInstance = new InstrumentDataManagementApi();
        ScreenerQuery screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0}; // ScreenerQuery | 

        try {
            _history_screener_post_200_response result = apiInstance.historyScreenerPost(screenerQuery);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InstrumentDataManagementApi#historyScreenerPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
InstrumentDataManagementApi *apiInstance = [[InstrumentDataManagementApi alloc] init];
ScreenerQuery *screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0}; // 

// Screen instruments by criteria
[apiInstance historyScreenerPostWith:screenerQuery
              completionHandler: ^(_history_screener_post_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.InstrumentDataManagementApi()
var screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0}; // {ScreenerQuery} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.historyScreenerPost(screenerQuery, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyScreenerPostExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new InstrumentDataManagementApi();
            var screenerQuery = new ScreenerQuery(); // ScreenerQuery | 

            try {
                // Screen instruments by criteria
                _history_screener_post_200_response result = apiInstance.historyScreenerPost(screenerQuery);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling InstrumentDataManagementApi.historyScreenerPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\InstrumentDataManagementApi();
$screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0}; // ScreenerQuery | 

try {
    $result = $api_instance->historyScreenerPost($screenerQuery);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstrumentDataManagementApi->historyScreenerPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::InstrumentDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::InstrumentDataManagementApi->new();
my $screenerQuery = WWW::OPenAPIClient::Object::ScreenerQuery->new(); # ScreenerQuery | 

eval {
    my $result = $api_instance->historyScreenerPost(screenerQuery => $screenerQuery);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InstrumentDataManagementApi->historyScreenerPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.InstrumentDataManagementApi()
screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0} # ScreenerQuery | 

try:
    # Screen instruments by criteria
    api_response = api_instance.history_screener_post(screenerQuery)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InstrumentDataManagementApi->historyScreenerPost: %s\n" % e)
extern crate InstrumentDataManagementApi;

pub fn main() {
    let screenerQuery = {"universe":"equity","filters":[{"field":"market_capitalization","operator":">","value":1000000000},{"field":"exchange","operator":"=","value":"us"}],"signals":["200d_new_hi"],"sort":[{"field":"market_capitalization","order":"desc"}],"limit":50,"offset":0}; // ScreenerQuery

    let mut context = InstrumentDataManagementApi::Context::default();
    let result = client.historyScreenerPost(screenerQuery, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
screenerQuery *

Responses


PerformanceAttribution

indexAttributionGet

PAA against index

Our risk and portfolio attribution methodology employs an enhanced Brinson model to decompose risk and performance across five dimensions: sectors, asset classes, domiciles (country), credit ratings and currencies, plus a portfolio-level total. This detailed analysis provides insights into the following key components: - **Allocation Effect**: Measures the performance impact resulting from overweighting or underweighting a category relative to the benchmark. - **Selection Effect**: Quantifies the value added or subtracted by selecting specific securities within each category compared to the benchmark. - **Interaction Effect**: Captures the combined, and often non-additive, performance impact of allocation and selection decisions. - **Risk analytics**: per-category volatility, VaR and CVaR, together with each category's marginal contribution to portfolio volatility, VaR and CVaR, compared against the benchmark. VaR and CVaR are provided at the daily, weekly and monthly horizons. - **Expected returns**: per-category expected-return estimates using four methods (equally and exponentially weighted, sample- and factor-based). - **Daily performance curves**: portfolio_returns_day and benchmark_returns_day, each a daily buy-and-hold growth-of-1 price index anchored at 1.0 over the requested attribution horizon window (recover the horizon return as value[last] - 1).


/index/attribution

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/index/attribution?client_reference=clientReference_example&benchmark_client_reference=composite_benchmark_1&horizon=horizon_example&model=model_example&geometric_excess_returns=true&use_interaction_effect=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PerformanceAttributionApi;

import java.io.File;
import java.util.*;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio under analysis
        String benchmarkClientReference = composite_benchmark_1; // String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
        String horizon = horizon_example; // String | Horizon of the performance attribution analysis.
        String model = model_example; // String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
        Boolean geometricExcessReturns = true; // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
        Boolean useInteractionEffect = true; // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

        try {
            performance_attribution_analysis result = apiInstance.indexAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexAttributionGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | unique identifier for the portfolio under analysis
final String benchmarkClientReference = new String(); // String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
final String horizon = new String(); // String | Horizon of the performance attribution analysis.
final String model = new String(); // String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
final Boolean geometricExcessReturns = new Boolean(); // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
final Boolean useInteractionEffect = new Boolean(); // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

try {
    final result = await api_instance.indexAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->indexAttributionGet: $e\n');
}

import org.openapitools.client.api.PerformanceAttributionApi;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio under analysis
        String benchmarkClientReference = composite_benchmark_1; // String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
        String horizon = horizon_example; // String | Horizon of the performance attribution analysis.
        String model = model_example; // String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
        Boolean geometricExcessReturns = true; // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
        Boolean useInteractionEffect = true; // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

        try {
            performance_attribution_analysis result = apiInstance.indexAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexAttributionGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PerformanceAttributionApi *apiInstance = [[PerformanceAttributionApi alloc] init];
String *clientReference = clientReference_example; // unique identifier for the portfolio under analysis (default to null)
String *benchmarkClientReference = composite_benchmark_1; // unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes. (default to null)
String *horizon = horizon_example; // Horizon of the performance attribution analysis. (default to null)
String *model = model_example; // Performance attribution model, defaults to BrinsonFachlerEquityAttribution. (optional) (default to null)
Boolean *geometricExcessReturns = true; // Use geometric (true) or arithmetic (false) excess returns. Defaults to true. (optional) (default to true)
Boolean *useInteractionEffect = true; // Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true. (optional) (default to true)

// PAA against index
[apiInstance indexAttributionGetWith:clientReference
    benchmarkClientReference:benchmarkClientReference
    horizon:horizon
    model:model
    geometricExcessReturns:geometricExcessReturns
    useInteractionEffect:useInteractionEffect
              completionHandler: ^(performance_attribution_analysis output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PerformanceAttributionApi()
var clientReference = clientReference_example; // {String} unique identifier for the portfolio under analysis
var benchmarkClientReference = composite_benchmark_1; // {String} unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
var horizon = horizon_example; // {String} Horizon of the performance attribution analysis.
var opts = {
  'model': model_example, // {String} Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
  'geometricExcessReturns': true, // {Boolean} Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
  'useInteractionEffect': true // {Boolean} Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.indexAttributionGet(clientReference, benchmarkClientReference, horizon, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class indexAttributionGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PerformanceAttributionApi();
            var clientReference = clientReference_example;  // String | unique identifier for the portfolio under analysis (default to null)
            var benchmarkClientReference = composite_benchmark_1;  // String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes. (default to null)
            var horizon = horizon_example;  // String | Horizon of the performance attribution analysis. (default to null)
            var model = model_example;  // String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution. (optional)  (default to null)
            var geometricExcessReturns = true;  // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true. (optional)  (default to true)
            var useInteractionEffect = true;  // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true. (optional)  (default to true)

            try {
                // PAA against index
                performance_attribution_analysis result = apiInstance.indexAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PerformanceAttributionApi.indexAttributionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PerformanceAttributionApi();
$clientReference = clientReference_example; // String | unique identifier for the portfolio under analysis
$benchmarkClientReference = composite_benchmark_1; // String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
$horizon = horizon_example; // String | Horizon of the performance attribution analysis.
$model = model_example; // String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
$geometricExcessReturns = true; // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
$useInteractionEffect = true; // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

try {
    $result = $api_instance->indexAttributionGet($clientReference, $benchmarkClientReference, $horizon, $model, $geometricExcessReturns, $useInteractionEffect);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PerformanceAttributionApi->indexAttributionGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PerformanceAttributionApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PerformanceAttributionApi->new();
my $clientReference = clientReference_example; # String | unique identifier for the portfolio under analysis
my $benchmarkClientReference = composite_benchmark_1; # String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
my $horizon = horizon_example; # String | Horizon of the performance attribution analysis.
my $model = model_example; # String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
my $geometricExcessReturns = true; # Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
my $useInteractionEffect = true; # Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

eval {
    my $result = $api_instance->indexAttributionGet(clientReference => $clientReference, benchmarkClientReference => $benchmarkClientReference, horizon => $horizon, model => $model, geometricExcessReturns => $geometricExcessReturns, useInteractionEffect => $useInteractionEffect);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PerformanceAttributionApi->indexAttributionGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PerformanceAttributionApi()
clientReference = clientReference_example # String | unique identifier for the portfolio under analysis (default to null)
benchmarkClientReference = composite_benchmark_1 # String | unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes. (default to null)
horizon = horizon_example # String | Horizon of the performance attribution analysis. (default to null)
model = model_example # String | Performance attribution model, defaults to BrinsonFachlerEquityAttribution. (optional) (default to null)
geometricExcessReturns = true # Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true. (optional) (default to true)
useInteractionEffect = true # Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true. (optional) (default to true)

try:
    # PAA against index
    api_response = api_instance.index_attribution_get(clientReference, benchmarkClientReference, horizon, model=model, geometricExcessReturns=geometricExcessReturns, useInteractionEffect=useInteractionEffect)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PerformanceAttributionApi->indexAttributionGet: %s\n" % e)
extern crate PerformanceAttributionApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let benchmarkClientReference = composite_benchmark_1; // String
    let horizon = horizon_example; // String
    let model = model_example; // String
    let geometricExcessReturns = true; // Boolean
    let useInteractionEffect = true; // Boolean

    let mut context = PerformanceAttributionApi::Context::default();
    let result = client.indexAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
unique identifier for the portfolio under analysis
Required
benchmark_client_reference*
String
unique identifier for the index portfolio to use as benchmark. Use GET `/v1/index` to list available indexes.
Required
horizon*
String
Horizon of the performance attribution analysis.
Required
model
String
Performance attribution model, defaults to BrinsonFachlerEquityAttribution.
geometric_excess_returns
Boolean
Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
use_interaction_effect
Boolean
Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

Responses


indexDelete

Delete index

Deletes a user's index — both the resolved portfolio and its blend recipe. Pass `all_data=true` to clear every index for this user. **Breaking change (Release 6.0):** `instrument_code` / `apiid` / `index_symbol` have been replaced by `client_reference`.


/index

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/index?client_reference=composite_benchmark_1&all_data=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PerformanceAttributionApi;

import java.io.File;
import java.util.*;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = composite_benchmark_1; // String | Identifier of the index to delete. Required unless `all_data=true`.
        Boolean allData = true; // Boolean | If true, remove all indexes associated with this account.

        try {
            apiInstance.indexDelete(clientReference, allData);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Identifier of the index to delete. Required unless `all_data=true`.
final Boolean allData = new Boolean(); // Boolean | If true, remove all indexes associated with this account.

try {
    final result = await api_instance.indexDelete(clientReference, allData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->indexDelete: $e\n');
}

import org.openapitools.client.api.PerformanceAttributionApi;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = composite_benchmark_1; // String | Identifier of the index to delete. Required unless `all_data=true`.
        Boolean allData = true; // Boolean | If true, remove all indexes associated with this account.

        try {
            apiInstance.indexDelete(clientReference, allData);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PerformanceAttributionApi *apiInstance = [[PerformanceAttributionApi alloc] init];
String *clientReference = composite_benchmark_1; // Identifier of the index to delete. Required unless `all_data=true`. (optional) (default to null)
Boolean *allData = true; // If true, remove all indexes associated with this account. (optional) (default to null)

// Delete index
[apiInstance indexDeleteWith:clientReference
    allData:allData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PerformanceAttributionApi()
var opts = {
  'clientReference': composite_benchmark_1, // {String} Identifier of the index to delete. Required unless `all_data=true`.
  'allData': true // {Boolean} If true, remove all indexes associated with this account.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.indexDelete(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class indexDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PerformanceAttributionApi();
            var clientReference = composite_benchmark_1;  // String | Identifier of the index to delete. Required unless `all_data=true`. (optional)  (default to null)
            var allData = true;  // Boolean | If true, remove all indexes associated with this account. (optional)  (default to null)

            try {
                // Delete index
                apiInstance.indexDelete(clientReference, allData);
            } catch (Exception e) {
                Debug.Print("Exception when calling PerformanceAttributionApi.indexDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PerformanceAttributionApi();
$clientReference = composite_benchmark_1; // String | Identifier of the index to delete. Required unless `all_data=true`.
$allData = true; // Boolean | If true, remove all indexes associated with this account.

try {
    $api_instance->indexDelete($clientReference, $allData);
} catch (Exception $e) {
    echo 'Exception when calling PerformanceAttributionApi->indexDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PerformanceAttributionApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PerformanceAttributionApi->new();
my $clientReference = composite_benchmark_1; # String | Identifier of the index to delete. Required unless `all_data=true`.
my $allData = true; # Boolean | If true, remove all indexes associated with this account.

eval {
    $api_instance->indexDelete(clientReference => $clientReference, allData => $allData);
};
if ($@) {
    warn "Exception when calling PerformanceAttributionApi->indexDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PerformanceAttributionApi()
clientReference = composite_benchmark_1 # String | Identifier of the index to delete. Required unless `all_data=true`. (optional) (default to null)
allData = true # Boolean | If true, remove all indexes associated with this account. (optional) (default to null)

try:
    # Delete index
    api_instance.index_delete(clientReference=clientReference, allData=allData)
except ApiException as e:
    print("Exception when calling PerformanceAttributionApi->indexDelete: %s\n" % e)
extern crate PerformanceAttributionApi;

pub fn main() {
    let clientReference = composite_benchmark_1; // String
    let allData = true; // Boolean

    let mut context = PerformanceAttributionApi::Context::default();
    let result = client.indexDelete(clientReference, allData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference
String
Identifier of the index to delete. Required unless `all_data=true`.
all_data
Boolean
If true, remove all indexes associated with this account.

Responses


indexGet

View index list

Returns the list of indexes registered for this user. An index is a portfolio with `is_index = true` and is identified by its `client_reference`. Indices are billed to each client individually based on the constituents that need decomposition data. Please reach out at support@mantarisk.com for pricing details. **Breaking change (Release 6.0):** indexes are no longer keyed on a reference instrument. The `instrument_code`, `apiid` and `symbol` fields have been replaced by `client_reference` and `name`.


/index

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/index"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PerformanceAttributionApi;

import java.io.File;
import java.util.*;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();

        try {
            apiInstance.indexGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.indexGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->indexGet: $e\n');
}

import org.openapitools.client.api.PerformanceAttributionApi;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();

        try {
            apiInstance.indexGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PerformanceAttributionApi *apiInstance = [[PerformanceAttributionApi alloc] init];

// View index list
[apiInstance indexGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PerformanceAttributionApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.indexGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class indexGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PerformanceAttributionApi();

            try {
                // View index list
                apiInstance.indexGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling PerformanceAttributionApi.indexGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PerformanceAttributionApi();

try {
    $api_instance->indexGet();
} catch (Exception $e) {
    echo 'Exception when calling PerformanceAttributionApi->indexGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PerformanceAttributionApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PerformanceAttributionApi->new();

eval {
    $api_instance->indexGet();
};
if ($@) {
    warn "Exception when calling PerformanceAttributionApi->indexGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PerformanceAttributionApi()

try:
    # View index list
    api_instance.index_get()
except ApiException as e:
    print("Exception when calling PerformanceAttributionApi->indexGet: %s\n" % e)
extern crate PerformanceAttributionApi;

pub fn main() {

    let mut context = PerformanceAttributionApi::Context::default();
    let result = client.indexGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


indexPut

Save index

Creates or replaces a user index. The index is stored as a portfolio (`is_index = true`) and the blend recipe is persisted alongside so that GET responses round-trip. Each index incurs a monthly charge based on the components requiring decomposition; please refer to our pricing model. The blend body is a list of components. `decompose: true` means the component is itself an index whose underlying holdings should be unfolded into the user's index portfolio (the underlying must be available on the platform — see GET `/index`). `decompose: false` means the component appears as a single holding. **Breaking change (Release 6.0):** the index is identified by `client_reference` rather than `(instrument_code, apiid)`. The legacy `instrument_code` / `apiid` query parameters are no longer accepted.


/index

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/index?client_reference=composite_benchmark_1&name=95% SWDA + 5% XETRA-GOLD¤cy=EUR" \
 -d '{
  "instrument_code" : "CSSMI_XSWX",
  "decompose" : true,
  "apiid" : 8,
  "ratio" : 1
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PerformanceAttributionApi;

import java.io.File;
import java.util.*;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = composite_benchmark_1; // String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
        String currency = EUR; // String | ISO 4217 currency code in which the index is denominated.
        array[_index_put_request_inner] indexPutRequestInner = ; // array[_index_put_request_inner] | 
        String name = 95% SWDA + 5% XETRA-GOLD; // String | Human-readable name for the index. Defaults to `client_reference` if omitted.

        try {
            apiInstance.indexPut(clientReference, currency, indexPutRequestInner, name);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
final String currency = new String(); // String | ISO 4217 currency code in which the index is denominated.
final array[_index_put_request_inner] indexPutRequestInner = new array[_index_put_request_inner](); // array[_index_put_request_inner] | 
final String name = new String(); // String | Human-readable name for the index. Defaults to `client_reference` if omitted.

try {
    final result = await api_instance.indexPut(clientReference, currency, indexPutRequestInner, name);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->indexPut: $e\n');
}

import org.openapitools.client.api.PerformanceAttributionApi;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = composite_benchmark_1; // String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
        String currency = EUR; // String | ISO 4217 currency code in which the index is denominated.
        array[_index_put_request_inner] indexPutRequestInner = ; // array[_index_put_request_inner] | 
        String name = 95% SWDA + 5% XETRA-GOLD; // String | Human-readable name for the index. Defaults to `client_reference` if omitted.

        try {
            apiInstance.indexPut(clientReference, currency, indexPutRequestInner, name);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#indexPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PerformanceAttributionApi *apiInstance = [[PerformanceAttributionApi alloc] init];
String *clientReference = composite_benchmark_1; // Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend. (default to null)
String *currency = EUR; // ISO 4217 currency code in which the index is denominated. (default to null)
array[_index_put_request_inner] *indexPutRequestInner = ; // 
String *name = 95% SWDA + 5% XETRA-GOLD; // Human-readable name for the index. Defaults to `client_reference` if omitted. (optional) (default to null)

// Save index
[apiInstance indexPutWith:clientReference
    currency:currency
    indexPutRequestInner:indexPutRequestInner
    name:name
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PerformanceAttributionApi()
var clientReference = composite_benchmark_1; // {String} Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
var currency = EUR; // {String} ISO 4217 currency code in which the index is denominated.
var indexPutRequestInner = ; // {array[_index_put_request_inner]} 
var opts = {
  'name': 95% SWDA + 5% XETRA-GOLD // {String} Human-readable name for the index. Defaults to `client_reference` if omitted.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.indexPut(clientReference, currency, indexPutRequestInner, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class indexPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PerformanceAttributionApi();
            var clientReference = composite_benchmark_1;  // String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend. (default to null)
            var currency = EUR;  // String | ISO 4217 currency code in which the index is denominated. (default to null)
            var indexPutRequestInner = new array[_index_put_request_inner](); // array[_index_put_request_inner] | 
            var name = 95% SWDA + 5% XETRA-GOLD;  // String | Human-readable name for the index. Defaults to `client_reference` if omitted. (optional)  (default to null)

            try {
                // Save index
                apiInstance.indexPut(clientReference, currency, indexPutRequestInner, name);
            } catch (Exception e) {
                Debug.Print("Exception when calling PerformanceAttributionApi.indexPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PerformanceAttributionApi();
$clientReference = composite_benchmark_1; // String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
$currency = EUR; // String | ISO 4217 currency code in which the index is denominated.
$indexPutRequestInner = ; // array[_index_put_request_inner] | 
$name = 95% SWDA + 5% XETRA-GOLD; // String | Human-readable name for the index. Defaults to `client_reference` if omitted.

try {
    $api_instance->indexPut($clientReference, $currency, $indexPutRequestInner, $name);
} catch (Exception $e) {
    echo 'Exception when calling PerformanceAttributionApi->indexPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PerformanceAttributionApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PerformanceAttributionApi->new();
my $clientReference = composite_benchmark_1; # String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
my $currency = EUR; # String | ISO 4217 currency code in which the index is denominated.
my $indexPutRequestInner = [WWW::OPenAPIClient::Object::array[_index_put_request_inner]->new()]; # array[_index_put_request_inner] | 
my $name = 95% SWDA + 5% XETRA-GOLD; # String | Human-readable name for the index. Defaults to `client_reference` if omitted.

eval {
    $api_instance->indexPut(clientReference => $clientReference, currency => $currency, indexPutRequestInner => $indexPutRequestInner, name => $name);
};
if ($@) {
    warn "Exception when calling PerformanceAttributionApi->indexPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PerformanceAttributionApi()
clientReference = composite_benchmark_1 # String | Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend. (default to null)
currency = EUR # String | ISO 4217 currency code in which the index is denominated. (default to null)
indexPutRequestInner =  # array[_index_put_request_inner] | 
name = 95% SWDA + 5% XETRA-GOLD # String | Human-readable name for the index. Defaults to `client_reference` if omitted. (optional) (default to null)

try:
    # Save index
    api_instance.index_put(clientReference, currency, indexPutRequestInner, name=name)
except ApiException as e:
    print("Exception when calling PerformanceAttributionApi->indexPut: %s\n" % e)
extern crate PerformanceAttributionApi;

pub fn main() {
    let clientReference = composite_benchmark_1; // String
    let currency = EUR; // String
    let indexPutRequestInner = ; // array[_index_put_request_inner]
    let name = 95% SWDA + 5% XETRA-GOLD; // String

    let mut context = PerformanceAttributionApi::Context::default();
    let result = client.indexPut(clientReference, currency, indexPutRequestInner, name, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
indexPutRequestInner *

Blend recipe — at least one component, ratios should sum to 1.

Query parameters
Name Description
client_reference*
String
Unique identifier for the index portfolio. Idempotent — a second PUT with the same `client_reference` replaces the previous blend.
Required
name
String
Human-readable name for the index. Defaults to `client_reference` if omitted.
currency*
String
ISO 4217 currency code in which the index is denominated.
Required

Responses


portfolioAttributionGet

PAA against portfolio

Our risk and portfolio attribution methodology employs an enhanced Brinson model to decompose risk and performance across the following dimensions: sectors, asset classes, domiciles (country), credit ratings and currencies, plus a portfolio-level total. This detailed analysis provides insights into the following key components: - **Allocation Effect**: Measures the performance impact resulting from overweighting or underweighting a category relative to the benchmark. - **Selection Effect**: Quantifies the value added or subtracted by selecting specific securities within each category compared to the benchmark. - **Interaction Effect**: Captures the combined, and often non-additive, performance impact of allocation and selection decisions. - **Risk analytics**: per-category volatility, VaR and CVaR (VaR and CVaR at the daily, weekly and monthly horizons), together with each category's marginal contribution to portfolio volatility, VaR and CVaR, compared against the benchmark. - **Expected returns**: per-category expected-return estimates using four methods (equally and exponentially weighted, sample- and factor-based). - **Daily performance curves**: portfolio_returns_day and benchmark_returns_day, each a daily buy-and-hold growth-of-1 price index anchored at 1.0 over the requested attribution horizon window.


/portfolio/attribution

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/attribution?client_reference=clientReference_example&benchmark_client_reference=benchmarkClientReference_example&horizon=horizon_example&model=model_example&geometric_excess_returns=true&use_interaction_effect=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PerformanceAttributionApi;

import java.io.File;
import java.util.*;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio
        String benchmarkClientReference = benchmarkClientReference_example; // String | client reference of the portfolio to benchmark against
        String horizon = horizon_example; // String | horizon of the performance attribution analysis.
        String model = model_example; // String | performance attribution model, defaults to BrinsonFachlerEquityAttribution.
        Boolean geometricExcessReturns = true; // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
        Boolean useInteractionEffect = true; // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

        try {
            performance_attribution_analysis result = apiInstance.portfolioAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#portfolioAttributionGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | unique identifier for the portfolio
final String benchmarkClientReference = new String(); // String | client reference of the portfolio to benchmark against
final String horizon = new String(); // String | horizon of the performance attribution analysis.
final String model = new String(); // String | performance attribution model, defaults to BrinsonFachlerEquityAttribution.
final Boolean geometricExcessReturns = new Boolean(); // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
final Boolean useInteractionEffect = new Boolean(); // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

try {
    final result = await api_instance.portfolioAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioAttributionGet: $e\n');
}

import org.openapitools.client.api.PerformanceAttributionApi;

public class PerformanceAttributionApiExample {
    public static void main(String[] args) {
        PerformanceAttributionApi apiInstance = new PerformanceAttributionApi();
        String clientReference = clientReference_example; // String | unique identifier for the portfolio
        String benchmarkClientReference = benchmarkClientReference_example; // String | client reference of the portfolio to benchmark against
        String horizon = horizon_example; // String | horizon of the performance attribution analysis.
        String model = model_example; // String | performance attribution model, defaults to BrinsonFachlerEquityAttribution.
        Boolean geometricExcessReturns = true; // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
        Boolean useInteractionEffect = true; // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

        try {
            performance_attribution_analysis result = apiInstance.portfolioAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PerformanceAttributionApi#portfolioAttributionGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PerformanceAttributionApi *apiInstance = [[PerformanceAttributionApi alloc] init];
String *clientReference = clientReference_example; // unique identifier for the portfolio (default to null)
String *benchmarkClientReference = benchmarkClientReference_example; // client reference of the portfolio to benchmark against (default to null)
String *horizon = horizon_example; // horizon of the performance attribution analysis. (default to null)
String *model = model_example; // performance attribution model, defaults to BrinsonFachlerEquityAttribution. (optional) (default to null)
Boolean *geometricExcessReturns = true; // Use geometric (true) or arithmetic (false) excess returns. Defaults to true. (optional) (default to true)
Boolean *useInteractionEffect = true; // Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true. (optional) (default to true)

// PAA against portfolio
[apiInstance portfolioAttributionGetWith:clientReference
    benchmarkClientReference:benchmarkClientReference
    horizon:horizon
    model:model
    geometricExcessReturns:geometricExcessReturns
    useInteractionEffect:useInteractionEffect
              completionHandler: ^(performance_attribution_analysis output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PerformanceAttributionApi()
var clientReference = clientReference_example; // {String} unique identifier for the portfolio
var benchmarkClientReference = benchmarkClientReference_example; // {String} client reference of the portfolio to benchmark against
var horizon = horizon_example; // {String} horizon of the performance attribution analysis.
var opts = {
  'model': model_example, // {String} performance attribution model, defaults to BrinsonFachlerEquityAttribution.
  'geometricExcessReturns': true, // {Boolean} Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
  'useInteractionEffect': true // {Boolean} Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioAttributionGet(clientReference, benchmarkClientReference, horizon, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioAttributionGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PerformanceAttributionApi();
            var clientReference = clientReference_example;  // String | unique identifier for the portfolio (default to null)
            var benchmarkClientReference = benchmarkClientReference_example;  // String | client reference of the portfolio to benchmark against (default to null)
            var horizon = horizon_example;  // String | horizon of the performance attribution analysis. (default to null)
            var model = model_example;  // String | performance attribution model, defaults to BrinsonFachlerEquityAttribution. (optional)  (default to null)
            var geometricExcessReturns = true;  // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true. (optional)  (default to true)
            var useInteractionEffect = true;  // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true. (optional)  (default to true)

            try {
                // PAA against portfolio
                performance_attribution_analysis result = apiInstance.portfolioAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PerformanceAttributionApi.portfolioAttributionGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PerformanceAttributionApi();
$clientReference = clientReference_example; // String | unique identifier for the portfolio
$benchmarkClientReference = benchmarkClientReference_example; // String | client reference of the portfolio to benchmark against
$horizon = horizon_example; // String | horizon of the performance attribution analysis.
$model = model_example; // String | performance attribution model, defaults to BrinsonFachlerEquityAttribution.
$geometricExcessReturns = true; // Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
$useInteractionEffect = true; // Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

try {
    $result = $api_instance->portfolioAttributionGet($clientReference, $benchmarkClientReference, $horizon, $model, $geometricExcessReturns, $useInteractionEffect);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PerformanceAttributionApi->portfolioAttributionGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PerformanceAttributionApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PerformanceAttributionApi->new();
my $clientReference = clientReference_example; # String | unique identifier for the portfolio
my $benchmarkClientReference = benchmarkClientReference_example; # String | client reference of the portfolio to benchmark against
my $horizon = horizon_example; # String | horizon of the performance attribution analysis.
my $model = model_example; # String | performance attribution model, defaults to BrinsonFachlerEquityAttribution.
my $geometricExcessReturns = true; # Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
my $useInteractionEffect = true; # Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

eval {
    my $result = $api_instance->portfolioAttributionGet(clientReference => $clientReference, benchmarkClientReference => $benchmarkClientReference, horizon => $horizon, model => $model, geometricExcessReturns => $geometricExcessReturns, useInteractionEffect => $useInteractionEffect);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PerformanceAttributionApi->portfolioAttributionGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PerformanceAttributionApi()
clientReference = clientReference_example # String | unique identifier for the portfolio (default to null)
benchmarkClientReference = benchmarkClientReference_example # String | client reference of the portfolio to benchmark against (default to null)
horizon = horizon_example # String | horizon of the performance attribution analysis. (default to null)
model = model_example # String | performance attribution model, defaults to BrinsonFachlerEquityAttribution. (optional) (default to null)
geometricExcessReturns = true # Boolean | Use geometric (true) or arithmetic (false) excess returns. Defaults to true. (optional) (default to true)
useInteractionEffect = true # Boolean | Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true. (optional) (default to true)

try:
    # PAA against portfolio
    api_response = api_instance.portfolio_attribution_get(clientReference, benchmarkClientReference, horizon, model=model, geometricExcessReturns=geometricExcessReturns, useInteractionEffect=useInteractionEffect)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PerformanceAttributionApi->portfolioAttributionGet: %s\n" % e)
extern crate PerformanceAttributionApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let benchmarkClientReference = benchmarkClientReference_example; // String
    let horizon = horizon_example; // String
    let model = model_example; // String
    let geometricExcessReturns = true; // Boolean
    let useInteractionEffect = true; // Boolean

    let mut context = PerformanceAttributionApi::Context::default();
    let result = client.portfolioAttributionGet(clientReference, benchmarkClientReference, horizon, model, geometricExcessReturns, useInteractionEffect, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
unique identifier for the portfolio
Required
benchmark_client_reference*
String
client reference of the portfolio to benchmark against
Required
horizon*
String
horizon of the performance attribution analysis.
Required
model
String
performance attribution model, defaults to BrinsonFachlerEquityAttribution.
geometric_excess_returns
Boolean
Use geometric (true) or arithmetic (false) excess returns. Defaults to true.
use_interaction_effect
Boolean
Report the interaction effect separately (true) or fold it into the selection effect (false). Defaults to true.

Responses


PortfolioDataManagement

portfolioDelete

Delete portfolio(s)

- Delete the specified portfolio when a clientReference has been provided and allData is false - Delete all portfolios when no clientReference has been specified and allData is true


/portfolio

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio?client_reference=clientReference_example&all_data=true"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PortfolioDataManagementApi;

import java.io.File;
import java.util.*;

public class PortfolioDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PortfolioDataManagementApi apiInstance = new PortfolioDataManagementApi();
        String clientReference = clientReference_example; // String | client side unique identifier for the portfolio
        Boolean allData = true; // Boolean | if true, delete all portfolios associated with this account. Use with caution

        try {
            apiInstance.portfolioDelete(clientReference, allData);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortfolioDataManagementApi#portfolioDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | client side unique identifier for the portfolio
final Boolean allData = new Boolean(); // Boolean | if true, delete all portfolios associated with this account. Use with caution

try {
    final result = await api_instance.portfolioDelete(clientReference, allData);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioDelete: $e\n');
}

import org.openapitools.client.api.PortfolioDataManagementApi;

public class PortfolioDataManagementApiExample {
    public static void main(String[] args) {
        PortfolioDataManagementApi apiInstance = new PortfolioDataManagementApi();
        String clientReference = clientReference_example; // String | client side unique identifier for the portfolio
        Boolean allData = true; // Boolean | if true, delete all portfolios associated with this account. Use with caution

        try {
            apiInstance.portfolioDelete(clientReference, allData);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortfolioDataManagementApi#portfolioDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PortfolioDataManagementApi *apiInstance = [[PortfolioDataManagementApi alloc] init];
String *clientReference = clientReference_example; // client side unique identifier for the portfolio (optional) (default to null)
Boolean *allData = true; // if true, delete all portfolios associated with this account. Use with caution (optional) (default to null)

// Delete portfolio(s)
[apiInstance portfolioDeleteWith:clientReference
    allData:allData
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PortfolioDataManagementApi()
var opts = {
  'clientReference': clientReference_example, // {String} client side unique identifier for the portfolio
  'allData': true // {Boolean} if true, delete all portfolios associated with this account. Use with caution
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.portfolioDelete(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PortfolioDataManagementApi();
            var clientReference = clientReference_example;  // String | client side unique identifier for the portfolio (optional)  (default to null)
            var allData = true;  // Boolean | if true, delete all portfolios associated with this account. Use with caution (optional)  (default to null)

            try {
                // Delete portfolio(s)
                apiInstance.portfolioDelete(clientReference, allData);
            } catch (Exception e) {
                Debug.Print("Exception when calling PortfolioDataManagementApi.portfolioDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PortfolioDataManagementApi();
$clientReference = clientReference_example; // String | client side unique identifier for the portfolio
$allData = true; // Boolean | if true, delete all portfolios associated with this account. Use with caution

try {
    $api_instance->portfolioDelete($clientReference, $allData);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioDataManagementApi->portfolioDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PortfolioDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PortfolioDataManagementApi->new();
my $clientReference = clientReference_example; # String | client side unique identifier for the portfolio
my $allData = true; # Boolean | if true, delete all portfolios associated with this account. Use with caution

eval {
    $api_instance->portfolioDelete(clientReference => $clientReference, allData => $allData);
};
if ($@) {
    warn "Exception when calling PortfolioDataManagementApi->portfolioDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PortfolioDataManagementApi()
clientReference = clientReference_example # String | client side unique identifier for the portfolio (optional) (default to null)
allData = true # Boolean | if true, delete all portfolios associated with this account. Use with caution (optional) (default to null)

try:
    # Delete portfolio(s)
    api_instance.portfolio_delete(clientReference=clientReference, allData=allData)
except ApiException as e:
    print("Exception when calling PortfolioDataManagementApi->portfolioDelete: %s\n" % e)
extern crate PortfolioDataManagementApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let allData = true; // Boolean

    let mut context = PortfolioDataManagementApi::Context::default();
    let result = client.portfolioDelete(clientReference, allData, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference
String
client side unique identifier for the portfolio
all_data
Boolean
if true, delete all portfolios associated with this account. Use with caution

Responses


portfolioGet

View portfolio(s)

This method provides the status of one or more portfolios, showing their capital, composition and, importantly, their data load status. Attempting to analyse a portfolio whose data has not yet been fully loaded may lead to a timeout. It is best practice to check the data load state of a portfolio before triggering an analysis. Returns: - A status of all portfolios stored in MantaRisk if no reference is provided - A status of the portfolio whose reference has been specified


/portfolio

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio?client_reference=clientReference_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PortfolioDataManagementApi;

import java.io.File;
import java.util.*;

public class PortfolioDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PortfolioDataManagementApi apiInstance = new PortfolioDataManagementApi();
        String clientReference = clientReference_example; // String | client side unique identifier for the portfolio

        try {
            _portfolio_get_200_response result = apiInstance.portfolioGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortfolioDataManagementApi#portfolioGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | client side unique identifier for the portfolio

try {
    final result = await api_instance.portfolioGet(clientReference);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioGet: $e\n');
}

import org.openapitools.client.api.PortfolioDataManagementApi;

public class PortfolioDataManagementApiExample {
    public static void main(String[] args) {
        PortfolioDataManagementApi apiInstance = new PortfolioDataManagementApi();
        String clientReference = clientReference_example; // String | client side unique identifier for the portfolio

        try {
            _portfolio_get_200_response result = apiInstance.portfolioGet(clientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortfolioDataManagementApi#portfolioGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PortfolioDataManagementApi *apiInstance = [[PortfolioDataManagementApi alloc] init];
String *clientReference = clientReference_example; // client side unique identifier for the portfolio (optional) (default to null)

// View portfolio(s)
[apiInstance portfolioGetWith:clientReference
              completionHandler: ^(_portfolio_get_200_response output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PortfolioDataManagementApi()
var opts = {
  'clientReference': clientReference_example // {String} client side unique identifier for the portfolio
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PortfolioDataManagementApi();
            var clientReference = clientReference_example;  // String | client side unique identifier for the portfolio (optional)  (default to null)

            try {
                // View portfolio(s)
                _portfolio_get_200_response result = apiInstance.portfolioGet(clientReference);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling PortfolioDataManagementApi.portfolioGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PortfolioDataManagementApi();
$clientReference = clientReference_example; // String | client side unique identifier for the portfolio

try {
    $result = $api_instance->portfolioGet($clientReference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioDataManagementApi->portfolioGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PortfolioDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PortfolioDataManagementApi->new();
my $clientReference = clientReference_example; # String | client side unique identifier for the portfolio

eval {
    my $result = $api_instance->portfolioGet(clientReference => $clientReference);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PortfolioDataManagementApi->portfolioGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PortfolioDataManagementApi()
clientReference = clientReference_example # String | client side unique identifier for the portfolio (optional) (default to null)

try:
    # View portfolio(s)
    api_response = api_instance.portfolio_get(clientReference=clientReference)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PortfolioDataManagementApi->portfolioGet: %s\n" % e)
extern crate PortfolioDataManagementApi;

pub fn main() {
    let clientReference = clientReference_example; // String

    let mut context = PortfolioDataManagementApi::Context::default();
    let result = client.portfolioGet(clientReference, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference
String
client side unique identifier for the portfolio

Responses


portfolioPut

Add or modify a portfolio

This endpoint is used to notifies MantaRisk of a new portfolio or a change in an existing portfolio. This allows MantaRisk to cache historical data and perform costly computations ahead of time. This endpoint should be called before any analysis is run when: 1) The portfolio composition has changed. For instance when a stock picker is adding stocks to its portfolio. 2) The positions held for a given portfolio have changed. For instance a stock has been bought or sold. This enables the /portfolio/analysis endpoint to perform order management using the selected portfolio strategy. Please ensure the wishlist is populated. The wishlist is the instrument universe you would like MantaRisk to consider when looking at your portfolio. An empty wishlist means you desire an empty portfolio. A wishlist with more instruments than currently open positions indicates you are looking at investing in other assets. A wishlist smaller than currently open positions means you are looking at divesting etc. All instruments are referenced using instrument_code and apiid, together the unique key of an instrument within the MantaRisk engine. To find the instrument_code and apiid for an instrument please use the PUT /history/coverage or GET /history/instrument endpoints. MantaRisk works with time series adjusted for dividends and splits. This means the positions provided for this portfolio either: - need to be provided already adjusted; or - the options adjust_dividends and / or adjust_splits must be used to have us adjust the positions. An example is TSLA which in 2020 would have been purchased at a price of 1500 and then got split meaning that as of today (Jan 2026) that price is now 100. 100 is the adjusted price. **Note:** this endpoint may time out here in swagger. The portfolio is however still being loaded in the background. There is no need to call this endpoint again. Please use GET /portfolio to confirm the loading status.


/portfolio

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/portfolio?client_reference=clientReference_example&adjust_dividends=true&adjust_splits=true" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.PortfolioDataManagementApi;

import java.io.File;
import java.util.*;

public class PortfolioDataManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        PortfolioDataManagementApi apiInstance = new PortfolioDataManagementApi();
        String clientReference = clientReference_example; // String | client side unique identifier for the portfolio
        Portfolio portfolio = ; // Portfolio | 
        Boolean adjustDividends = true; // Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
        Boolean adjustSplits = true; // Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default.

        try {
            apiInstance.portfolioPut(clientReference, portfolio, adjustDividends, adjustSplits);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortfolioDataManagementApi#portfolioPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | client side unique identifier for the portfolio
final Portfolio portfolio = new Portfolio(); // Portfolio | 
final Boolean adjustDividends = new Boolean(); // Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
final Boolean adjustSplits = new Boolean(); // Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default.

try {
    final result = await api_instance.portfolioPut(clientReference, portfolio, adjustDividends, adjustSplits);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioPut: $e\n');
}

import org.openapitools.client.api.PortfolioDataManagementApi;

public class PortfolioDataManagementApiExample {
    public static void main(String[] args) {
        PortfolioDataManagementApi apiInstance = new PortfolioDataManagementApi();
        String clientReference = clientReference_example; // String | client side unique identifier for the portfolio
        Portfolio portfolio = ; // Portfolio | 
        Boolean adjustDividends = true; // Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
        Boolean adjustSplits = true; // Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default.

        try {
            apiInstance.portfolioPut(clientReference, portfolio, adjustDividends, adjustSplits);
        } catch (ApiException e) {
            System.err.println("Exception when calling PortfolioDataManagementApi#portfolioPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
PortfolioDataManagementApi *apiInstance = [[PortfolioDataManagementApi alloc] init];
String *clientReference = clientReference_example; // client side unique identifier for the portfolio (default to null)
Portfolio *portfolio = ; // 
Boolean *adjustDividends = true; // if the positions provided have not been adjusted for dividends then this must be set to true. False by default. (optional) (default to false)
Boolean *adjustSplits = true; // if the positions provided have not been adjusted for splits then this must be set to true. False by default. (optional) (default to false)

// Add or modify a portfolio
[apiInstance portfolioPutWith:clientReference
    portfolio:portfolio
    adjustDividends:adjustDividends
    adjustSplits:adjustSplits
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.PortfolioDataManagementApi()
var clientReference = clientReference_example; // {String} client side unique identifier for the portfolio
var portfolio = ; // {Portfolio} 
var opts = {
  'adjustDividends': true, // {Boolean} if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
  'adjustSplits': true // {Boolean} if the positions provided have not been adjusted for splits then this must be set to true. False by default.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.portfolioPut(clientReference, portfolio, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new PortfolioDataManagementApi();
            var clientReference = clientReference_example;  // String | client side unique identifier for the portfolio (default to null)
            var portfolio = new Portfolio(); // Portfolio | 
            var adjustDividends = true;  // Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default. (optional)  (default to false)
            var adjustSplits = true;  // Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default. (optional)  (default to false)

            try {
                // Add or modify a portfolio
                apiInstance.portfolioPut(clientReference, portfolio, adjustDividends, adjustSplits);
            } catch (Exception e) {
                Debug.Print("Exception when calling PortfolioDataManagementApi.portfolioPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\PortfolioDataManagementApi();
$clientReference = clientReference_example; // String | client side unique identifier for the portfolio
$portfolio = ; // Portfolio | 
$adjustDividends = true; // Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
$adjustSplits = true; // Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default.

try {
    $api_instance->portfolioPut($clientReference, $portfolio, $adjustDividends, $adjustSplits);
} catch (Exception $e) {
    echo 'Exception when calling PortfolioDataManagementApi->portfolioPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::PortfolioDataManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::PortfolioDataManagementApi->new();
my $clientReference = clientReference_example; # String | client side unique identifier for the portfolio
my $portfolio = WWW::OPenAPIClient::Object::Portfolio->new(); # Portfolio | 
my $adjustDividends = true; # Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
my $adjustSplits = true; # Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default.

eval {
    $api_instance->portfolioPut(clientReference => $clientReference, portfolio => $portfolio, adjustDividends => $adjustDividends, adjustSplits => $adjustSplits);
};
if ($@) {
    warn "Exception when calling PortfolioDataManagementApi->portfolioPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.PortfolioDataManagementApi()
clientReference = clientReference_example # String | client side unique identifier for the portfolio (default to null)
portfolio =  # Portfolio | 
adjustDividends = true # Boolean | if the positions provided have not been adjusted for dividends then this must be set to true. False by default. (optional) (default to false)
adjustSplits = true # Boolean | if the positions provided have not been adjusted for splits then this must be set to true. False by default. (optional) (default to false)

try:
    # Add or modify a portfolio
    api_instance.portfolio_put(clientReference, portfolio, adjustDividends=adjustDividends, adjustSplits=adjustSplits)
except ApiException as e:
    print("Exception when calling PortfolioDataManagementApi->portfolioPut: %s\n" % e)
extern crate PortfolioDataManagementApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let portfolio = ; // Portfolio
    let adjustDividends = true; // Boolean
    let adjustSplits = true; // Boolean

    let mut context = PortfolioDataManagementApi::Context::default();
    let result = client.portfolioPut(clientReference, portfolio, adjustDividends, adjustSplits, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
portfolio *

Composition of the portfolio

Query parameters
Name Description
client_reference*
String
client side unique identifier for the portfolio
Required
adjust_dividends
Boolean
if the positions provided have not been adjusted for dividends then this must be set to true. False by default.
adjust_splits
Boolean
if the positions provided have not been adjusted for splits then this must be set to true. False by default.

Responses


Rebalancing

portfolioRebalanceGet

Run portfolio rebalancing (optimisation)

Portfolio optimisation / rebalancing. Given a specific optimisation algorithm, returns the corresponding portfolio composition, tactical analysis and orders to be executed. For the proposed (rebalanced) portfolio the response also returns: - **Forward-looking risk analytics**: VAR and CVAR (at multiple quantiles) and volatility for the rebalanced allocation, over daily, weekly and monthly horizons. - **Expected returns**: estimated using four methods (equally and exponentially weighted, sample- and factor-based) across daily, weekly, monthly, quarterly, year-to-date and yearly horizons. - **Account capital**: the account's capital position used to size the orders, comprising available cash, funds, equity and currency (with UI-friendly print_ variants). Please make sure the portfolio data has been loaded before calling this method by using the GET /portfolio endpoint. An analysis that is started before the portfolio data has been fully loaded will take longer.


/portfolio/rebalance

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/rebalance?client_reference=clientReference_example&strategy_id=56&benchmark_client_reference=benchmarkClientReference_example"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();
        String clientReference = clientReference_example; // String | Unique identifier for the portfolio
        Integer strategyId = 56; // Integer | Unique identifier for the risk management strategy
        String benchmarkClientReference = benchmarkClientReference_example; // String | For tracking error minimization only, portfolio to track

        try {
            rebalance result = apiInstance.portfolioRebalanceGet(clientReference, strategyId, benchmarkClientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#portfolioRebalanceGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Unique identifier for the portfolio
final Integer strategyId = new Integer(); // Integer | Unique identifier for the risk management strategy
final String benchmarkClientReference = new String(); // String | For tracking error minimization only, portfolio to track

try {
    final result = await api_instance.portfolioRebalanceGet(clientReference, strategyId, benchmarkClientReference);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioRebalanceGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();
        String clientReference = clientReference_example; // String | Unique identifier for the portfolio
        Integer strategyId = 56; // Integer | Unique identifier for the risk management strategy
        String benchmarkClientReference = benchmarkClientReference_example; // String | For tracking error minimization only, portfolio to track

        try {
            rebalance result = apiInstance.portfolioRebalanceGet(clientReference, strategyId, benchmarkClientReference);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#portfolioRebalanceGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];
String *clientReference = clientReference_example; // Unique identifier for the portfolio (default to null)
Integer *strategyId = 56; // Unique identifier for the risk management strategy (default to null)
String *benchmarkClientReference = benchmarkClientReference_example; // For tracking error minimization only, portfolio to track (optional) (default to null)

// Run portfolio rebalancing (optimisation)
[apiInstance portfolioRebalanceGetWith:clientReference
    strategyId:strategyId
    benchmarkClientReference:benchmarkClientReference
              completionHandler: ^(rebalance output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var clientReference = clientReference_example; // {String} Unique identifier for the portfolio
var strategyId = 56; // {Integer} Unique identifier for the risk management strategy
var opts = {
  'benchmarkClientReference': benchmarkClientReference_example // {String} For tracking error minimization only, portfolio to track
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioRebalanceGet(clientReference, strategyId, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioRebalanceGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();
            var clientReference = clientReference_example;  // String | Unique identifier for the portfolio (default to null)
            var strategyId = 56;  // Integer | Unique identifier for the risk management strategy (default to null)
            var benchmarkClientReference = benchmarkClientReference_example;  // String | For tracking error minimization only, portfolio to track (optional)  (default to null)

            try {
                // Run portfolio rebalancing (optimisation)
                rebalance result = apiInstance.portfolioRebalanceGet(clientReference, strategyId, benchmarkClientReference);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.portfolioRebalanceGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();
$clientReference = clientReference_example; // String | Unique identifier for the portfolio
$strategyId = 56; // Integer | Unique identifier for the risk management strategy
$benchmarkClientReference = benchmarkClientReference_example; // String | For tracking error minimization only, portfolio to track

try {
    $result = $api_instance->portfolioRebalanceGet($clientReference, $strategyId, $benchmarkClientReference);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->portfolioRebalanceGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();
my $clientReference = clientReference_example; # String | Unique identifier for the portfolio
my $strategyId = 56; # Integer | Unique identifier for the risk management strategy
my $benchmarkClientReference = benchmarkClientReference_example; # String | For tracking error minimization only, portfolio to track

eval {
    my $result = $api_instance->portfolioRebalanceGet(clientReference => $clientReference, strategyId => $strategyId, benchmarkClientReference => $benchmarkClientReference);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RebalancingApi->portfolioRebalanceGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()
clientReference = clientReference_example # String | Unique identifier for the portfolio (default to null)
strategyId = 56 # Integer | Unique identifier for the risk management strategy (default to null)
benchmarkClientReference = benchmarkClientReference_example # String | For tracking error minimization only, portfolio to track (optional) (default to null)

try:
    # Run portfolio rebalancing (optimisation)
    api_response = api_instance.portfolio_rebalance_get(clientReference, strategyId, benchmarkClientReference=benchmarkClientReference)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RebalancingApi->portfolioRebalanceGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let strategyId = 56; // Integer
    let benchmarkClientReference = benchmarkClientReference_example; // String

    let mut context = RebalancingApi::Context::default();
    let result = client.portfolioRebalanceGet(clientReference, strategyId, benchmarkClientReference, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
Unique identifier for the portfolio
Required
strategy_id*
Integer
Unique identifier for the risk management strategy
Required
benchmark_client_reference
String
For tracking error minimization only, portfolio to track

Responses


portfolioTestconstraintsGet

Test portfolio against constraints

Given a portfolio and a strategy, returns each of the strategy's constraints annotated with the portfolio's current exposure and a breach status (WITHIN / BELOW_LOWER / ABOVE_UPPER). Factor-based exposures (currency, geography, sector) are reported as absolute values of the factor beta.


/portfolio/testconstraints

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/portfolio/testconstraints?client_reference=clientReference_example&strategy_id=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();
        String clientReference = clientReference_example; // String | 
        Integer strategyId = 56; // Integer | 

        try {
            constraint_test_result result = apiInstance.portfolioTestconstraintsGet(clientReference, strategyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#portfolioTestconstraintsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | 
final Integer strategyId = new Integer(); // Integer | 

try {
    final result = await api_instance.portfolioTestconstraintsGet(clientReference, strategyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->portfolioTestconstraintsGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();
        String clientReference = clientReference_example; // String | 
        Integer strategyId = 56; // Integer | 

        try {
            constraint_test_result result = apiInstance.portfolioTestconstraintsGet(clientReference, strategyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#portfolioTestconstraintsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];
String *clientReference = clientReference_example; //  (default to null)
Integer *strategyId = 56; //  (default to null)

// Test portfolio against constraints
[apiInstance portfolioTestconstraintsGetWith:clientReference
    strategyId:strategyId
              completionHandler: ^(constraint_test_result output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var clientReference = clientReference_example; // {String} 
var strategyId = 56; // {Integer} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.portfolioTestconstraintsGet(clientReference, strategyId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class portfolioTestconstraintsGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();
            var clientReference = clientReference_example;  // String |  (default to null)
            var strategyId = 56;  // Integer |  (default to null)

            try {
                // Test portfolio against constraints
                constraint_test_result result = apiInstance.portfolioTestconstraintsGet(clientReference, strategyId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.portfolioTestconstraintsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();
$clientReference = clientReference_example; // String | 
$strategyId = 56; // Integer | 

try {
    $result = $api_instance->portfolioTestconstraintsGet($clientReference, $strategyId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->portfolioTestconstraintsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();
my $clientReference = clientReference_example; # String | 
my $strategyId = 56; # Integer | 

eval {
    my $result = $api_instance->portfolioTestconstraintsGet(clientReference => $clientReference, strategyId => $strategyId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RebalancingApi->portfolioTestconstraintsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()
clientReference = clientReference_example # String |  (default to null)
strategyId = 56 # Integer |  (default to null)

try:
    # Test portfolio against constraints
    api_response = api_instance.portfolio_testconstraints_get(clientReference, strategyId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RebalancingApi->portfolioTestconstraintsGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let strategyId = 56; // Integer

    let mut context = RebalancingApi::Context::default();
    let result = client.portfolioTestconstraintsGet(clientReference, strategyId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
client_reference*
String
Required
strategy_id*
Integer
Required

Responses


referenceAssetclassesGet

List constrainable asset classes

List of asset types which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema


/reference/assetclasses

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/reference/assetclasses"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceAssetclassesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceAssetclassesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.referenceAssetclassesGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->referenceAssetclassesGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceAssetclassesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceAssetclassesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];

// List constrainable asset classes
[apiInstance referenceAssetclassesGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.referenceAssetclassesGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class referenceAssetclassesGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();

            try {
                // List constrainable asset classes
                apiInstance.referenceAssetclassesGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.referenceAssetclassesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();

try {
    $api_instance->referenceAssetclassesGet();
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->referenceAssetclassesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();

eval {
    $api_instance->referenceAssetclassesGet();
};
if ($@) {
    warn "Exception when calling RebalancingApi->referenceAssetclassesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()

try:
    # List constrainable asset classes
    api_instance.reference_assetclasses_get()
except ApiException as e:
    print("Exception when calling RebalancingApi->referenceAssetclassesGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {

    let mut context = RebalancingApi::Context::default();
    let result = client.referenceAssetclassesGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


referenceCurrenciesGet

List constrainable currencies

List of currencies which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema


/reference/currencies

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/reference/currencies"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceCurrenciesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceCurrenciesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.referenceCurrenciesGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->referenceCurrenciesGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceCurrenciesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceCurrenciesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];

// List constrainable currencies
[apiInstance referenceCurrenciesGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.referenceCurrenciesGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class referenceCurrenciesGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();

            try {
                // List constrainable currencies
                apiInstance.referenceCurrenciesGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.referenceCurrenciesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();

try {
    $api_instance->referenceCurrenciesGet();
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->referenceCurrenciesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();

eval {
    $api_instance->referenceCurrenciesGet();
};
if ($@) {
    warn "Exception when calling RebalancingApi->referenceCurrenciesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()

try:
    # List constrainable currencies
    api_instance.reference_currencies_get()
except ApiException as e:
    print("Exception when calling RebalancingApi->referenceCurrenciesGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {

    let mut context = RebalancingApi::Context::default();
    let result = client.referenceCurrenciesGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


referenceGeographiesGet

List constrainable geographies

List of geographies which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema


/reference/geographies

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/reference/geographies"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceGeographiesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceGeographiesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.referenceGeographiesGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->referenceGeographiesGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceGeographiesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceGeographiesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];

// List constrainable geographies
[apiInstance referenceGeographiesGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.referenceGeographiesGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class referenceGeographiesGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();

            try {
                // List constrainable geographies
                apiInstance.referenceGeographiesGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.referenceGeographiesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();

try {
    $api_instance->referenceGeographiesGet();
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->referenceGeographiesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();

eval {
    $api_instance->referenceGeographiesGet();
};
if ($@) {
    warn "Exception when calling RebalancingApi->referenceGeographiesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()

try:
    # List constrainable geographies
    api_instance.reference_geographies_get()
except ApiException as e:
    print("Exception when calling RebalancingApi->referenceGeographiesGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {

    let mut context = RebalancingApi::Context::default();
    let result = client.referenceGeographiesGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


referenceRulesGet

List risk or optimisation rules

List of risk management / portfolio optimisation rules can be used to build a risk management strategy. Use the rule_id within the strategy schema


/reference/rules

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/reference/rules"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceRulesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceRulesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.referenceRulesGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->referenceRulesGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceRulesGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceRulesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];

// List risk or optimisation rules
[apiInstance referenceRulesGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.referenceRulesGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class referenceRulesGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();

            try {
                // List risk or optimisation rules
                apiInstance.referenceRulesGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.referenceRulesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();

try {
    $api_instance->referenceRulesGet();
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->referenceRulesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();

eval {
    $api_instance->referenceRulesGet();
};
if ($@) {
    warn "Exception when calling RebalancingApi->referenceRulesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()

try:
    # List risk or optimisation rules
    api_instance.reference_rules_get()
except ApiException as e:
    print("Exception when calling RebalancingApi->referenceRulesGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {

    let mut context = RebalancingApi::Context::default();
    let result = client.referenceRulesGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


referenceSectorsGet

List constrainable sectors

List of sectors which can be used as strategy constraints. Use the id as parameter in the constraint_generic schema


/reference/sectors

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/reference/sectors"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceSectorsGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceSectorsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.referenceSectorsGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->referenceSectorsGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();

        try {
            apiInstance.referenceSectorsGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#referenceSectorsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];

// List constrainable sectors
[apiInstance referenceSectorsGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.referenceSectorsGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class referenceSectorsGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();

            try {
                // List constrainable sectors
                apiInstance.referenceSectorsGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.referenceSectorsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();

try {
    $api_instance->referenceSectorsGet();
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->referenceSectorsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();

eval {
    $api_instance->referenceSectorsGet();
};
if ($@) {
    warn "Exception when calling RebalancingApi->referenceSectorsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()

try:
    # List constrainable sectors
    api_instance.reference_sectors_get()
except ApiException as e:
    print("Exception when calling RebalancingApi->referenceSectorsGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {

    let mut context = RebalancingApi::Context::default();
    let result = client.referenceSectorsGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


strategyDelete

Delete risk strategy

Delete a strategy


/strategy

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/strategy?strategy_id=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();
        Integer strategyId = 56; // Integer | unique identifier for the strategy

        try {
            apiInstance.strategyDelete(strategyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#strategyDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer strategyId = new Integer(); // Integer | unique identifier for the strategy

try {
    final result = await api_instance.strategyDelete(strategyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->strategyDelete: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();
        Integer strategyId = 56; // Integer | unique identifier for the strategy

        try {
            apiInstance.strategyDelete(strategyId);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#strategyDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];
Integer *strategyId = 56; // unique identifier for the strategy (default to null)

// Delete risk strategy
[apiInstance strategyDeleteWith:strategyId
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var strategyId = 56; // {Integer} unique identifier for the strategy

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.strategyDelete(strategyId, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class strategyDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();
            var strategyId = 56;  // Integer | unique identifier for the strategy (default to null)

            try {
                // Delete risk strategy
                apiInstance.strategyDelete(strategyId);
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.strategyDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();
$strategyId = 56; // Integer | unique identifier for the strategy

try {
    $api_instance->strategyDelete($strategyId);
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->strategyDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();
my $strategyId = 56; # Integer | unique identifier for the strategy

eval {
    $api_instance->strategyDelete(strategyId => $strategyId);
};
if ($@) {
    warn "Exception when calling RebalancingApi->strategyDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()
strategyId = 56 # Integer | unique identifier for the strategy (default to null)

try:
    # Delete risk strategy
    api_instance.strategy_delete(strategyId)
except ApiException as e:
    print("Exception when calling RebalancingApi->strategyDelete: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {
    let strategyId = 56; // Integer

    let mut context = RebalancingApi::Context::default();
    let result = client.strategyDelete(strategyId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
strategy_id*
Integer
unique identifier for the strategy
Required

Responses


strategyGet

View risk strategy(s)

This method provides the detail of one or more strategies. Strategies can be both created using MantaRisk's UI or this API. If a strategyid is provided, the query will return the detail of the specified strategy alongside any analysis that was carried on it. If a strategyid is not provided, the query will return the detail of all strategies but will not provide their associated analysis even if these are presetn in the system.


/strategy

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/strategy?strategy_id=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();
        Integer strategyId = 56; // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

        try {
            array[strategy_analysis] result = apiInstance.strategyGet(strategyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#strategyGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer strategyId = new Integer(); // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

try {
    final result = await api_instance.strategyGet(strategyId);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->strategyGet: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();
        Integer strategyId = 56; // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

        try {
            array[strategy_analysis] result = apiInstance.strategyGet(strategyId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#strategyGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];
Integer *strategyId = 56; // optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid (optional) (default to null)

// View risk strategy(s)
[apiInstance strategyGetWith:strategyId
              completionHandler: ^(array[strategy_analysis] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var opts = {
  'strategyId': 56 // {Integer} optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.strategyGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class strategyGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();
            var strategyId = 56;  // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid (optional)  (default to null)

            try {
                // View risk strategy(s)
                array[strategy_analysis] result = apiInstance.strategyGet(strategyId);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.strategyGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();
$strategyId = 56; // Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

try {
    $result = $api_instance->strategyGet($strategyId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->strategyGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();
my $strategyId = 56; # Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

eval {
    my $result = $api_instance->strategyGet(strategyId => $strategyId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling RebalancingApi->strategyGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()
strategyId = 56 # Integer | optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid (optional) (default to null)

try:
    # View risk strategy(s)
    api_response = api_instance.strategy_get(strategyId=strategyId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling RebalancingApi->strategyGet: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {
    let strategyId = 56; // Integer

    let mut context = RebalancingApi::Context::default();
    let result = client.strategyGet(strategyId, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
strategy_id
Integer
optional - the strategyid can be found on the MantaRisk UI or by using this method without specifying a strategyid

Responses


strategyPut

Save risk strategy


/strategy

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/strategy" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RebalancingApi;

import java.io.File;
import java.util.*;

public class RebalancingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        RebalancingApi apiInstance = new RebalancingApi();
        Strategy strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]}; // Strategy | 

        try {
            apiInstance.strategyPut(strategy);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#strategyPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Strategy strategy = new Strategy(); // Strategy | 

try {
    final result = await api_instance.strategyPut(strategy);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->strategyPut: $e\n');
}

import org.openapitools.client.api.RebalancingApi;

public class RebalancingApiExample {
    public static void main(String[] args) {
        RebalancingApi apiInstance = new RebalancingApi();
        Strategy strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]}; // Strategy | 

        try {
            apiInstance.strategyPut(strategy);
        } catch (ApiException e) {
            System.err.println("Exception when calling RebalancingApi#strategyPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
RebalancingApi *apiInstance = [[RebalancingApi alloc] init];
Strategy *strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]}; // 

// Save risk strategy
[apiInstance strategyPutWith:strategy
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.RebalancingApi()
var strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]}; // {Strategy} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.strategyPut(strategy, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class strategyPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new RebalancingApi();
            var strategy = new Strategy(); // Strategy | 

            try {
                // Save risk strategy
                apiInstance.strategyPut(strategy);
            } catch (Exception e) {
                Debug.Print("Exception when calling RebalancingApi.strategyPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RebalancingApi();
$strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]}; // Strategy | 

try {
    $api_instance->strategyPut($strategy);
} catch (Exception $e) {
    echo 'Exception when calling RebalancingApi->strategyPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RebalancingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RebalancingApi->new();
my $strategy = WWW::OPenAPIClient::Object::Strategy->new(); # Strategy | 

eval {
    $api_instance->strategyPut(strategy => $strategy);
};
if ($@) {
    warn "Exception when calling RebalancingApi->strategyPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.RebalancingApi()
strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]} # Strategy | 

try:
    # Save risk strategy
    api_instance.strategy_put(strategy)
except ApiException as e:
    print("Exception when calling RebalancingApi->strategyPut: %s\n" % e)
extern crate RebalancingApi;

pub fn main() {
    let strategy = {"name":"Example Strategy","rules":[{"constraints":[{"parameter":"Crypto","lower_bound":0,"upper_bound":1,"type":"AssetClassConstraint"},{"parameter":"EUR","name":"Currency","lower_bound":0,"upper_bound":1,"type":"CurrencyConstraint"},{"parameter":"EWA_ARCX_8","constraint_id":131,"lower_bound":0,"upper_bound":0.15,"type":"GeographyConstraint"},{"parameter":"KXI_ARCX_8","lower_bound":0,"upper_bound":0.15,"type":"SectorConstraint"},{"instrument":{"instrument_code":"VFC_XNYS","apiid":8},"lower_bound":0,"upper_bound":0.15,"type":"InstrumentConstraint"}],"rule_id":21,"parameters":[{"value":"false","key":"IncludeStopLimit","name":"Include Stop/Limit","description":"If true, the tactical risk management also manages the stops and limits of each orders. Default is false."},{"value":"2.0","key":"RebalanceTrigger","name":"Size Rebalance Trigger","description":"Triggers a rebalance if the size of a component is x% different to its target size. A value of 10 equates to 10%."},{"value":"Demo Portfolio","key":"Benchmark","name":"Unique Key","description":"Instrument unique key"}]}]}; // Strategy

    let mut context = RebalancingApi::Context::default();
    let result = client.strategyPut(strategy, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
strategy *

Optimisation strategy

Responses


Reporting

reportPdfPost

Investment Proposal PDF

Generates an Investment Proposal PDF for the given portfolio. The document includes a cover page, executive summary, portfolio allocation with charts, benchmark analysis, risk analysis, cash flow forecast, stress test results, and a holdings appendix. Charts are rendered as HTML/CSS within the PDF. When a benchmark is provided (instrument_code together with apiid), the Benchmark Analysis section includes alpha, beta, idiosyncratic risk and CVAR, plus yearly performance attribution broken down by asset class, geography and sector. An optional JSON body may be supplied to customise the report: - **report_name**: title used on the cover and executive summary, and the basis for the output filename. - **Section toggles**: `portfolio_composition`, `factor_exposure`, `risk_analytics`, `stress_testing`, `performance_analysis`, `cashflow_forecast`, `orders` — each a boolean (default true) that includes or excludes the corresponding top-level section. Excluded sections are omitted and the remaining sections are renumbered 1..N with no gaps. The Cover, Executive Summary and Disclaimer always render. - **efficient_frontier**: toggles the Monthly Risk / Expected Return subsection *within* the Stress Testing section. Only has effect when `stress_testing` is true. - **return_type**: selects the performance method, capm or historical (mirroring the UI Type toggle). - **firm**: a co-branding block (firm name, address lines, and a logo supplied as a data URI or HTTPS URL, rendered at 56x56px). - **comparison**: when true, renders the portfolio beside its proposed version (the shadow child) instead of a single-portfolio report. Requires a proposed version to already exist (create one via rebalance/optimise first); returns 400 otherwise. - **orders**: the Orders section lists the trades that move the portfolio to its proposed version. It renders only in comparison mode; on a single-portfolio report it is omitted whatever this toggle says. The PDF is returned as a downloadable attachment; the Content-Disposition header carries the derived filename (e.g. Investment_Proposal_Growth_Portfolio_2026-03-12.pdf), based on report_name where supplied.


/report/pdf

Usage and SDK Samples

curl -X POST \
-H "token: [[apiKey]]" \
 -H "Accept: application/json,application/pdf" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/report/pdf?client_reference=clientReference_example&instrument_code=CSSMI_XSWX&apiid=8" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ReportingApi;

import java.io.File;
import java.util.*;

public class ReportingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ReportingApi apiInstance = new ReportingApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
        String instrumentCode = CSSMI_XSWX; // String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
        Integer apiid = 8; // Integer | API for the benchmark. Can be found using the GET /index endpoint
        ReportPdfPostRequest reportPdfPostRequest = ; // ReportPdfPostRequest | 

        try {
            File result = apiInstance.reportPdfPost(clientReference, instrumentCode, apiid, reportPdfPostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportPdfPost");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final String clientReference = new String(); // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
final String instrumentCode = new String(); // String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
final Integer apiid = new Integer(); // Integer | API for the benchmark. Can be found using the GET /index endpoint
final ReportPdfPostRequest reportPdfPostRequest = new ReportPdfPostRequest(); // ReportPdfPostRequest | 

try {
    final result = await api_instance.reportPdfPost(clientReference, instrumentCode, apiid, reportPdfPostRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->reportPdfPost: $e\n');
}

import org.openapitools.client.api.ReportingApi;

public class ReportingApiExample {
    public static void main(String[] args) {
        ReportingApi apiInstance = new ReportingApi();
        String clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
        String instrumentCode = CSSMI_XSWX; // String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
        Integer apiid = 8; // Integer | API for the benchmark. Can be found using the GET /index endpoint
        ReportPdfPostRequest reportPdfPostRequest = ; // ReportPdfPostRequest | 

        try {
            File result = apiInstance.reportPdfPost(clientReference, instrumentCode, apiid, reportPdfPostRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportPdfPost");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
ReportingApi *apiInstance = [[ReportingApi alloc] init];
String *clientReference = clientReference_example; // Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)
String *instrumentCode = CSSMI_XSWX; // Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector. (optional) (default to null)
Integer *apiid = 8; // API for the benchmark. Can be found using the GET /index endpoint (optional) (default to null)
ReportPdfPostRequest *reportPdfPostRequest = ; //  (optional)

// Investment Proposal PDF
[apiInstance reportPdfPostWith:clientReference
    instrumentCode:instrumentCode
    apiid:apiid
    reportPdfPostRequest:reportPdfPostRequest
              completionHandler: ^(File output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.ReportingApi()
var clientReference = clientReference_example; // {String} Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
var opts = {
  'instrumentCode': CSSMI_XSWX, // {String} Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
  'apiid': 8, // {Integer} API for the benchmark. Can be found using the GET /index endpoint
  'reportPdfPostRequest':  // {ReportPdfPostRequest} 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.reportPdfPost(clientReference, opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reportPdfPostExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ReportingApi();
            var clientReference = clientReference_example;  // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)
            var instrumentCode = CSSMI_XSWX;  // String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector. (optional)  (default to null)
            var apiid = 8;  // Integer | API for the benchmark. Can be found using the GET /index endpoint (optional)  (default to null)
            var reportPdfPostRequest = new ReportPdfPostRequest(); // ReportPdfPostRequest |  (optional) 

            try {
                // Investment Proposal PDF
                File result = apiInstance.reportPdfPost(clientReference, instrumentCode, apiid, reportPdfPostRequest);
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ReportingApi.reportPdfPost: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ReportingApi();
$clientReference = clientReference_example; // String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
$instrumentCode = CSSMI_XSWX; // String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
$apiid = 8; // Integer | API for the benchmark. Can be found using the GET /index endpoint
$reportPdfPostRequest = ; // ReportPdfPostRequest | 

try {
    $result = $api_instance->reportPdfPost($clientReference, $instrumentCode, $apiid, $reportPdfPostRequest);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportingApi->reportPdfPost: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ReportingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ReportingApi->new();
my $clientReference = clientReference_example; # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
my $instrumentCode = CSSMI_XSWX; # String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
my $apiid = 8; # Integer | API for the benchmark. Can be found using the GET /index endpoint
my $reportPdfPostRequest = WWW::OPenAPIClient::Object::ReportPdfPostRequest->new(); # ReportPdfPostRequest | 

eval {
    my $result = $api_instance->reportPdfPost(clientReference => $clientReference, instrumentCode => $instrumentCode, apiid => $apiid, reportPdfPostRequest => $reportPdfPostRequest);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReportingApi->reportPdfPost: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ReportingApi()
clientReference = clientReference_example # String | Unique reference of the portfolio. Can be found using the GET /portfolio endpoint (default to null)
instrumentCode = CSSMI_XSWX # String | Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector. (optional) (default to null)
apiid = 8 # Integer | API for the benchmark. Can be found using the GET /index endpoint (optional) (default to null)
reportPdfPostRequest =  # ReportPdfPostRequest |  (optional)

try:
    # Investment Proposal PDF
    api_response = api_instance.report_pdf_post(clientReference, instrumentCode=instrumentCode, apiid=apiid, reportPdfPostRequest=reportPdfPostRequest)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReportingApi->reportPdfPost: %s\n" % e)
extern crate ReportingApi;

pub fn main() {
    let clientReference = clientReference_example; // String
    let instrumentCode = CSSMI_XSWX; // String
    let apiid = 8; // Integer
    let reportPdfPostRequest = ; // ReportPdfPostRequest

    let mut context = ReportingApi::Context::default();
    let result = client.reportPdfPost(clientReference, instrumentCode, apiid, reportPdfPostRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
reportPdfPostRequest

Optional report configuration. Omit the body for default behaviour.

Query parameters
Name Description
client_reference*
String
Unique reference of the portfolio. Can be found using the GET /portfolio endpoint
Required
instrument_code
String
Instrument code for the benchmark. Can be found using the GET /index endpoint. When provided along with apiid, the Benchmark Analysis section includes alpha, beta, idiosyncratic risk, CVAR, and yearly performance attribution by asset class, geography, and sector.
apiid
Integer
API for the benchmark. Can be found using the GET /index endpoint

Responses

Name Type Format Description
Content-Disposition String Attachment filename for the PDF

reportSettingsDelete

Clear saved organisation-level report defaults

Removes the stored configuration. Subsequent reports revert to platform defaults (request-body fields still apply).


/report/settings

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/report/settings"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ReportingApi;

import java.io.File;
import java.util.*;

public class ReportingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ReportingApi apiInstance = new ReportingApi();

        try {
            apiInstance.reportSettingsDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportSettingsDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.reportSettingsDelete();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->reportSettingsDelete: $e\n');
}

import org.openapitools.client.api.ReportingApi;

public class ReportingApiExample {
    public static void main(String[] args) {
        ReportingApi apiInstance = new ReportingApi();

        try {
            apiInstance.reportSettingsDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportSettingsDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
ReportingApi *apiInstance = [[ReportingApi alloc] init];

// Clear saved organisation-level report defaults
[apiInstance reportSettingsDeleteWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.ReportingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.reportSettingsDelete(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reportSettingsDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ReportingApi();

            try {
                // Clear saved organisation-level report defaults
                apiInstance.reportSettingsDelete();
            } catch (Exception e) {
                Debug.Print("Exception when calling ReportingApi.reportSettingsDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ReportingApi();

try {
    $api_instance->reportSettingsDelete();
} catch (Exception $e) {
    echo 'Exception when calling ReportingApi->reportSettingsDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ReportingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ReportingApi->new();

eval {
    $api_instance->reportSettingsDelete();
};
if ($@) {
    warn "Exception when calling ReportingApi->reportSettingsDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ReportingApi()

try:
    # Clear saved organisation-level report defaults
    api_instance.report_settings_delete()
except ApiException as e:
    print("Exception when calling ReportingApi->reportSettingsDelete: %s\n" % e)
extern crate ReportingApi;

pub fn main() {

    let mut context = ReportingApi::Context::default();
    let result = client.reportSettingsDelete(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


reportSettingsGet

Get saved organisation-level report defaults

Returns the JSON used as the default for every PDF report generated by users of this organisation. Empty object when no defaults have been set.


/report/settings

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/report/settings"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ReportingApi;

import java.io.File;
import java.util.*;

public class ReportingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ReportingApi apiInstance = new ReportingApi();

        try {
            Object result = apiInstance.reportSettingsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportSettingsGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.reportSettingsGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->reportSettingsGet: $e\n');
}

import org.openapitools.client.api.ReportingApi;

public class ReportingApiExample {
    public static void main(String[] args) {
        ReportingApi apiInstance = new ReportingApi();

        try {
            Object result = apiInstance.reportSettingsGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportSettingsGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
ReportingApi *apiInstance = [[ReportingApi alloc] init];

// Get saved organisation-level report defaults
[apiInstance reportSettingsGetWithCompletionHandler: 
              ^(Object output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.ReportingApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.reportSettingsGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reportSettingsGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ReportingApi();

            try {
                // Get saved organisation-level report defaults
                Object result = apiInstance.reportSettingsGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling ReportingApi.reportSettingsGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ReportingApi();

try {
    $result = $api_instance->reportSettingsGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportingApi->reportSettingsGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ReportingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ReportingApi->new();

eval {
    my $result = $api_instance->reportSettingsGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReportingApi->reportSettingsGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ReportingApi()

try:
    # Get saved organisation-level report defaults
    api_response = api_instance.report_settings_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReportingApi->reportSettingsGet: %s\n" % e)
extern crate ReportingApi;

pub fn main() {

    let mut context = ReportingApi::Context::default();
    let result = client.reportSettingsGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


reportSettingsPut

Save organisation-level report defaults

Replaces the entire saved configuration for the authenticated user's organisation. Any user belonging to the organisation may write. The body has the same shape as the POST /report/pdf body, minus `report_name` (which is intrinsically per-call and is stripped server-side if supplied). `firm.logo` is capped at 256 KiB; oversized payloads are rejected with 413.


/report/settings

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/report/settings" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.ReportingApi;

import java.io.File;
import java.util.*;

public class ReportingApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        ReportingApi apiInstance = new ReportingApi();
        ReportSettingsPutRequest reportSettingsPutRequest = ; // ReportSettingsPutRequest | 

        try {
            apiInstance.reportSettingsPut(reportSettingsPutRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportSettingsPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final ReportSettingsPutRequest reportSettingsPutRequest = new ReportSettingsPutRequest(); // ReportSettingsPutRequest | 

try {
    final result = await api_instance.reportSettingsPut(reportSettingsPutRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->reportSettingsPut: $e\n');
}

import org.openapitools.client.api.ReportingApi;

public class ReportingApiExample {
    public static void main(String[] args) {
        ReportingApi apiInstance = new ReportingApi();
        ReportSettingsPutRequest reportSettingsPutRequest = ; // ReportSettingsPutRequest | 

        try {
            apiInstance.reportSettingsPut(reportSettingsPutRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportingApi#reportSettingsPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
ReportingApi *apiInstance = [[ReportingApi alloc] init];
ReportSettingsPutRequest *reportSettingsPutRequest = ; // 

// Save organisation-level report defaults
[apiInstance reportSettingsPutWith:reportSettingsPutRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.ReportingApi()
var reportSettingsPutRequest = ; // {ReportSettingsPutRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.reportSettingsPut(reportSettingsPutRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class reportSettingsPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new ReportingApi();
            var reportSettingsPutRequest = new ReportSettingsPutRequest(); // ReportSettingsPutRequest | 

            try {
                // Save organisation-level report defaults
                apiInstance.reportSettingsPut(reportSettingsPutRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling ReportingApi.reportSettingsPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\ReportingApi();
$reportSettingsPutRequest = ; // ReportSettingsPutRequest | 

try {
    $api_instance->reportSettingsPut($reportSettingsPutRequest);
} catch (Exception $e) {
    echo 'Exception when calling ReportingApi->reportSettingsPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::ReportingApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::ReportingApi->new();
my $reportSettingsPutRequest = WWW::OPenAPIClient::Object::ReportSettingsPutRequest->new(); # ReportSettingsPutRequest | 

eval {
    $api_instance->reportSettingsPut(reportSettingsPutRequest => $reportSettingsPutRequest);
};
if ($@) {
    warn "Exception when calling ReportingApi->reportSettingsPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.ReportingApi()
reportSettingsPutRequest =  # ReportSettingsPutRequest | 

try:
    # Save organisation-level report defaults
    api_instance.report_settings_put(reportSettingsPutRequest)
except ApiException as e:
    print("Exception when calling ReportingApi->reportSettingsPut: %s\n" % e)
extern crate ReportingApi;

pub fn main() {
    let reportSettingsPutRequest = ; // ReportSettingsPutRequest

    let mut context = ReportingApi::Context::default();
    let result = client.reportSettingsPut(reportSettingsPutRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
reportSettingsPutRequest *

Responses


UserManagement

historyApiGet

View data sources

Returns the list of the pricing data providers currently available on this account. The "User Feed" API denotes the API id which must be used to retrieve user inputted pricing data. It is static for a given environment but will differ from environment to environment. Other API ids are static across all environments and are provided by MantaRisk when searching for an instrument.


/history/api

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/history/api"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserManagementApi;

import java.io.File;
import java.util.*;

public class UserManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserManagementApi apiInstance = new UserManagementApi();

        try {
            apiInstance.historyApiGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#historyApiGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.historyApiGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->historyApiGet: $e\n');
}

import org.openapitools.client.api.UserManagementApi;

public class UserManagementApiExample {
    public static void main(String[] args) {
        UserManagementApi apiInstance = new UserManagementApi();

        try {
            apiInstance.historyApiGet();
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#historyApiGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserManagementApi *apiInstance = [[UserManagementApi alloc] init];

// View data sources
[apiInstance historyApiGetWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserManagementApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.historyApiGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class historyApiGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserManagementApi();

            try {
                // View data sources
                apiInstance.historyApiGet();
            } catch (Exception e) {
                Debug.Print("Exception when calling UserManagementApi.historyApiGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserManagementApi();

try {
    $api_instance->historyApiGet();
} catch (Exception $e) {
    echo 'Exception when calling UserManagementApi->historyApiGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserManagementApi->new();

eval {
    $api_instance->historyApiGet();
};
if ($@) {
    warn "Exception when calling UserManagementApi->historyApiGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserManagementApi()

try:
    # View data sources
    api_instance.history_api_get()
except ApiException as e:
    print("Exception when calling UserManagementApi->historyApiGet: %s\n" % e)
extern crate UserManagementApi;

pub fn main() {

    let mut context = UserManagementApi::Context::default();
    let result = client.historyApiGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


userBillingGet

View invoice information

Returns the billing history for the user, including breakdown per service. For distributors, also includes the breakdown per organisation.


/user/billing

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/user/billing?from_date=2023-10-25"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserManagementApi;

import java.io.File;
import java.util.*;

public class UserManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserManagementApi apiInstance = new UserManagementApi();
        date fromDate = 2023-10-25; // date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.

        try {
            apiInstance.userBillingGet(fromDate);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userBillingGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final date fromDate = new date(); // date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.

try {
    final result = await api_instance.userBillingGet(fromDate);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userBillingGet: $e\n');
}

import org.openapitools.client.api.UserManagementApi;

public class UserManagementApiExample {
    public static void main(String[] args) {
        UserManagementApi apiInstance = new UserManagementApi();
        date fromDate = 2023-10-25; // date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.

        try {
            apiInstance.userBillingGet(fromDate);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userBillingGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserManagementApi *apiInstance = [[UserManagementApi alloc] init];
date *fromDate = 2023-10-25; // optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339. (optional) (default to null)

// View invoice information
[apiInstance userBillingGetWith:fromDate
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserManagementApi()
var opts = {
  'fromDate': 2023-10-25 // {date} optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.userBillingGet(opts, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userBillingGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserManagementApi();
            var fromDate = 2023-10-25;  // date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339. (optional)  (default to null)

            try {
                // View invoice information
                apiInstance.userBillingGet(fromDate);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserManagementApi.userBillingGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserManagementApi();
$fromDate = 2023-10-25; // date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.

try {
    $api_instance->userBillingGet($fromDate);
} catch (Exception $e) {
    echo 'Exception when calling UserManagementApi->userBillingGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserManagementApi->new();
my $fromDate = 2023-10-25; # date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.

eval {
    $api_instance->userBillingGet(fromDate => $fromDate);
};
if ($@) {
    warn "Exception when calling UserManagementApi->userBillingGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserManagementApi()
fromDate = 2023-10-25 # date | optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339. (optional) (default to null)

try:
    # View invoice information
    api_instance.user_billing_get(fromDate=fromDate)
except ApiException as e:
    print("Exception when calling UserManagementApi->userBillingGet: %s\n" % e)
extern crate UserManagementApi;

pub fn main() {
    let fromDate = 2023-10-25; // date

    let mut context = UserManagementApi::Context::default();
    let result = client.userBillingGet(fromDate, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
from_date
date (date)
optional parameter to the billing history from the given date (inclusive). Formatted following RFC 3339.

Responses


userDelete

Delete user data

USE WITH CAUTION! Delete this user and all its associated data.


/user

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/user?userid=56"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserManagementApi;

import java.io.File;
import java.util.*;

public class UserManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserManagementApi apiInstance = new UserManagementApi();
        Integer userid = 56; // Integer | the display name for the user

        try {
            apiInstance.userDelete(userid);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final Integer userid = new Integer(); // Integer | the display name for the user

try {
    final result = await api_instance.userDelete(userid);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userDelete: $e\n');
}

import org.openapitools.client.api.UserManagementApi;

public class UserManagementApiExample {
    public static void main(String[] args) {
        UserManagementApi apiInstance = new UserManagementApi();
        Integer userid = 56; // Integer | the display name for the user

        try {
            apiInstance.userDelete(userid);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserManagementApi *apiInstance = [[UserManagementApi alloc] init];
Integer *userid = 56; // the display name for the user (default to null)

// Delete user data
[apiInstance userDeleteWith:userid
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserManagementApi()
var userid = 56; // {Integer} the display name for the user

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.userDelete(userid, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserManagementApi();
            var userid = 56;  // Integer | the display name for the user (default to null)

            try {
                // Delete user data
                apiInstance.userDelete(userid);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserManagementApi.userDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserManagementApi();
$userid = 56; // Integer | the display name for the user

try {
    $api_instance->userDelete($userid);
} catch (Exception $e) {
    echo 'Exception when calling UserManagementApi->userDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserManagementApi->new();
my $userid = 56; # Integer | the display name for the user

eval {
    $api_instance->userDelete(userid => $userid);
};
if ($@) {
    warn "Exception when calling UserManagementApi->userDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserManagementApi()
userid = 56 # Integer | the display name for the user (default to null)

try:
    # Delete user data
    api_instance.user_delete(userid)
except ApiException as e:
    print("Exception when calling UserManagementApi->userDelete: %s\n" % e)
extern crate UserManagementApi;

pub fn main() {
    let userid = 56; // Integer

    let mut context = UserManagementApi::Context::default();
    let result = client.userDelete(userid, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Query parameters
Name Description
userid*
Integer
the display name for the user
Required

Responses


userGet

View user information

Returns status information about the user currently logged in (token).


/user

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/user"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserManagementApi;

import java.io.File;
import java.util.*;

public class UserManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserManagementApi apiInstance = new UserManagementApi();

        try {
            user result = apiInstance.userGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.userGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userGet: $e\n');
}

import org.openapitools.client.api.UserManagementApi;

public class UserManagementApiExample {
    public static void main(String[] args) {
        UserManagementApi apiInstance = new UserManagementApi();

        try {
            user result = apiInstance.userGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserManagementApi *apiInstance = [[UserManagementApi alloc] init];

// View user information
[apiInstance userGetWithCompletionHandler: 
              ^(user output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserManagementApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.userGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserManagementApi();

            try {
                // View user information
                user result = apiInstance.userGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserManagementApi.userGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserManagementApi();

try {
    $result = $api_instance->userGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserManagementApi->userGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserManagementApi->new();

eval {
    my $result = $api_instance->userGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserManagementApi->userGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserManagementApi()

try:
    # View user information
    api_response = api_instance.user_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserManagementApi->userGet: %s\n" % e)
extern crate UserManagementApi;

pub fn main() {

    let mut context = UserManagementApi::Context::default();
    let result = client.userGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


userPut

Update user information

Allow the user's name and reference date to be modified.


/user

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/user" \
 -d ''
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserManagementApi;

import java.io.File;
import java.util.*;

public class UserManagementApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserManagementApi apiInstance = new UserManagementApi();
        UserPutRequest userPutRequest = ; // UserPutRequest | 

        try {
            apiInstance.userPut(userPutRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final UserPutRequest userPutRequest = new UserPutRequest(); // UserPutRequest | 

try {
    final result = await api_instance.userPut(userPutRequest);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userPut: $e\n');
}

import org.openapitools.client.api.UserManagementApi;

public class UserManagementApiExample {
    public static void main(String[] args) {
        UserManagementApi apiInstance = new UserManagementApi();
        UserPutRequest userPutRequest = ; // UserPutRequest | 

        try {
            apiInstance.userPut(userPutRequest);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserManagementApi#userPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserManagementApi *apiInstance = [[UserManagementApi alloc] init];
UserPutRequest *userPutRequest = ; // 

// Update user information
[apiInstance userPutWith:userPutRequest
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserManagementApi()
var userPutRequest = ; // {UserPutRequest} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.userPut(userPutRequest, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserManagementApi();
            var userPutRequest = new UserPutRequest(); // UserPutRequest | 

            try {
                // Update user information
                apiInstance.userPut(userPutRequest);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserManagementApi.userPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserManagementApi();
$userPutRequest = ; // UserPutRequest | 

try {
    $api_instance->userPut($userPutRequest);
} catch (Exception $e) {
    echo 'Exception when calling UserManagementApi->userPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserManagementApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserManagementApi->new();
my $userPutRequest = WWW::OPenAPIClient::Object::UserPutRequest->new(); # UserPutRequest | 

eval {
    $api_instance->userPut(userPutRequest => $userPutRequest);
};
if ($@) {
    warn "Exception when calling UserManagementApi->userPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserManagementApi()
userPutRequest =  # UserPutRequest | 

try:
    # Update user information
    api_instance.user_put(userPutRequest)
except ApiException as e:
    print("Exception when calling UserManagementApi->userPut: %s\n" % e)
extern crate UserManagementApi;

pub fn main() {
    let userPutRequest = ; // UserPutRequest

    let mut context = UserManagementApi::Context::default();
    let result = client.userPut(userPutRequest, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
userPutRequest *

Responses


UserSettings

userAssetclassesDelete

Reset asset class mapping

Reset the Asset Class to Asset Type mapping to MantaRisk's default mapping


/user/assetclasses

Usage and SDK Samples

curl -X DELETE \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/user/assetclasses"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserSettingsApi;

import java.io.File;
import java.util.*;

public class UserSettingsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserSettingsApi apiInstance = new UserSettingsApi();

        try {
            apiInstance.userAssetclassesDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling UserSettingsApi#userAssetclassesDelete");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.userAssetclassesDelete();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userAssetclassesDelete: $e\n');
}

import org.openapitools.client.api.UserSettingsApi;

public class UserSettingsApiExample {
    public static void main(String[] args) {
        UserSettingsApi apiInstance = new UserSettingsApi();

        try {
            apiInstance.userAssetclassesDelete();
        } catch (ApiException e) {
            System.err.println("Exception when calling UserSettingsApi#userAssetclassesDelete");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserSettingsApi *apiInstance = [[UserSettingsApi alloc] init];

// Reset asset class mapping
[apiInstance userAssetclassesDeleteWithCompletionHandler: 
              ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserSettingsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.userAssetclassesDelete(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userAssetclassesDeleteExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserSettingsApi();

            try {
                // Reset asset class mapping
                apiInstance.userAssetclassesDelete();
            } catch (Exception e) {
                Debug.Print("Exception when calling UserSettingsApi.userAssetclassesDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserSettingsApi();

try {
    $api_instance->userAssetclassesDelete();
} catch (Exception $e) {
    echo 'Exception when calling UserSettingsApi->userAssetclassesDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserSettingsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserSettingsApi->new();

eval {
    $api_instance->userAssetclassesDelete();
};
if ($@) {
    warn "Exception when calling UserSettingsApi->userAssetclassesDelete: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserSettingsApi()

try:
    # Reset asset class mapping
    api_instance.user_assetclasses_delete()
except ApiException as e:
    print("Exception when calling UserSettingsApi->userAssetclassesDelete: %s\n" % e)
extern crate UserSettingsApi;

pub fn main() {

    let mut context = UserSettingsApi::Context::default();
    let result = client.userAssetclassesDelete(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


userAssetclassesGet

View asset class mapping

Returns the asset class mapping from ISO 10962 codes to user categories. Analytics use the user categories to aggregate data.


/user/assetclasses

Usage and SDK Samples

curl -X GET \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 "https://api.mantarisk.com/v1/user/assetclasses"
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserSettingsApi;

import java.io.File;
import java.util.*;

public class UserSettingsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserSettingsApi apiInstance = new UserSettingsApi();

        try {
            array[asset_class] result = apiInstance.userAssetclassesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserSettingsApi#userAssetclassesGet");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();


try {
    final result = await api_instance.userAssetclassesGet();
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userAssetclassesGet: $e\n');
}

import org.openapitools.client.api.UserSettingsApi;

public class UserSettingsApiExample {
    public static void main(String[] args) {
        UserSettingsApi apiInstance = new UserSettingsApi();

        try {
            array[asset_class] result = apiInstance.userAssetclassesGet();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserSettingsApi#userAssetclassesGet");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserSettingsApi *apiInstance = [[UserSettingsApi alloc] init];

// View asset class mapping
[apiInstance userAssetclassesGetWithCompletionHandler: 
              ^(array[asset_class] output, NSError* error) {
    if (output) {
        NSLog(@"%@", output);
    }
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserSettingsApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.userAssetclassesGet(callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userAssetclassesGetExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserSettingsApi();

            try {
                // View asset class mapping
                array[asset_class] result = apiInstance.userAssetclassesGet();
                Debug.WriteLine(result);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserSettingsApi.userAssetclassesGet: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserSettingsApi();

try {
    $result = $api_instance->userAssetclassesGet();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UserSettingsApi->userAssetclassesGet: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserSettingsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserSettingsApi->new();

eval {
    my $result = $api_instance->userAssetclassesGet();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UserSettingsApi->userAssetclassesGet: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserSettingsApi()

try:
    # View asset class mapping
    api_response = api_instance.user_assetclasses_get()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UserSettingsApi->userAssetclassesGet: %s\n" % e)
extern crate UserSettingsApi;

pub fn main() {

    let mut context = UserSettingsApi::Context::default();
    let result = client.userAssetclassesGet(&context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Responses


userAssetclassesPut

Update asset class mapping

Allow the user to modify its Asset Class to Asset Type mapping. The Asset Type is used to aggregate statistics such as CVAR, Performance Attribution etc. Points to note: - A top level mapping must always be provided e.g. E mapped to Equity for instance. This allows the engine to map instruments for which we do not have finer grained classification. - The mapping is hierarchical to for instance if E is mapped to Equity and EY is mapped to Derivatives then all equities sub categories will be mapped to Equity except for EY and its sub categories which will be mapped to Derivatives - The mapping can use 'X' as a wildcard character e.g. CEXXE


/user/assetclasses

Usage and SDK Samples

curl -X PUT \
-H "token: [[apiKey]]" \
 -H "Accept: application/json" \
 -H "Content-Type: application/json" \
 "https://api.mantarisk.com/v1/user/assetclasses" \
 -d '{
  "asset_class" : "IT",
  "asset_type" : "Commodities"
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.UserSettingsApi;

import java.io.File;
import java.util.*;

public class UserSettingsApiExample {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();

        // Configure API key authorization: ApiKeyAuth
        ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth");
        ApiKeyAuth.setApiKey("YOUR API KEY");
        // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
        //ApiKeyAuth.setApiKeyPrefix("Token");

        // Create an instance of the API class
        UserSettingsApi apiInstance = new UserSettingsApi();
        array[asset_class] assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}]; // array[asset_class] | 

        try {
            apiInstance.userAssetclassesPut(assetClass);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserSettingsApi#userAssetclassesPut");
            e.printStackTrace();
        }
    }
}
import 'package:openapi/api.dart';

final api_instance = DefaultApi();

final array[asset_class] assetClass = new array[asset_class](); // array[asset_class] | 

try {
    final result = await api_instance.userAssetclassesPut(assetClass);
    print(result);
} catch (e) {
    print('Exception when calling DefaultApi->userAssetclassesPut: $e\n');
}

import org.openapitools.client.api.UserSettingsApi;

public class UserSettingsApiExample {
    public static void main(String[] args) {
        UserSettingsApi apiInstance = new UserSettingsApi();
        array[asset_class] assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}]; // array[asset_class] | 

        try {
            apiInstance.userAssetclassesPut(assetClass);
        } catch (ApiException e) {
            System.err.println("Exception when calling UserSettingsApi#userAssetclassesPut");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure API key authorization: (authentication scheme: ApiKeyAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"token"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"token"];


// Create an instance of the API class
UserSettingsApi *apiInstance = [[UserSettingsApi alloc] init];
array[asset_class] *assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}]; // 

// Update asset class mapping
[apiInstance userAssetclassesPutWith:assetClass
              completionHandler: ^(NSError* error) {
    if (error) {
        NSLog(@"Error: %@", error);
    }
}];
var MantaRiskRestApi = require('manta_risk_rest_api');
var defaultClient = MantaRiskRestApi.ApiClient.instance;

// Configure API key authorization: ApiKeyAuth
var ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = "YOUR API KEY";
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix['token'] = "Token";

// Create an instance of the API class
var api = new MantaRiskRestApi.UserSettingsApi()
var assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}]; // {array[asset_class]} 

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.userAssetclassesPut(assetClass, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class userAssetclassesPutExample
    {
        public void main()
        {
            // Configure API key authorization: ApiKeyAuth
            Configuration.Default.ApiKey.Add("token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("token", "Bearer");

            // Create an instance of the API class
            var apiInstance = new UserSettingsApi();
            var assetClass = new array[asset_class](); // array[asset_class] | 

            try {
                // Update asset class mapping
                apiInstance.userAssetclassesPut(assetClass);
            } catch (Exception e) {
                Debug.Print("Exception when calling UserSettingsApi.userAssetclassesPut: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: ApiKeyAuth
OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// OpenAPITools\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');

// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\UserSettingsApi();
$assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}]; // array[asset_class] | 

try {
    $api_instance->userAssetclassesPut($assetClass);
} catch (Exception $e) {
    echo 'Exception when calling UserSettingsApi->userAssetclassesPut: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::UserSettingsApi;

# Configure API key authorization: ApiKeyAuth
$WWW::OPenAPIClient::Configuration::api_key->{'token'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::OPenAPIClient::Configuration::api_key_prefix->{'token'} = "Bearer";

# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::UserSettingsApi->new();
my $assetClass = [WWW::OPenAPIClient::Object::array[asset_class]->new()]; # array[asset_class] | 

eval {
    $api_instance->userAssetclassesPut(assetClass => $assetClass);
};
if ($@) {
    warn "Exception when calling UserSettingsApi->userAssetclassesPut: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: ApiKeyAuth
openapi_client.configuration.api_key['token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# openapi_client.configuration.api_key_prefix['token'] = 'Bearer'

# Create an instance of the API class
api_instance = openapi_client.UserSettingsApi()
assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}] # array[asset_class] | 

try:
    # Update asset class mapping
    api_instance.user_assetclasses_put(assetClass)
except ApiException as e:
    print("Exception when calling UserSettingsApi->userAssetclassesPut: %s\n" % e)
extern crate UserSettingsApi;

pub fn main() {
    let assetClass = [{"asset_class":"C","asset_type":"Funds"},{"asset_class":"D","asset_type":"Fixed Income"},{"asset_class":"E","asset_type":"Equities"},{"asset_class":"F","asset_type":"Futures"},{"asset_class":"H","asset_type":"Options"},{"asset_class":"I","asset_type":"Spot"},{"asset_class":"J","asset_type":"Forwards"},{"asset_class":"K","asset_type":"Strategies"},{"asset_class":"IT","asset_type":"Commodities"},{"asset_class":"L","asset_type":"Financing"},{"asset_class":"M","asset_type":"Other"},{"asset_class":"O","asset_type":"Options"},{"asset_class":"R","asset_type":"Entitlement (rights)"},{"asset_class":"S","asset_type":"Swaps"},{"asset_class":"T","asset_type":"Referential instruments"},{"asset_class":"TI","asset_type":"Index"},{"asset_class":"IF","asset_type":"Forex"},{"asset_class":"TCM","asset_type":"Crypto"}]; // array[asset_class]

    let mut context = UserSettingsApi::Context::default();
    let result = client.userAssetclassesPut(assetClass, &context).wait();

    println!("{:?}", result);
}

Scopes

Parameters

Body parameters
Name Description
assetClass *

Asset Class to Asset Type mapping

Responses