Skip to content

Commit 4e321ee

Browse files
authored
add POST /market-order method description to swagger.yaml (#108)
1 parent c00a8b1 commit 4e321ee

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

src/docs/swagger-ui/swagger.yaml

+92
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,46 @@ paths:
245245
schema:
246246
$ref: "#/components/schemas/Error"
247247

248+
/orders/market-order:
249+
post:
250+
tags:
251+
- orders
252+
summary: Создание рыночной заявки
253+
security:
254+
- sso_auth: []
255+
parameters:
256+
- name: figi
257+
in: query
258+
required: true
259+
description: FIGI инструмента
260+
schema:
261+
type: string
262+
- name: brokerAccountId
263+
in: query
264+
required: false
265+
description: Уникальный идентификатор счета (по умолчанию - Тинькофф)
266+
schema:
267+
type: string
268+
requestBody:
269+
content:
270+
application/json:
271+
schema:
272+
$ref: "#/components/schemas/MarketOrderRequest"
273+
required: true
274+
responses:
275+
"200":
276+
description: Созданная заявка
277+
content:
278+
application/json:
279+
schema:
280+
$ref: "#/components/schemas/MarketOrderResponse"
281+
"500":
282+
description: Ошибка запроса
283+
content:
284+
application/json:
285+
schema:
286+
$ref: "#/components/schemas/Error"
287+
248288
/orders/cancel:
249289
post:
250290
tags:
@@ -1170,6 +1210,58 @@ components:
11701210
commission:
11711211
$ref: "#/components/schemas/MoneyAmount"
11721212

1213+
MarketOrderRequest:
1214+
type: object
1215+
required:
1216+
- operation
1217+
- lots
1218+
properties:
1219+
lots:
1220+
type: integer
1221+
format: int32
1222+
operation:
1223+
$ref: "#/components/schemas/OperationType"
1224+
MarketOrderResponse:
1225+
type: object
1226+
required:
1227+
- trackingId
1228+
- status
1229+
- payload
1230+
properties:
1231+
trackingId:
1232+
type: string
1233+
status:
1234+
type: string
1235+
default: Ok
1236+
payload:
1237+
$ref: "#/components/schemas/PlacedMarketOrder"
1238+
PlacedMarketOrder:
1239+
type: object
1240+
required:
1241+
- orderId
1242+
- operation
1243+
- status
1244+
- requestedLots
1245+
- executedLots
1246+
properties:
1247+
orderId:
1248+
type: string
1249+
operation:
1250+
$ref: "#/components/schemas/OperationType"
1251+
status:
1252+
$ref: '#/components/schemas/OrderStatus'
1253+
rejectReason:
1254+
type: string
1255+
message:
1256+
description: "Сообщение об ошибке"
1257+
type: string
1258+
requestedLots:
1259+
type: integer
1260+
executedLots:
1261+
type: integer
1262+
commission:
1263+
$ref: "#/components/schemas/MoneyAmount"
1264+
11731265
TradeStatus:
11741266
type: string
11751267
enum:

0 commit comments

Comments
 (0)