Advanced search for Result-Details collection

SEARCH is an experience/resource type API designed to provide support to the search of RESULT-DETAILS collection. This is part of the advanced query search.

The operation uses the next query objects:

  • Filters: every filter applied MUST be present with the provided value set.
  • Restrictions: every object returned in the collection MUST be validated on the restriction.

Every restriction and filter is applied with AND operation. As example:

POST simulations/{simulationId}/result/{resultId}/details/search
{
    "filters": [
        {
            "attribute": "attributeId",
            "values": [
                "attributeValue"
            ]
        }

    ], 
    "restrictions": [
        {
          "attribute": "numericAttributeId",
          "type": "decimal",
          "operator": "and",
          "values": [
              {
                "restriction": "lte",
                "value": "2.0"
            },
            {
                "restriction": "gte",
                "value": "1.0"
            }
        ]
      }
    ]
}

This is equivalent to: WHERE attributeId IN (“attributeValue”) AND numericAttributeId > 1.0 AND numericAttributeId < 2.0

Results could be ordered by any field.

post

Query Parameters

page[size]integer

Pagination options for the collection search. It permits the next modifiers:

  • page[size]
  • page[number]

Default values defined are page[number]=1 and page[size]=20

page[number]integer

Pagination options for the collection search. It permits the next modifiers:

  • page[size]
  • page[number]

Default values defined are page[number]=1 and page[size]=20

sortstring

Sort query parameter permits the sorting of the collection by the values of the attribute provided in the parameter:

GET simulations?sort=+attribute

The type of sort:

  • (+) Indicates ascending order. +attribute
  • (-) Indicates descending order. -attribute
  • If no symbol is provided, any default order could be returned

If sort is not provided, the collection is returned in a default order by ID.

The name of the attribute should exists in the object. If the name does not exists, it returns 400 Bad Request.

Path Parameters

simulationIdstring(string)required

UUID type implementing the RFC 4122.

Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Example:95b1b467-bd69-4436-8181-96c16408c230

resultIdstring(string)required

UUID type implementing the RFC 4122.

Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Example:95b1b467-bd69-4436-8181-96c16408c230

Body

application/json

QueryType

filtersarray[object]

Filters restricting the search. All of the values in the Array represent AND operation.

Show Child Parameters
restrictionsarray[object]

List of restrictions applied to the collection

Show Child Parameters

Response

application/vnd.api+json

Ok

ResultDetailsJsonApiType

Collection in JSON:API format. Collection is paginated

linksobjectrequired
Show Child Parameters
dataarray[object]requiredread-only

Data structure for all operations.

Show Child Parameters
metaobjectrequired
Show Child Parameters
post/simulations/{simulationId}/results/{resultId}/details/search

Body

{ "filters": [ { "attribute": "attributeId", "values": [ "attributeValue" ] } ], "restrictions": [ { "attribute": "numericAttributeId", "type": "decimal", "operator": "and", "values": [ { "restriction": "lte", "value": "2.0" }, { "restriction": "gte", "value": "1.0" } ] } ] }
 
application/vnd.api+json

Open-Positions

Open positions management endpoints

Advanced search for Open Position collection

SEARCH is an experience/resource type API designed to provide support to the search of OPEN-POSITION collection. This is part of the advanced query search.

The operation uses the next query objects:

  • Filters: every filter applied MUST be present with the provided value set.
  • Restrictions: every object returned in the collection MUST be validated on the restriction.

Every restriction and filter is applied with AND operation. As example:

POST simulations/{simulationId}/open-positions/search
{
    "filters": [
        {
            "attribute": "attributeId",
            "values": [
                "attributeValue"
            ]
        }

    ], 
    "restrictions": [
        {
          "attribute": "numericAttributeId",
          "type": "decimal",
          "operator": "and",
          "values": [
              {
                "restriction": "lte",
                "value": "2.0"
            },
            {
                "restriction": "gte",
                "value": "1.0"
            }
        ]
      }
    ]
}

