MX Platform Holdings API

The Holdings API from MX Platform — 4 operation(s) for holdings.

OpenAPI Specification

mx-platform-holdings-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  contact:
    name: MX Platform API
    url: https://www.mx.com/products/platform-api
  description: '

    The MX Platform API is a powerful, fully-featured API designed to make

    aggregating and enhancing financial data easy and reliable. It can

    seamlessly connect your app or website to tens of thousands of financial

    institutions.'
  title: MX Platform Holdings API
  version: 0.1.0
servers:
- url: https://api.mx.com
- url: https://int-api.mx.com
security:
- basicAuth: []
tags:
- name: Holdings
paths:
  /users/{user_guid}/accounts/{account_guid}/holdings:
    get:
      description: This endpoint returns all holdings associated with the specified `account`.
      operationId: listHoldingsByAccount
      parameters:
      - description: The unique id for the `account`.
        example: ACT-7c6f361b-e582-15b6-60c0-358f12466b4b
        in: path
        name: account_guid
        required: true
        schema:
          type: string
      - description: Filter holdings from this date.
        example: '2015-09-20'
        in: query
        name: from_date
        schema:
          type: string
      - description: Specify current page.
        example: 1
        in: query
        name: page
        schema:
          type: integer
      - description: Specify records per page.
        example: 10
        in: query
        name: records_per_page
        schema:
          type: integer
      - description: Filter holdings to this date.
        example: '2019-10-20'
        in: query
        name: to_date
        schema:
          type: string
      - description: The unique id for the `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/HoldingsResponseBody'
          description: OK
      summary: List holdings by account
      tags:
      - Holdings
  /users/{user_guid}/holdings:
    get:
      description: This endpoint returns all holdings associated with the specified `user` across all accounts and members.
      operationId: listHoldings
      parameters:
      - description: Filter holdings from this date.
        example: '2015-09-20'
        in: query
        name: from_date
        schema:
          type: string
      - description: Specify current page.
        example: 1
        in: query
        name: page
        schema:
          type: integer
      - description: Specify records per page.
        example: 10
        in: query
        name: records_per_page
        schema:
          type: integer
      - description: Filter holdings to this date.
        example: '2019-10-20'
        in: query
        name: to_date
        schema:
          type: string
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/HoldingsResponseBody'
          description: OK
      summary: List holdings
      tags:
      - Holdings
  /users/{user_guid}/holdings/{holding_guid}:
    get:
      description: Use this endpoint to read the attributes of a specific `holding`.
      operationId: readHolding
      parameters:
      - description: The unique id for a `holding`.
        example: HOL-d65683e8-9eab-26bb-bcfd-ced159c9abe2
        in: path
        name: holding_guid
        required: true
        schema:
          type: string
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/HoldingResponseBody'
          description: OK
      summary: Read holding
      tags:
      - Holdings
  /users/{user_guid}/members/{member_guid}/holdings:
    get:
      description: This endpoint returns all holdings associated with the specified `member` across all accounts.
      operationId: listHoldingsByMember
      parameters:
      - description: Filter holdings from this date.
        example: '2015-09-20'
        in: query
        name: from_date
        schema:
          type: string
      - description: The unique id for a `member`.
        example: MBR-7c6f361b-e582-15b6-60c0-358f12466b4b
        in: path
        name: member_guid
        required: true
        schema:
          type: string
      - description: Specify current page.
        example: 1
        in: query
        name: page
        schema:
          type: integer
      - description: Specify records per page.
        example: 10
        in: query
        name: records_per_page
        schema:
          type: integer
      - description: Filter holdings to this date.
        example: '2019-10-20'
        in: query
        name: to_date
        schema:
          type: string
      - description: The unique id for a `user`.
        example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
        in: path
        name: user_guid
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/vnd.mx.api.v1+json:
              schema:
                $ref: '#/components/schemas/HoldingsResponseBody'
          description: OK
      summary: List holdings by member
      tags:
      - Holdings
components:
  schemas:
    HoldingResponseBody:
      properties:
        holding:
          $ref: '#/components/schemas/HoldingResponse'
      type: object
    HoldingResponse:
      properties:
        account_guid:
          example: ACT-06d7f44b-caae-0f6e-1384-01f52e75dcb1
          nullable: true
          type: string
        cost_basis:
          example: 827
          nullable: true
          type: number
        created_at:
          example: '2015-04-13T18:01:23.000Z'
          nullable: true
          type: string
        currency_code:
          example: USD
          nullable: true
          type: string
        cusip:
          example: 18383M878
          nullable: true
          type: string
        daily_change:
          example: 2.5
          nullable: true
          type: number
        description:
          example: Guggenheim Defensive Equity ETF
          nullable: true
          type: string
        guid:
          example: HOL-d65683e8-9eab-26bb-bcfd-ced159c9abe2
          nullable: true
          type: string
        holding_type:
          example: MONEY_MARKET
          nullable: true
          type: string
        holding_type_id:
          example: 1
          nullable: true
          type: integer
        id:
          example: ID-123
          nullable: true
          type: string
        market_value:
          example: 989.5
          nullable: true
          type: number
        member_guid:
          example: MBR-d65683e8-9eab-26bb-bcfd-ced159c9abe
          nullable: true
          type: string
        metadata:
          example: metadata
          nullable: true
          type: string
        purchase_price:
          example: 26.3
          nullable: true
          type: number
        shares:
          example: 6
          nullable: true
          type: number
        symbol:
          example: DEF
          nullable: true
          type: string
        updated_at:
          example: '2015-04-13T18:01:23.000Z'
          nullable: true
          type: string
        user_guid:
          example: USR-743e5d7f-1116-28fa-5de1-d3ba02e41d8d
          nullable: true
          type: string
      type: object
    HoldingsResponseBody:
      properties:
        holdings:
          items:
            $ref: '#/components/schemas/HoldingResponse'
          type: array
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
      type: object
    PaginationResponse:
      properties:
        current_page:
          example: 1
          type: integer
        per_page:
          example: 25
          type: integer
        total_entries:
          example: 1
          type: integer
        total_pages:
          example: 1
          type: integer
      type: object
  securitySchemes:
    basicAuth:
      scheme: basic
      type: http