swagger: "2.0"
schemes:
  - https
host: api.evemarketer.com
basePath: /ec
info:
  contact:
    x-twitter: EVEMarketer
  description: EVEMarketer Marketstat API is almost compatible with EVE-Central's Marketstat API.
  title: EVEMarketer Marketstat API
  version: 1.0.1
  x-apisguru-categories:
    - entertainment
  x-logo:
    url: https://twitter.com/EVEMarketer/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://api.evemarketer.com/ec/swagger.yaml
      version: "2.0"
  x-providerName: evemarketer.com
tags:
  - description: marketstat
    name: marketstat
paths:
  /marketstat:
    get:
      parameters:
        - description: |
            TypeID. Multiple TypeIDs can be specified in the following format (up to 200 TypeIDs per request):
            typeid=34&typeid=35 or typeid=34,35
          in: query
          items:
            format: int32
            type: integer
          name: typeid
          required: true
          type: array
        - description: Limit the statistics to a single region.
          format: int32
          in: query
          name: regionlimit
          type: integer
        - description: Limit the statistics to a single solar system.
          format: int32
          in: query
          name: usesystem
          type: integer
      produces:
        - application/xml
      responses:
        "200":
          description: Successful Request
          headers:
            X-Ratelimit-Limit:
              description: The number of allowed requests in the current period
              type: integer
            X-Ratelimit-Remaining:
              description: The number of remaining requests in the current period
              type: integer
            X-Ratelimit-Reset:
              description: The time at which the current rate limit window resets in UTC epoch seconds.
              type: integer
          schema:
            $ref: "#/definitions/ExecAPI"
        "400":
          description: Invalid Parameters
        "429":
          description: Rate limit exceeded
      summary: XML Marketstat
      tags:
        - marketstat
    post:
      consumes:
        - multipart/form-data
      parameters:
        - description: |
            TypeID. Multiple TypeIDs can be specified in the following format (up to 200 TypeIDs per request):
            typeid=34&typeid=35 or typeid=34,35
          in: formData
          items:
            format: int32
            type: integer
          name: typeid
          required: true
          type: array
        - description: Limit the statistics to a single region.
          format: int32
          in: formData
          name: regionlimit
          type: integer
        - description: Limit the statistics to a single solar system.
          format: int32
          in: formData
          name: usesystem
          type: integer
      produces:
        - application/xml
      responses:
        "200":
          description: Successful Request
          headers:
            X-Ratelimit-Limit:
              description: The number of allowed requests in the current period
              type: integer
            X-Ratelimit-Remaining:
              description: The number of remaining requests in the current period
              type: integer
            X-Ratelimit-Reset:
              description: The time at which the current rate limit window resets in UTC epoch seconds.
              type: integer
          schema:
            $ref: "#/definitions/ExecAPI"
        "400":
          description: Invalid Parameters
        "429":
          description: Rate limit exceeded
      summary: XML Marketstat
      tags:
        - marketstat
  /marketstat/json:
    get:
      consumes:
        - multipart/form-data
      parameters:
        - description: |
            TypeID. Multiple TypeIDs can be specified in the following format (up to 200 TypeIDs per request):
            typeid=34&typeid=35 or typeid=34,35
          in: formData
          items:
            format: int32
            type: integer
          name: typeid
          required: true
          type: array
        - description: Limit the statistics to a single region.
          format: int32
          in: formData
          name: regionlimit
          type: integer
        - description: Limit the statistics to a single region.
          format: int32
          in: formData
          name: usesystem
          type: integer
      produces:
        - application/json
      responses:
        "200":
          description: Successful Request
          headers:
            X-Ratelimit-Limit:
              description: The number of allowed requests in the current period
              type: integer
            X-Ratelimit-Remaining:
              description: The number of remaining requests in the current period
              type: integer
            X-Ratelimit-Reset:
              description: The time at which the current rate limit window resets in UTC epoch seconds.
              type: integer
          schema:
            items:
              $ref: "#/definitions/Type"
            type: array
        "400":
          description: Invalid Parameters
        "429":
          description: Rate limit exceeded
      summary: JSON Marketstat
      tags:
        - marketstat
    post:
      parameters:
        - description: |
            TypeID. Multiple TypeIDs can be specified in the following format (up to 200 TypeIDs per request):
            typeid=34&typeid=35 or typeid=34,35
          in: query
          items:
            format: int32
            type: integer
          name: typeid
          required: true
          type: array
        - description: Limit the statistics to a single region.
          format: int32
          in: query
          name: regionlimit
          type: integer
        - description: Limit the statistics to a single region.
          format: int32
          in: query
          name: usesystem
          type: integer
      produces:
        - application/json
      responses:
        "200":
          description: Successful Request
          headers:
            X-Ratelimit-Limit:
              description: The number of allowed requests in the current period
              type: integer
            X-Ratelimit-Remaining:
              description: The number of remaining requests in the current period
              type: integer
            X-Ratelimit-Reset:
              description: The time at which the current rate limit window resets in UTC epoch seconds.
              type: integer
          schema:
            items:
              $ref: "#/definitions/Type"
            type: array
        "400":
          description: Invalid Parameters
        "429":
          description: Rate limit exceeded
      summary: JSON Marketstat
      tags:
        - marketstat
