Execute a Logic Without a Context in a Service

post/formulamanager.executeformulaservice/{uniqueName}

Executes a logic and returns results.

The main difference between this command and the executeformula command is, that in this formulamanager.executeformulaservice command, the logic context is preserved and reused. This allows the formula to build and maintain a cache, as elements like api.global persist between calls.
Each thread operates with its own formula context and api.global instance. The system maintains a fixed number of service threads, with a predefined lifespan for each. Parallel API requests are queued and executed on these threads in sequence. If a request cannot be processed within a short timeframe, it will fail. For this reason, it is crucial that subsequent requests execute efficiently, leveraging caching whenever possible. Be aware that during long cache warm-up periods (e.g., when new threads are initialized), there is a higher risk of request failures.

Use the output=rawjson parameter in the URL, for example /formulamanager.executeformula/QuoteLogic?output=rawjson in order to return the result in the simple JSON format as "resultName":result.

Securitybasic or X-PriceFx-jwt
Request
path Parameters
uniqueName
required
string

The name (uniqueName) of the logic you want to execute.

Request Body schema: application/json
data
object

Provide inputs for the logic as key-value pairs.

Responses
200

Example response

Response Schema: application/json
object
node
string non-empty
Array of objects non-empty unique
Array (non-empty)
object
status
number
Request samples
application/json
{
  • "data": {
    • "priority": "high",
    • "quantity": 14,
    • "map": {
      • "key": "value"
      }
    }
}
Response samples
application/json
{
  • "response": {
    • "node": "node",
    • "data": [
      • {
        • "formula": {
          }
        }
      ],
    • "status": 0
    }
}