Skip to content

Commit

Permalink
add POST /market-order method description to swagger.yaml (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
AmirMuratov authored Feb 5, 2020
1 parent c00a8b1 commit 4e321ee
Showing 1 changed file with 92 additions and 0 deletions.
92 changes: 92 additions & 0 deletions src/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,46 @@ paths:
schema:
$ref: "#/components/schemas/Error"

/orders/market-order:
post:
tags:
- orders
summary: Создание рыночной заявки
security:
- sso_auth: []
parameters:
- name: figi
in: query
required: true
description: FIGI инструмента
schema:
type: string
- name: brokerAccountId
in: query
required: false
description: Уникальный идентификатор счета (по умолчанию - Тинькофф)
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/MarketOrderRequest"
required: true
responses:
"200":
description: Созданная заявка
content:
application/json:
schema:
$ref: "#/components/schemas/MarketOrderResponse"
"500":
description: Ошибка запроса
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/orders/cancel:
post:
tags:
Expand Down Expand Up @@ -1170,6 +1210,58 @@ components:
commission:
$ref: "#/components/schemas/MoneyAmount"

MarketOrderRequest:
type: object
required:
- operation
- lots
properties:
lots:
type: integer
format: int32
operation:
$ref: "#/components/schemas/OperationType"
MarketOrderResponse:
type: object
required:
- trackingId
- status
- payload
properties:
trackingId:
type: string
status:
type: string
default: Ok
payload:
$ref: "#/components/schemas/PlacedMarketOrder"
PlacedMarketOrder:
type: object
required:
- orderId
- operation
- status
- requestedLots
- executedLots
properties:
orderId:
type: string
operation:
$ref: "#/components/schemas/OperationType"
status:
$ref: '#/components/schemas/OrderStatus'
rejectReason:
type: string
message:
description: "Сообщение об ошибке"
type: string
requestedLots:
type: integer
executedLots:
type: integer
commission:
$ref: "#/components/schemas/MoneyAmount"

TradeStatus:
type: string
enum:
Expand Down

0 comments on commit 4e321ee

Please sign in to comment.