Api quotes
A class for interacting with OneQuant quotedatas.
Source code in onequant/api/quotes.py
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 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|
__init__(wrapper=None)
¶
Initializes an OqQuotes object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
wrapper |
object
|
An object containing the API and username. Defaults to None. |
None
|
Source code in onequant/api/quotes.py
9 10 11 12 13 14 15 16 |
|
codeinfos()
¶
Returns code information data.
Source code in onequant/api/quotes.py
130 131 132 |
|
future_bars(code=None, interval=None, start_time=None, end_time=None, limit=None)
¶
Fetches K-line (candlestick) data for futures.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
code |
str
|
The code of the future to fetch data for. Defaults to None. |
None
|
interval |
str
|
The time interval for each K-line data point. Defaults to None. |
None
|
start |
uint or str
|
The start time for the data fetch. Can be a timestamp or a date string. |
required |
end |
uint or str
|
The end time for the data fetch. Can be a timestamp or a date string. |
required |
limit |
int
|
The maximum number of data points to fetch. Defaults to None.If set limit value,then |
None
|
Returns:
Type | Description |
---|---|
pandas.DataFrame: The K-line data as a pandas DataFrame. |
Source code in onequant/api/quotes.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
indexes()
¶
Returns indexes data.
Source code in onequant/api/quotes.py
134 135 136 |
|
option_codes()
¶
Returns option codes data.
Source code in onequant/api/quotes.py
138 139 140 |
|
realtime_quote()
¶
Returns realtime quote data.
Returns:
Type | Description |
---|---|
pandas.DataFrame: The realtime quote data. |
Source code in onequant/api/quotes.py
77 78 79 80 81 82 83 |
|
realtime_quotes()
¶
Returns multiple realtime quote data.
Returns:
Type | Description |
---|---|
pandas.DataFrame: The multiple realtime quote data. |
Source code in onequant/api/quotes.py
85 86 87 88 89 90 91 |
|
std_codes()
¶
Returns standard codes data.
Source code in onequant/api/quotes.py
142 143 144 |
|
symbols()
¶
Returns symbols data.
Source code in onequant/api/quotes.py
126 127 128 |
|