{ "info": { "title": "Watchlists", "version": "2.2.0" }, "swagger": "2.0", "produces": [ "application/json" ], "host": "api.tastyworks.com", "tags": [ { "name": "pairs-watchlists", "description": "Allows an API client to fetch pairs watchlists." }, { "name": "public-watchlists", "description": "Allows an API client to fetch tastyworks watchlists." }, { "name": "user-watchlists", "description": "Allows an API client to fetch a user's watchlists." } ], "paths": { "/public-watchlists": { "get": { "description": "Returns a list of all tastyworks watchlists", "produces": [ "application/json" ], "parameters": [ { "in": "query", "name": "counts-only", "type": "boolean", "default": false, "required": false } ], "responses": { "200": { "description": "Returns a list of all tastyworks watchlists", "schema": { "type": "array", "items": { "$ref": "#/definitions/Watchlist" } } } }, "tags": [ "public-watchlists" ], "operationId": "getPublicWatchlists" } }, "/public-watchlists/{watchlist_name}": { "get": { "description": "Returns a requested tastyworks watchlist", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "watchlist_name", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Returns a requested tastyworks watchlist", "schema": { "$ref": "#/definitions/Watchlist" } } }, "tags": [ "public-watchlists" ], "operationId": "getPublicWatchlistsWatchlistName" } }, "/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" } }, "/pairs-watchlists": { "get": { "description": "Returns a list of all tastyworks pairs watchlists", "produces": [ "application/json" ], "responses": { "200": { "description": "Returns a list of all tastyworks pairs watchlists", "schema": { "type": "array", "items": { "$ref": "#/definitions/PairsWatchlist" } } } }, "tags": [ "pairs-watchlists" ], "operationId": "getPairsWatchlists" } }, "/pairs-watchlists/{pairs_watchlist_name}": { "get": { "description": "Returns a requested tastyworks pairs watchlist", "produces": [ "application/json" ], "parameters": [ { "in": "path", "name": "pairs_watchlist_name", "type": "integer", "format": "int32", "required": true } ], "responses": { "200": { "description": "Returns a requested tastyworks pairs watchlist", "schema": { "$ref": "#/definitions/PairsWatchlist" } } }, "tags": [ "pairs-watchlists" ], "operationId": "getPairsWatchlistsPairsWatchlistName" } } }, "definitions": { "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" }, "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" }, "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" }, "PairsWatchlist": { "type": "object", "properties": { "name": { "description": "", "type": "string" }, "pairs-equations": { "description": "", "type": "object" }, "order-index": { "description": "", "type": "integer", "format": "int32" } }, "description": "PairsWatchlist model" } } }