{ "openapi": "3.0.0", "info": { "description": "Trading API to implement automated trading on skins.cash", "version": "1.0.0", "title": "skins.cash trading API", "contact": { "email": "wholesale@skins.cash" } }, "servers": [ { "url": "https://skins.cash/api/v2" } ], "tags": [ { "name": "user", "description": "Customer information" }, { "name": "inventory", "description": "User inventory skins data" }, { "name": "trade", "description": "Trade create and management" } ], "paths": { "/user": { "get": { "tags": [ "user" ], "summary": "Get user data", "operationId": "getUser", "parameters": [ ], "responses": { "200": { "description": "Unified response containing user data in 'data' property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "401": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } } }, "security": [ { "api_key": [], "salt": [], "signature": [] } ] } }, "/inventory/{app_id}": { "get": { "tags": [ "inventory" ], "summary": "Get user app inventory", "operationId": "getInventory", "parameters": [ { "name": "app_id", "in": "path", "description": "Steam game app id", "required": true, "schema": { "type": "integer", "enum": [440, 570, 730, 252490] } } ], "responses": { "200": { "description": "Unified response containing inventory skins in 'data' property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "400": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "401": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "424": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } } }, "security": [ { "api_key": [], "salt": [], "signature": [] } ] } }, "/inventory/{app_id}/{asset_id}": { "get": { "tags": [ "inventory" ], "summary": "Get inventory item detailed price(for dopplers skins)", "operationId": "getInventoryItem", "parameters": [ { "name": "app_id", "in": "path", "description": "Steam game app id", "required": true, "schema": { "type": "integer", "enum": [440, 570, 730, 252490] } }, { "name": "asset_id", "in": "path", "description": "Inventory item id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Unified response containing item price in 'data' property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "400": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "401": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "404": { "description": "Item id not found in user inventory", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "424": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } } }, "security": [ { "api_key": [], "salt": [], "signature": [] } ] } }, "/trade": { "post": { "tags": [ "trade" ], "summary": "Creates trade", "operationId": "createTrade", "requestBody": { "description": "Data for trade create", "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTradeData" } } } }, "responses": { "200": { "description": "Unified response containing created trade information in 'data' property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "400": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "401": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } } }, "security": [ { "api_key": [], "salt": [], "signature": [] } ] } }, "/trade/{id}": { "get": { "tags": [ "trade" ], "summary": "Get trade data", "operationId": "getTrade", "parameters": [ { "name": "id", "in": "path", "description": "Trade id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Unified response containing trade information in 'data' property", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "400": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "401": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } }, "404": { "description": "Unified response with error description", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UnifiedResponse" } } } } }, "security": [ { "api_key": [], "salt": [], "signature": [] } ] } } }, "components": { "schemas": { "UnifiedResponse": { "type": "object", "properties": { "success": { "type": "boolean" }, "data": { "type": "object", "nullable": true }, "error_code": { "type": "integer" } } }, "CreateTradeData": { "type": "object", "properties": { "skins": { "type": "array", "items": { "$ref": "#/components/schemas/TradeItem" } }, "expected_min_sum": { "type": "number", "format": "double" }, "trade_url": { "type": "string" } } }, "TradeItem": { "type": "object", "properties": { "app_id": { "type": "string" }, "class_id": { "type": "string" }, "instance_id": { "type": "string" }, "asset_id": { "type": "string" } } } }, "securitySchemes": { "api_key": { "type": "apiKey", "name": "x-api-key", "in": "header" }, "salt": { "type": "apiKey", "name": "salt", "in": "header" }, "signature": { "type": "apiKey", "name": "signature", "in": "header" } } } }