TradeStation · API Governance Rules

TradeStation API Rules

Spectral linting rules defining API design standards and conventions for TradeStation.

11 Rules error 6 warn 5
View Rules File View on GitHub

Rule Categories

tradestation

Rules

warn
tradestation-operation-summary-title-case
Operation summaries must use Title Case.
$.paths[*][*].summary
error
tradestation-operation-ids-required
All operations must have an operationId.
$.paths[*][*]
warn
tradestation-operation-description-required
All operations must have a description.
$.paths[*][*]
error
tradestation-oauth2-required
API must use OAuth2 authorization code authentication.
$.components.securitySchemes.oauth2AuthCode
error
tradestation-versioned-paths
All API paths must use the /v3/ version prefix.
$.paths[*]~
warn
tradestation-tags-required
All operations must be tagged.
$.paths[*][*]
warn
tradestation-pascal-case-schema-properties
Schema property names must use PascalCase to match TradeStation API conventions.
$.components.schemas[*].properties[*]~
error
tradestation-response-200-defined
All operations must define a 200 success response.
$.paths[*][*].responses
warn
tradestation-response-401-defined
All operations must define a 401 unauthorized response.
$.paths[*][*].responses
error
tradestation-post-request-body
POST operations must define a requestBody.
$.paths[*][post]
error
tradestation-order-required-fields
OrderRequest must define AccountID, Symbol, Quantity, OrderType, TradeAction, TimeInForce as required.
$.components.schemas.OrderRequest.required

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  tradestation-operation-summary-title-case:
    description: Operation summaries must use Title Case.
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9]*(\\s[A-Z][a-zA-Z0-9]*)*$"

  tradestation-operation-ids-required:
    description: All operations must have an operationId.
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: defined

  tradestation-operation-description-required:
    description: All operations must have a description.
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: description
      function: defined

  tradestation-oauth2-required:
    description: API must use OAuth2 authorization code authentication.
    severity: error
    given: "$.components.securitySchemes.oauth2AuthCode"
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          properties:
            type:
              const: oauth2

  tradestation-versioned-paths:
    description: All API paths must use the /v3/ version prefix.
    severity: error
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/v3/"

  tradestation-tags-required:
    description: All operations must be tagged.
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: tags
      function: defined

  tradestation-pascal-case-schema-properties:
    description: Schema property names must use PascalCase to match TradeStation API conventions.
    severity: warn
    given: "$.components.schemas[*].properties[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9]*$"

  tradestation-response-200-defined:
    description: All operations must define a 200 success response.
    severity: error
    given: "$.paths[*][*].responses"
    then:
      field: "200"
      function: defined

  tradestation-response-401-defined:
    description: All operations must define a 401 unauthorized response.
    severity: warn
    given: "$.paths[*][*].responses"
    then:
      field: "401"
      function: defined

  tradestation-post-request-body:
    description: POST operations must define a requestBody.
    severity: error
    given: "$.paths[*][post]"
    then:
      field: requestBody
      function: defined

  tradestation-order-required-fields:
    description: OrderRequest must define AccountID, Symbol, Quantity, OrderType, TradeAction, TimeInForce as required.
    severity: error
    given: "$.components.schemas.OrderRequest.required"
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          contains:
            const: AccountID

Work with this as data

Every ruleset 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 spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • 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 ruleset
curl "https://apis.io/api/v1/rules/tradestation-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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