swagger: '2.0' info: title: Account Status accounts user-watchlists API version: 7.1.0 description: Operations about accounts host: api.tastyworks.com produces: - application/json tags: - name: user-watchlists description: Allows an API client to fetch a user's watchlists. paths: /watchlists: post: description: Create an account watchlist produces: - application/json consumes: - application/json parameters: - name: postWatchlists in: body required: true schema: $ref: '#/definitions/postWatchlists' responses: '201': description: Create an account watchlist schema: $ref: '#/definitions/Watchlist' tags: - user-watchlists operationId: postWatchlists get: description: Returns a list of all watchlists for the given account produces: - application/json responses: '200': description: Returns a list of all watchlists for the given account schema: type: array items: $ref: '#/definitions/Watchlist' tags: - user-watchlists operationId: getWatchlists /watchlists/{watchlist_name}: put: description: Replace all properties of an account watchlist produces: - application/json consumes: - application/json parameters: - in: path name: watchlist_name type: string required: true - name: putWatchlistsWatchlistName in: body required: true schema: $ref: '#/definitions/putWatchlistsWatchlistName' responses: '200': description: Replace all properties of an account watchlist schema: $ref: '#/definitions/Watchlist' tags: - user-watchlists operationId: putWatchlistsWatchlistName delete: description: Delete a watchlist for the given account produces: - application/json parameters: - in: path name: watchlist_name type: string required: true responses: '200': description: Delete a watchlist for the given account schema: $ref: '#/definitions/Watchlist' tags: - user-watchlists operationId: deleteWatchlistsWatchlistName get: description: Returns a requested account watchlist produces: - application/json parameters: - in: path name: watchlist_name type: string required: true responses: '200': description: Returns a requested account watchlist schema: $ref: '#/definitions/Watchlist' tags: - user-watchlists operationId: getWatchlistsWatchlistName definitions: putWatchlistsWatchlistName: type: object properties: name: type: string description: The watchlist name group-name: type: string description: The group to which this watchlist belongs to order-index: type: integer format: int32 description: The order index of the watchlist default: 9999 watchlist-entries: type: array description: The instruments being watched items: type: object properties: symbol: type: string description: The instrument symbol instrument-type: type: string description: The instrument type required: - symbol required: - name - watchlist-entries description: Replace all properties of an account watchlist postWatchlists: type: object properties: name: type: string description: The watchlist name group-name: type: string description: The group to which this watchlist belongs to order-index: type: integer format: int32 description: The order index of the watchlist default: 9999 watchlist-entries: type: array description: The instruments being watched items: type: object properties: symbol: type: string description: The instrument symbol instrument-type: type: string description: The instrument type required: - symbol required: - name - watchlist-entries description: Create an account watchlist Watchlist: type: object properties: name: description: '' type: string watchlist-entries: description: '' type: object cms-id: description: '' type: string group-name: description: '' type: string order-index: description: '' type: integer format: int32 description: Watchlist model