-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSwagger.yaml
90 lines (89 loc) · 2.01 KB
/
Swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
openapi: 3.0.0
definitions:
Candle:
properties:
close:
description: Close price
type: number
date_open:
description: Date open candle
format: date
type: string
high:
description: High price
type: number
low:
description: Low price
type: number
open:
description: Open price
type: number
volume:
description: Volume
type: number
required:
- date_open
type: object
info:
title: Yahoo quote loader service
version: v1
paths:
/api/quote:
get:
description: Get stock quotes
parameters:
- description: Yahoo stock code
in: query
name: stock
required: true
schema:
type: string
example: "AAPL"
- description: Timeframe
in: query
name: timeframe
required: true
schema:
type: string
enum:
- DAY
- WEEK
- MONTH
- D
- W
- M
example: DAY
- description: Download from date
in: query
name: date_from
required: true
schema:
type: string
format: date
example: "2020-01-01"
- description: Download till datea
in: query
name: date_till
required: true
schema:
type: string
format: date
example: "2021-01-01"
responses:
'200':
description: 'Loaded stock quotes in candles'
content:
application/json:
schema:
items:
$ref: '#/definitions/Candle'
type: array
'400':
description: 'Error while loading'
content:
plain/text:
schema:
type: string
example: "Stock XYZ doesn't found"
tags:
- Quotes