Created
May 5, 2021 15:18
-
-
Save chester89/e0823eb631cca0ece866dfdde5c86eea to your computer and use it in GitHub Desktop.
Openapi input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"openapi": "2.0.1", | |
"info": { | |
"title": "MMS.TradingAccounts.Api", | |
"version": "1.0" | |
}, | |
"servers": [ | |
{ | |
"url": "http://trading-accounts.uat.zfx.loc/trading-accounts/" | |
} | |
], | |
"paths": { | |
"/v1/items/create": { | |
"post": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountCreateRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"201": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountInfoOut" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items": { | |
"post": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountCreateRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"201": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountInfoOut" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"get": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "logins", | |
"in": "query", | |
"schema": { | |
"type": "array", | |
"items": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"nullable": true | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountInfo" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}": { | |
"get": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountInfo" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/password": { | |
"put": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountCheckPasswordRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "boolean" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"get": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
{ | |
"name": "password", | |
"in": "query", | |
"schema": { | |
"type": "string", | |
"nullable": true | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "boolean" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/group": { | |
"put": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountGroupRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "boolean" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/orders-info": { | |
"get": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/trading-info": { | |
"get": { | |
"tags": [ | |
"TradingAccount" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success" | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/leverage": { | |
"put": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountSetLeverageRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/transfer": { | |
"put": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Transfers.FundsTransferRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/balance": { | |
"get": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"responses": { | |
"200": { | |
"description": "Success", | |
"content": { | |
"application/json": { | |
"schema": { | |
"type": "number", | |
"format": "double" | |
} | |
} | |
} | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
}, | |
"404": { | |
"description": "Not Found", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/deposit": { | |
"put": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Transfers.BalanceOperationRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/withdraw": { | |
"put": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Transfers.BalanceOperationRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/credit-deposit": { | |
"put": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Transfers.BalanceOperationRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"/v1/items/{login}/credit-withdraw": { | |
"put": { | |
"tags": [ | |
"TradingAccountBalanceOperation" | |
], | |
"parameters": [ | |
{ | |
"name": "login", | |
"in": "path", | |
"required": true, | |
"schema": { | |
"type": "integer", | |
"format": "int32" | |
} | |
} | |
], | |
"requestBody": { | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Transfers.BalanceOperationRequest" | |
} | |
} | |
} | |
}, | |
"responses": { | |
"200": { | |
"description": "Success" | |
}, | |
"400": { | |
"description": "Bad Request", | |
"content": { | |
"application/json": { | |
"schema": { | |
"$ref": "#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"components": { | |
"schemas": { | |
"MMS.TradingAccounts.Configuration.ServerType": { | |
"enum": [ | |
0, | |
1 | |
], | |
"type": "integer", | |
"format": "int32" | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountType": { | |
"enum": [ | |
0, | |
1, | |
2, | |
3, | |
4, | |
5, | |
-1 | |
], | |
"type": "integer", | |
"format": "int32" | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountCreateRequest": { | |
"type": "object", | |
"properties": { | |
"serverType": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Configuration.ServerType" | |
}, | |
"accountType": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountType" | |
}, | |
"groupName": { | |
"type": "string", | |
"nullable": true | |
}, | |
"name": { | |
"type": "string", | |
"nullable": true | |
}, | |
"country": { | |
"type": "string", | |
"nullable": true | |
}, | |
"leverage": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
}, | |
"city": { | |
"type": "string", | |
"nullable": true | |
}, | |
"state": { | |
"type": "string", | |
"nullable": true | |
}, | |
"zipcode": { | |
"type": "string", | |
"nullable": true | |
}, | |
"address": { | |
"type": "string", | |
"nullable": true | |
}, | |
"phone": { | |
"type": "string", | |
"nullable": true | |
}, | |
"email": { | |
"type": "string", | |
"nullable": true | |
}, | |
"agentAccount": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"leadSource": { | |
"type": "string", | |
"nullable": true | |
}, | |
"comment": { | |
"type": "string", | |
"nullable": true | |
}, | |
"balance": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountInfoOut": { | |
"type": "object", | |
"properties": { | |
"login": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"enabled": { | |
"type": "boolean" | |
}, | |
"balance": { | |
"type": "number", | |
"format": "double" | |
}, | |
"password": { | |
"type": "string", | |
"nullable": true | |
}, | |
"investorPassword": { | |
"type": "string", | |
"nullable": true | |
}, | |
"leverage": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"groupName": { | |
"type": "string", | |
"nullable": true | |
}, | |
"server": { | |
"type": "string", | |
"nullable": true | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"Microsoft.AspNetCore.Mvc.ProblemDetails": { | |
"type": "object", | |
"properties": { | |
"type": { | |
"type": "string", | |
"nullable": true | |
}, | |
"title": { | |
"type": "string", | |
"nullable": true | |
}, | |
"status": { | |
"type": "integer", | |
"format": "int32", | |
"nullable": true | |
}, | |
"detail": { | |
"type": "string", | |
"nullable": true | |
}, | |
"instance": { | |
"type": "string", | |
"nullable": true | |
} | |
}, | |
"additionalProperties": { | |
"type": "object", | |
"additionalProperties": false | |
} | |
}, | |
"MMS.TradingAccounts.TradingAccounts.OrderDirection": { | |
"enum": [ | |
0, | |
1 | |
], | |
"type": "integer", | |
"format": "int32" | |
}, | |
"MMS.TradingAccounts.TradingAccounts.OrderInfo": { | |
"type": "object", | |
"properties": { | |
"direction": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.OrderDirection" | |
}, | |
"symbol": { | |
"type": "string", | |
"nullable": true | |
}, | |
"volume": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"openPrice": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountOrdersInfo": { | |
"type": "object", | |
"properties": { | |
"login": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"serverName": { | |
"type": "string", | |
"nullable": true | |
}, | |
"balance": { | |
"type": "number", | |
"format": "double" | |
}, | |
"orders": { | |
"type": "array", | |
"items": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.OrderInfo" | |
}, | |
"nullable": true | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountTradingInfo": { | |
"type": "object", | |
"properties": { | |
"equity": { | |
"type": "number", | |
"format": "double" | |
}, | |
"freeMargin": { | |
"type": "number", | |
"format": "double" | |
}, | |
"requiredMargin": { | |
"type": "number", | |
"format": "double" | |
}, | |
"marginLevel": { | |
"type": "number", | |
"format": "double" | |
}, | |
"floatingProfit": { | |
"type": "number", | |
"format": "double" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountInfo": { | |
"type": "object", | |
"properties": { | |
"serverName": { | |
"type": "string", | |
"nullable": true | |
}, | |
"serverType": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.Configuration.ServerType" | |
}, | |
"accountType": { | |
"type": "string", | |
"nullable": true | |
}, | |
"groupName": { | |
"type": "string", | |
"nullable": true | |
}, | |
"agentId": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"name": { | |
"type": "string", | |
"nullable": true | |
}, | |
"login": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"phone": { | |
"type": "string", | |
"nullable": true | |
}, | |
"email": { | |
"type": "string", | |
"nullable": true | |
}, | |
"address": { | |
"type": "string", | |
"nullable": true | |
}, | |
"city": { | |
"type": "string", | |
"nullable": true | |
}, | |
"state": { | |
"type": "string", | |
"nullable": true | |
}, | |
"zip": { | |
"type": "string", | |
"nullable": true | |
}, | |
"country": { | |
"type": "string", | |
"nullable": true | |
}, | |
"balance": { | |
"type": "number", | |
"format": "double" | |
}, | |
"credit": { | |
"type": "number", | |
"format": "double" | |
}, | |
"leverage": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"enabled": { | |
"type": "boolean" | |
}, | |
"comment": { | |
"type": "string", | |
"nullable": true | |
}, | |
"ordersInfo": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountOrdersInfo" | |
}, | |
"tradingInfo": { | |
"$ref": "#/components/schemas/MMS.TradingAccounts.TradingAccounts.TradingAccountTradingInfo" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountCheckPasswordRequest": { | |
"type": "object", | |
"properties": { | |
"password": { | |
"type": "string", | |
"nullable": true | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountGroupRequest": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"nullable": true | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.TradingAccounts.TradingAccountSetLeverageRequest": { | |
"type": "object", | |
"properties": { | |
"leverage": { | |
"type": "integer", | |
"format": "int32" | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.Transfers.FundsTransferRequest": { | |
"type": "object", | |
"properties": { | |
"withdrawalLogin": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"depositLogin": { | |
"type": "integer", | |
"format": "int32" | |
}, | |
"amount": { | |
"type": "number", | |
"format": "double" | |
}, | |
"depositComment": { | |
"type": "string", | |
"nullable": true | |
}, | |
"withdrawalComment": { | |
"type": "string", | |
"nullable": true | |
} | |
}, | |
"additionalProperties": false | |
}, | |
"MMS.TradingAccounts.Transfers.BalanceOperationRequest": { | |
"type": "object", | |
"properties": { | |
"amount": { | |
"type": "number", | |
"format": "double" | |
}, | |
"comment": { | |
"type": "string", | |
"nullable": true | |
} | |
}, | |
"additionalProperties": false | |
} | |
}, | |
"securitySchemes": { | |
"Custom": { | |
"type": "apiKey", | |
"description": "Custom Authorization.", | |
"name": "Authorization", | |
"in": "header" | |
} | |
} | |
}, | |
"security": [ | |
{ | |
"Custom": [ ] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment