MarketIntell Agents API

Autonomous trading agent management

GitHub OpenAPI

Operations 10

GET /v1/agents List agents #
POST /v1/agents Create an agent #
GET /v1/agents/{id} Get agent #
DELETE /v1/agents/{id} Delete agent #
POST /v1/agents/{id}/enable Enable agent #
POST /v1/agents/{id}/disable Disable agent #
POST /v1/agents/{id}/chat Chat with agent #
GET /v1/agents/{id}/runs Agent run history #
GET /v1/agents/{id}/memory Agent memory #
POST /v1/agents/{id}/execute Execute agent manually #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/marketintell-ai:marketintell-ai-agents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

marketintell-ai-agents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: MarketIntell Agents API
  version: 0.1.0
  description: 'AI-powered market intelligence with tier-aware Mastra agents and a deterministic analytical pipeline across crypto, US equities, and India stocks. REST, MCP, OpenAI-compatible, async workflow, and batch transports share one evidence/provenance/recovery contract.


    **Rate limits (per minute / per day):**

    - Free: 60 / 25

    - Builder: 120 / 50,000

    - Pro: 300 / 2,000

    - Enterprise: 1,000 / unlimited


    MCP has a separate per-key bucket (default 30/min, env `MCP_RATE_LIMIT_MAX`). 429 responses include `Retry-After` and machine-readable recovery fields.


    **Self-registration (agents):** `POST /v1/auth/challenge` returns a SHA-256 proof-of-work challenge; submit the solved nonce to `POST /v1/auth/signup`. Follow `/.well-known/oauth-protected-resource` to the authorization-server `agent_auth` block, or read `/auth.md`.'
  contact:
    name: MarketIntell
    email: support@marketintell.ai
    url: https://marketintell.ai/contact
  license:
    name: Proprietary
    url: https://marketintell.ai/terms
  termsOfService: https://marketintell.ai/terms
  x-api-lifecycle:
    stability: stable
    versioning: Major versions are encoded in the URL path (currently /v1). Additive fields do not change the major version.
    deprecation_notice_days: 90
    deprecation_header: Deprecation (RFC 9745)
    sunset_header: Sunset (RFC 8594)
    migration_link_relation: successor-version
servers:
- url: https://api.marketintell.ai
  description: Production
- url: http://localhost:3848
  description: Local development
security:
- BearerAuth: []
- ApiKeyHeader: []
tags:
- name: Agents
  description: Autonomous trading agent management