definitions:
  ExecAPI:
    properties:
      marketstat:
        $ref: "#/definitions/MarketStatXML"
      method:
        example: marketstat_xml
        type: string
        xml:
          attribute: true
      version:
        example: "2.0"
        type: string
        xml:
          attribute: true
    type: object
  ForQuery:
    properties:
      bid:
        description: is buy?
        type: boolean
      hours:
        description: always 0
        format: int32
        type: integer
      minq:
        description: always 0
        format: int32
        type: integer
      regions:
        description: Region IDs
        items:
          example: 10000002
          format: int32
          type: integer
        type: array
      systems:
        description: System IDs
        items:
          format: int32
          type: integer
        type: array
      types:
        description: Type IDs
        items:
          example: 44992
          format: int32
          type: integer
        type: array
    type: object
  MarketStatXML:
    items:
      properties:
        buy:
          $ref: "#/definitions/TypeStatXML"
        sell:
          $ref: "#/definitions/TypeStatXML"
      type: object
    type: array
  Type:
    properties:
      buy:
        $ref: "#/definitions/TypeStat"
      sell:
        $ref: "#/definitions/TypeStat"
    type: object
  TypeStat:
    properties:
      avg:
        description: Average Price
        example: 3352708.11
        format: double
        type: number
      fivePercent:
        example: 2949353.31
        format: double
        type: number
      forQuery:
        $ref: "#/definitions/ForQuery"
      generated:
        description: Generated at (UNIX Timestamp msec)
        example: 1499280224508
        format: int64
        type: integer
      highToLow:
        type: boolean
      max:
        example: 10000000
        format: double
        type: number
      median:
        description: Median Price
        example: 3094978.97
        format: double
        type: number
      min:
        example: 2601400.03
        format: double
        type: number
      stdDev:
        description: Standard Deviation
        example: 877391.25
        format: double
        type: number
      variance:
        example: 769815422537.24
        format: double
        type: number
      volume:
        description: Order Volume
        example: 963208
        format: int64
        type: integer
      wavg:
        description: Weighted Average Price
        example: 3204519.59
        format: double
        type: number
    type: object
  TypeStatXML:
    properties:
      avg:
        description: Weighted Average Price
        example: 3204519.59
        format: double
        type: number
      max:
        description: Maximum Price
        example: 10000000
        format: double
        type: number
      median:
        description: Median Price
        example: 3094978.97
        format: double
        type: number
      min:
        description: Minimum Price
        example: 2601400.03
        format: double
        type: number
      percentile:
        description: 5% Price
        example: 2949353.31
        format: double
        type: number
      stddev:
        description: Standard Deviation
        example: 877391.25
        format: double
        type: number
      volume:
        description: Order Volume
        example: 963208
        format: int64
        type: integer
    type: object
