Skip to content

Commit

Permalink
Merge pull request #3 from lightning95/v19.2
Browse files Browse the repository at this point in the history
v19.2
  • Loading branch information
NikitaMelnikov authored Oct 16, 2019
2 parents 7cfd50d + 3212700 commit 3025770
Showing 1 changed file with 297 additions and 13 deletions.
310 changes: 297 additions & 13 deletions src/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,18 @@ paths:
description: Начало временного промежутка
schema:
type: string
format: date
- name: interval
format: 'date-time'
description: "ISO8601"
example: "2019-08-19T18:38:33.131642+03:00"
- name: to
in: query
required: true
description: Длительность временного промежутка
description: Конец временного промежутка
schema:
$ref: '#/components/schemas/OperationInterval'
type: string
format: 'date-time'
description: "ISO8601"
example: "2019-08-19T18:38:33.131642+03:00"
- name: figi
in: query
required: false
Expand Down Expand Up @@ -359,6 +364,94 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/Error"

/market/orderbook:
get:
tags:
- market
summary: Получение исторических стакана по FIGI
security:
- sso_auth: []
parameters:
- name: figi
in: query
required: true
description: FIGI
schema:
type: string
- name: depth
in: query
required: true
description: Глубина стакана [1..20]
schema:
type: integer
format: int32
responses:
"200":
description: Успешный ответ
content:
application/json:
schema:
$ref: "#/components/schemas/OrderbookResponse"
"500":
description: Инструмент не найден
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/market/candles:
get:
tags:
- market
summary: Получение исторических свечей по FIGI
security:
- sso_auth: []
parameters:
- name: figi
in: query
required: true
description: FIGI
schema:
type: string
- name: from
in: query
required: true
description: Начало временного промежутка
schema:
type: string
format: 'date-time'
description: "ISO8601"
example: "2019-08-19T18:38:33.131642+03:00"
- name: to
in: query
required: true
description: Конец временного промежутка
schema:
type: string
format: 'date-time'
description: "ISO8601"
example: "2019-08-19T18:38:33.131642+03:00"
- name: interval
in: query
required: true
description: Интервал свечи
schema:
$ref: '#/components/schemas/CandleResolution'
responses:
"200":
description: Успешный ответ
content:
application/json:
schema:
$ref: "#/components/schemas/CandlesResponse"
"500":
description: Инструмент не найден
content:
application/json:
schema:
$ref: "#/components/schemas/Error"

/market/search/by-figi:
get:
tags:
Expand Down Expand Up @@ -546,11 +639,16 @@ components:
blocked:
type: number
format: double
expectedYield:
$ref: "#/components/schemas/MoneyAmount"
lots:
type: integer
format: int32
expectedYield:
$ref: "#/components/schemas/MoneyAmount"
averagePositionPrice:
$ref: "#/components/schemas/MoneyAmount"
averagePositionPriceNoNkd:
$ref: "#/components/schemas/MoneyAmount"

MoneyAmount:
type: object
required:
Expand All @@ -562,6 +660,172 @@ components:
value:
type: number
format: double

OrderbookResponse:
type: object
required:
- trackingId
- status
- payload
properties:
trackingId:
type: string
status:
type: string
default: Ok
payload:
$ref: "#/components/schemas/Orderbook"

Orderbook:
type: object
required:
- figi
- depth
- bids
- asks
- tradeStatus
- minPriceIncrement
properties:
figi:
type: string
depth:
type: integer
format: int32
bids:
type: array
items:
$ref: '#/components/schemas/OrderResponse'
asks:
type: array
items:
$ref: '#/components/schemas/OrderResponse'
tradeStatus:
$ref: '#/components/schemas/TradeStatus'
minPriceIncrement:
type: number
format: double
lastPrice:
type: number
format: double
closePrice:
type: number
format: double
limitUp:
type: number
format: double
limitDown:
type: number
format: double

OrderResponse:
type: object
required:
- price
- quantity
properties:
price:
type: number
format: double
quantity:
type: integer
format: int32

CandlesResponse:
type: object
required:
- trackingId
- status
- payload
properties:
trackingId:
type: string
status:
type: string
default: Ok
payload:
$ref: "#/components/schemas/Candles"

Candles:
type: object
required:
- candles
- figi
- interval
properties:
figi:
type: string
interval:
$ref: '#/components/schemas/CandleResolution'
candles:
type: array
items:
$ref: '#/components/schemas/Candle'

Candle:
type: object
required:
- figi
- interval
- time
- o
- c
- h
- l
- v
properties:
figi:
type: string
interval:
$ref: '#/components/schemas/CandleResolution'
o:
type: number
format: double
c:
type: number
format: double
h:
type: number
format: double
l:
type: number
format: double
v:
type: integer
format: int32
time:
type: string
format: 'date-time'
description: "ISO8601"
example: "2019-08-19T18:38:33.131642+03:00"

CandleResolution:
description: |
Интервал свечи и допустимый промежуток запроса:
- 1min [1 minute, 1 day]
- 2min [2 minutes, 1 day]
- 3min [3 minutes, 1 day]
- 5min [5 minutes, 1 day]
- 10min [10 minutes, 1 day]
- 15min [15 minutes, 1 day]
- 30min [30 minutes, 1 day]
- hour [1 hour, 7 days]
- day [1 day, 1 year]
- week [7 days, 2 years]
- month [1 month, 10 years]
type: string
enum:
- 1min
- 2min
- 3min
- 5min
- 10min
- 15min
- 30min
- hour
- day
- week
- month

OperationsResponse:
type: object
required:
Expand Down Expand Up @@ -753,11 +1017,19 @@ components:
type: integer
commission:
$ref: "#/components/schemas/MoneyAmount"

TradeStatus:
type: string
enum:
- NormalTrading
- NotAvailableForTrading

OperationType:
type: string
enum:
- Buy
- Sell

OperationTypeWithCommission:
type: string
enum:
Expand All @@ -767,6 +1039,20 @@ components:
- ExchangeCommission
- ServiceCommission
- MarginCommission
- OtherCommission
- PayIn
- PayOut
- Tax
- TaxLucre
- TaxDividend
- TaxCoupon
- TaxBack
- Repayment
- PartRepayment
- Coupon
- Dividend
- SecurityIn
- SecurityOut

OperationStatus:
description: Статус заявки
Expand Down Expand Up @@ -859,12 +1145,14 @@ components:
default: Ok
payload:
$ref: "#/components/schemas/MarketInstrument"

MarketInstrument:
type: object
required:
- figi
- ticker
- lot
- name
properties:
figi:
type: string
Expand All @@ -880,6 +1168,9 @@ components:
format: int32
currency:
$ref: '#/components/schemas/Currency'
name:
type: string

SandboxCurrency:
type: string
enum:
Expand All @@ -892,13 +1183,6 @@ components:
- RUB
- USD
- EUR
OperationInterval:
type: string
enum:
- 1day
- 7days
- 14days
- 30days
InstrumentType:
type: string
enum:
Expand Down

0 comments on commit 3025770

Please sign in to comment.