paths:
  /v1/agents:
    get:
      operationId: getAgents
      summary: List agents
      tags:
      - Agents
      description: List autonomous trading agents registered by the calling key. Each entry returns the agent id, name, goal, enabled state, soul (personality preset), trading_enabled flag, and last-run timestamp. Agents are owner-scoped. Pro tier or higher required.
      responses:
        '200':
          description: List of agents
          content:
            application/json:
              schema:
                type: object
                required:
                - agents
                properties:
                  agents:
                    type: array
                    items:
                      $ref: '#/components/schemas/Agent'
    post:
      operationId: postAgents
      summary: Create an agent
      tags:
      - Agents
      description: 'Create an autonomous trading agent. Required: `name`, `goal`, `instructions` (system prompt). Optional: `soul` (personality preset), `trading_enabled` (default `false` — research-only; `true` allows real trade execution via configured broker), `memory_enabled` (default `true` — accumulates long-term notes). Pro tier allows up to 3 active agents per key.'
      parameters:
      - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              - goal
              - instructions
              properties:
                name:
                  type: string
                  maxLength: 100
                goal:
                  type: string
                  maxLength: 1000
                instructions:
                  type: string
                  maxLength: 5000
                soul:
                  type: string
                trading_enabled:
                  type: boolean
                  default: false
                memory_enabled:
                  type: boolean
                  default: true
      responses:
        '201':
          description: Agent created
          headers:
            Idempotency-Replayed:
              $ref: '#/components/headers/IdempotencyReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /v1/agents/{id}:
    get:
      operationId: getAgentsId
      summary: Get agent
      tags:
      - Agents
      description: 'Get the full configuration and current state of an agent you own: goal, instructions, soul, enabled flag, trading_enabled flag, last_run_at, and memory size. 404 if the agent doesn''t exist or isn''t owned by the calling key.'
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Agent details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
    delete:
      operationId: deleteAgentsId
      summary: Delete agent
      tags:
      - Agents
      description: Delete an agent you own. Cascades to its run history and memory. Disables the agent first if it's currently enabled, so any in-flight execution completes cleanly. Returns 404 if the agent doesn't exist or isn't owned by the calling key.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Agent deleted
          content:
            application/json:
              schema:
                type: object
                required:
                - success
                properties:
                  success:
                    type: boolean
                  deleted:
                    type: integer
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /v1/agents/{id}/enable:
    post:
      operationId: postAgentsIdEnable
      summary: Enable agent
      tags:
      - Agents
      description: Enable an agent so it begins (or resumes) its scheduled run loop. Idempotent — returns 200 even if the agent was already enabled.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Enabled
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - enabled
                properties:
                  id:
                    type: string
                  enabled:
                    type: boolean
                    enum:
                    - true
  /v1/agents/{id}/disable:
    post:
      operationId: postAgentsIdDisable
      summary: Disable agent
      tags:
      - Agents
      description: Disable an agent and pause its scheduled run loop. Currently in-flight executions are allowed to complete; no new ones are scheduled. Idempotent — returns 200 even if the agent was already disabled.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Disabled
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - enabled
                properties:
                  id:
                    type: string
                  enabled:
                    type: boolean
                    enum:
                    - false
  /v1/agents/{id}/chat:
    post:
      operationId: postAgentsIdChat
      summary: Chat with agent
      tags:
      - Agents
      description: Send a message to a specific agent and get its response. The message is threaded through the agent's memory (when `memory_enabled`). Use this for interactive control, debugging, or human-in-the-loop steering of an otherwise autonomous agent.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - message
              properties:
                message:
                  type: string
      responses:
        '200':
          description: Agent response
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                - response
                properties:
                  id:
                    type: string
                    description: Agent id
                  response:
                    type: string
                    description: Markdown body of the agent's reply
                  latency_ms:
                    type: integer
                  tools_used:
                    type: array
                    items:
                      type: string
        '400':
          description: Missing message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
  /v1/agents/{id}/runs:
    get:
      operationId: getAgentsIdRuns
      summary: Agent run history
      tags:
      - Agents
      description: Get the run history of an agent. Each run entry includes started_at, finished_at, status (success/failed/cancelled/skipped), latency_ms, any trade decisions made, and a summary of the reasoning. Default 50 runs, max 200 — for full history, paginate with subsequent calls.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 200
      responses:
        '200':
          description: Run history
          content:
            application/json:
              schema:
                type: object
                required:
                - runs
                properties:
                  runs:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        agent_id:
                          type: string
                        started_at:
                          type: string
                          format: date-time
                        finished_at:
                          type: string
                          format: date-time
                          nullable: true
                        status:
                          type: string
                          enum:
                          - queued
                          - running
                          - succeeded
                          - failed
                        tool_calls:
                          type: integer
                        error:
                          type: string
                          nullable: true
  /v1/agents/{id}/memory:
    get:
      operationId: getAgentsIdMemory
      summary: Agent memory
      tags:
      - Agents
      description: Get the agent's accumulated long-term memory — extracted notes, learned patterns, and recent observations. Memory is auto-managed by the agent runtime (compacted over time) but is read-exposed for transparency and debugging.
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Memory contents
          content:
            application/json:
              schema:
                type: object
                required:
                - id
                properties:
                  id:
                    type: string
                  memory:
                    type: object
                    description: Tiered memory snapshot (working / semantic / episodic).
                    properties:
                      working:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      semantic:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                      episodic:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
                    additionalProperties: true
  /v1/agents/{id}/execute:
    post:
      operationId: postAgentsIdExecute
      summary: Execute agent manually
      tags:
      - Agents
      description: Trigger a one-off agent run immediately, regardless of the schedule. Useful for testing, debugging, or for cron-driven external schedulers that prefer their own cadence over the built-in run loop. Returns the run id and execution result synchronously (subject to a hard timeout).
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Execution result
          content:
            application/json:
              schema:
                type: object
                required:
                - run_id
                - status
                properties:
                  run_id:
                    type: string
                  status:
                    type: string
                    enum:
                    - queued
                    - running
                    - succeeded
                    - failed
                  latency_ms:
                    type: integer
                  output:
                    type: string
                    description: Final markdown output, if synchronous
components:
  schemas:
    Agent:
      type: object
      required:
      - id
      - name
      - enabled
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        enabled:
          type: boolean
        schedule:
          type: string
          description: Cron expression governing scheduled execution (omitted = manual-only)
        model:
          type: string
          description: LLM model id this agent uses (e.g. 'sonnet-4', 'opus-4')
        owner_id:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        last_run_at:
          type: string
          format: date-time
          nullable: true
        tools:
          type: array
          items:
            type: string
          description: Mastra tool ids the agent may call
    ErrorEnvelope:
      type: object
      required:
      - success
      - error
      properties:
        success:
          type: boolean
          enum:
          - false
        error:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: Stable machine-readable error code, when present
        request_id:
          type: string
          description: Correlation id from the X-Request-ID header
        retry_after_ms:
          type: integer
          description: Suggested back-off for 429 responses (mirrors the Retry-After header in ms)
  headers:
    IdempotencyReplayed:
      description: Present and set to `true` only when this response was served from the idempotency cache instead of re-running the handler.
      schema:
        type: string
        enum:
        - 'true'
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: 'Opt-in idempotency token (max 255 chars). The FIRST request carrying a given key is processed normally and its 2xx response is cached for 24h, scoped to (api_key + method + path + request-body hash). A retry with the SAME key and body replays the cached response and adds `Idempotency-Replayed: true`. Reusing the same key with a DIFFERENT body returns 422 (`idempotency_key_reuse`). The cache is per-process and in-memory, so on a multi-replica deploy a retry that lands on a different task re-executes — callers must already tolerate at-least-once delivery.'
      schema:
        type: string
        maxLength: 255
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key