-
Notifications
You must be signed in to change notification settings - Fork 11
/
bars-v2.yml
114 lines (114 loc) · 3.65 KB
/
bars-v2.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
openapi: 3.0.1
info:
title: Historical Bar Data
description: Benzinga Historical Bar Rest API
version: "1.0"
servers:
- url: https://api.benzinga.com/api/v2
- url: http://api.benzinga.com/api/v2
security:
- token: []
paths:
/bars:
get:
summary: Get the delayed quotes.
parameters:
- name: accept
in: header
description: Specify return format.
schema:
type: string
default: application/json
enum:
- application/json
- application/xml (deprecated)
- name: symbols
in: query
description: One or more comma separated symbols to specify companies to get
data for.
schema:
type: string
format: csv
- name: from
in: query
description: 'Date to query from point in time. Sorted by published date.
If "YTD" Sets from to the first trading day of the current year. Some other
valid values: "1MONTH", "1m", "1M" (all meaning "1 month from today"),
"1d", "1D" (both meaning "1 day from today").'
schema:
type: string
format: YYYY-MM-DD, or any of YTD, iMONTH, iM, iD
- name: to
in: query
description: Date to query to point in time. Sorted by published date.
schema:
type: string
format: YYYY-MM-DD, or any of iMONTH, iW, iD, iH, iM
- name: interval
in: query
description: 'The candle intervals to use, i.e., 5 minute bars, daily bars,
etc. Some valid values: 1MONTH, 1W, 1D, 1H (1 hour), 2H, 3H, 4H, 5M (5 minutes),
10M, 15M, 30M. Defaults to an appropriate value based on the period of data
requested: i.e., 5 minutes bars if less than 5 days, daily bars if greater.'
schema:
type: string
responses:
200:
description: Successful response
content:
'*/*':
schema:
type: array
items:
$ref: '#/components/schemas/BarsResponse'
components:
schemas:
BarsResponse:
type: object
properties:
symbol:
type: string
description: The given symbol
interval:
type: number
description: The candle interval
candles:
type: array
description: An array of bar data / candles
items:
type: object
properties:
open:
type: number
description: Price at same day market open
format: float
high:
type: number
description: Indicator of highest price of security for same day
format: float
low:
type: number
description: Indicator of lowest price of security for same day
format: float
close:
type: number
description: Price at same day close. Only available after market
close.
format: float
volume:
type: integer
description: Volume for the current or previous regular-only trading
session
time:
type: integer
description: Unix timestamp in millis.
dateTime:
type: string
description: Datetime is aligned to the start or the candle, or to
the start of the pre-market session if a daily.
format: YYYY-MM-DDTHH:MM:SS.mmm-ZZ:zz
securitySchemes:
token:
type: apiKey
name: token
in: query