MantaRisk API

Getting Started (API)

7min

This section provides you will all you need to get started using the API. Should you have any issues however, please to not hesitate to contact us with the following means:

1 - API Account

To use our API, you must first create an API account. You can do so here:

Choose the "Institutional API" option.

For security reasons, a verification email will be sent to the email address you specify in the form. This email tends to find its way into junk mail so please check this too. The process is instantaneaous, if you do not receive an email within 5 mins, something went wrong somewhere.

2 - API Key

The next step is to generate a key which you will use to programmatically authenticate when using the API.

Once logged into MantaRisk, go to the User section (see screenshot below). Here press the Generate button. The key will be generated and associated to your account.

Please make note of the key! For security reasons, it will disappear as soon as you exit the page and cannot be retrieved. If you happen to have lost your API key, then a new one needs to be generated by pressing the Generate button.

An account can only ever have one API key. Generating a new key will discard your old one and any system using the old key will no longer be able to access our API.

Document image


3 - Test Environment

Our API documentation is hosted on swagger and is available here:

Here you can choose to test against one of two servers:

  • The SwaggerHub Mock server which serves pre-canned responses to your requests. This is free and constitutes a good way to develop your application against our API. Any random API key can be used for this service as it is not validated.
  • The MantaRisk production server. This is the real risk engine which performs on-demand analytics. To use this you need the API key generated in the previous step. Calls to this service are charged as per usual.



Document image


4 - First Analytics Workflow

Two items are required to obtain your first set of analytics:

  • A portfolio composition
  • A risk strategy

4.1 - Portfolio Composition

To add a portfolio composition, you must make a PUT call to the /portfolio endpoint:

The clientReference field comes from you and allows you to retrieve a given portfolio through a reference internal to your systems.

If you have just started, you will be setup with our free data source which has coverage for US stocks. You can learn more about Data Sources here.

Make sure your portfolio contains at least 2 instruments. For instance you can use TSLA, AMZN and SBUX for this step.

4.2 - Risk Strategy

The risk strategy is controlled from our UI: https://mantarisk.com/strategy_builder

We suggest you use our default strategy to start with. Make note of the number preceeding the name of the strategy. This is the strategyid and you will need it for later. In the example below 106.

Document image


4.3 - Analytics

Your are now ready to obtain your first set of analytics. To do this you must use the /portfolio/analysis endpoint refering the clientReference and strategyid from the previous steps.