API Access
The MesoSim API lets your scripts and tools submit backtests, monitor execution, and retrieve results. API access is included with Advanced and FundPro. See Accounts and Access for plans and trial information.
Start here to connect your account and check access. Use the MesoSim API documentation for the complete operations, request fields, and responses. For a conversational workflow, follow AI Agent setup; the plugin handles the requests for you.
Choose the Portal
Use MesoSim for retail, or your own FundPro Portal's HTTPS address. Open Site → API → Backtest API on your Portal for its interactive API reference.
For FundPro information, visit Deltaray FundPro.
Create a key
Open Site → API → Manage Keys on your Portal. Select New API Key, give it a recognizable name and copy it before closing the dialog. The key is displayed only when created. Store it securely, review its expiration, and revoke it when no longer needed. For an AI Agent, follow the connection-file setup.
Authenticate requests with Authorization: Bearer <API_KEY>.
Review existing keys
Use the key list to review validity and expiration dates, or revoke a key you no longer need.
Check the connection
Use a read-only request to list your backtests. The example below expects your key in the MESOSIM_API_KEY environment variable. For FundPro, replace https://mesosim.io with your own Portal's address, and choose a date range covering the runs you want to list.
curl --get 'https://mesosim.io/api/v1/backtests' \
--header "Authorization: Bearer ${MESOSIM_API_KEY}" \
--data-urlencode 'start=2026-01-01T00:00:00Z' \
--data-urlencode 'end=2026-12-31T23:59:59Z' \
--data-urlencode 'page=0' \
--data-urlencode 'pageSize=10'
HTTP 200 with a list, including an empty list when no runs match, confirms the request succeeded. This example requests the first page of up to ten backtests; page numbering starts at 0.
For further requests, follow the MesoSim API documentation.
Idempotency
Idempotency lets you retry a submission without creating a duplicate backtest, for example if the connection drops before you receive the response. Supply an IdempotencyKey in the submission body and reuse it when retrying that same request.
Use 1–128 ASCII letters, digits, dots, underscores, colons or hyphens; keys are case-sensitive. Resend the same original strategy and sharing setting with that key. A matching retry returns the original identifier. Reusing the key with a changed payload returns HTTP 409; retrying a deleted backtest returns HTTP 410.
For dated signals or indicators used by a strategy, continue with Use External Data. Explore the Deltaray blog for strategy examples, or return to the AI Assisted development overview.