This is equivalent to: WHERE attributeId IN (“attributeValue”) AND numericAttributeId > 1.0 AND numericAttributeId < 2.0

Results could be ordered by any field.

post

Query Parameters

page[size]integer

Pagination options for the collection search. It permits the next modifiers:

  • page[size]
  • page[number]

Default values defined are page[number]=1 and page[size]=20

page[number]integer

Pagination options for the collection search. It permits the next modifiers:

  • page[size]
  • page[number]

Default values defined are page[number]=1 and page[size]=20

sortstring

Sort query parameter permits the sorting of the collection by the values of the attribute provided in the parameter:

GET simulations?sort=+attribute

The type of sort:

  • (+) Indicates ascending order. +attribute
  • (-) Indicates descending order. -attribute
  • If no symbol is provided, any default order could be returned

If sort is not provided, the collection is returned in a default order by ID.

The name of the attribute should exists in the object. If the name does not exists, it returns 400 Bad Request.

Path Parameters

simulationIdstring(string)required

UUID type implementing the RFC 4122.

Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Example:95b1b467-bd69-4436-8181-96c16408c230

Body

application/json

QueryType

filtersarray[object]

Filters restricting the search. All of the values in the Array represent AND operation.

Show Child Parameters
restrictionsarray[object]

List of restrictions applied to the collection

Show Child Parameters

Response

application/vnd.api+json

Ok

OpenPositionsJsonApiType

Collection in JSON:API format. Collection is paginated

linksobjectrequired
Show Child Parameters
dataarray[object]requiredread-only

Data structure for all operations.

Show Child Parameters
metaobjectrequired
Show Child Parameters
post/simulations/{simulationId}/open-positions/search

Body

{ "filters": [ { "attribute": "attributeId", "values": [ "attributeValue" ] } ], "restrictions": [ { "attribute": "numericAttributeId", "type": "decimal", "operator": "and", "values": [ { "restriction": "lte", "value": "2.0" }, { "restriction": "gte", "value": "1.0" } ] } ] }
 
application/vnd.api+json

Import current organization´s open positions

Every API client belongs to an organization. This operation imports to the simulator the existing open posistions for the given date.

post

Path Parameters

simulationIdstring(string)required

UUID type implementing the RFC 4122.

Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Example:95b1b467-bd69-4436-8181-96c16408c230

Body

application/vnd.api+json

Import Open Positions

ImportOpenPositionsJsonApiType

Collection in JSON:API format. Collection is paginated

dataobjectrequired

Data structure for all operations.

Show Child Parameters

Response

Ok

post/simulations/{simulationId}/import-open-positions

Body

{ "data": { "attributes": { "date": "2022-01-02", "portfolio": "SAN0001C10", "riskGroupId": "C1", "compensationMemberId": "A2", "guaranteeAccount": "G00001A23S", "contract": "CLE93211A2" }, "type": "import-open-positions" } }
 

Modify specific Open-Position

Modify existing Open-Position

patch

Path Parameters

simulationIdstring(string)required

UUID type implementing the RFC 4122.

Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Example:95b1b467-bd69-4436-8181-96c16408c230

openPositionIdstring(string)required

UUID type implementing the RFC 4122.

Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$

Example:95b1b467-bd69-4436-8181-96c16408c230

Body

application/vnd.api+json

Open-Position

OpenPositionJsonApiType

dataobjectrequired

Data structure for all operations.

Show Child Parameters

Response

application/vnd.api+json

Ok

OpenPositionJsonApiType

dataobjectrequired

Data structure for all operations.

Show Child Parameters
patch/simulations/{simulationId}/open-positions/{openPositionId}

Body

{ "data": { "attributes": { "date": "2022-01-02", "riskGroupId": "C1", "compensationMemberId": "A2", "guaranteeAccount": "G00001A23S", "contract": "CLE93211A2", "buyVolume": 190003.0434, "sellVolume": 73882.1234, "price": 1.234543 }, "id": "95b1b467-bd69-4436-8181-96c16408c230", "type": "open-position" } }
 
application/vnd.api+json