-
Notifications
You must be signed in to change notification settings - Fork 26
Expand file tree
/
Copy pathtechnical_api.py
More file actions
3817 lines (3308 loc) · 208 KB
/
technical_api.py
File metadata and controls
3817 lines (3308 loc) · 208 KB
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
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# coding: utf-8
"""
Intrinio API
Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://docs.intrinio.com/documentation/api_v2). If you need additional help in using the API, please visit the [Intrinio website](https://intrinio.com) and click on the chat icon in the lower right corner. # noqa: E501
OpenAPI spec version: 2.123.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from intrinio_sdk.api_client import ApiClient
class TechnicalApi(object):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
Ref: https://github.com/swagger-api/swagger-codegen
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def get_security_price_technicals_adi(self, identifier, **kwargs): # noqa: E501
"""Accumulation/Distribution Index # noqa: E501
The Accumulation / Distribution Indicator is a volume-based technical indicator which uses the relationship between the stock`s price and volume flow to determine the underlying trend of a stock, up, down, or sideways trend of a stock. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_adi(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAccumulationDistributionIndex
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_adi_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_adi_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_adi_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Accumulation/Distribution Index # noqa: E501
The Accumulation / Distribution Indicator is a volume-based technical indicator which uses the relationship between the stock`s price and volume flow to determine the underlying trend of a stock, up, down, or sideways trend of a stock. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_adi_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAccumulationDistributionIndex
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_adi" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_adi`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_adi`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/adi', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityAccumulationDistributionIndex', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_adtv(self, identifier, **kwargs): # noqa: E501
"""Average Daily Trading Volume # noqa: E501
Average Daily Trading Volume is the average number of shares traded over a given period, usually between 20 to 30 trading days. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_adtv(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Average Daily Trading Volume
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAverageDailyTradingVolume
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_adtv_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_adtv_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_adtv_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Average Daily Trading Volume # noqa: E501
Average Daily Trading Volume is the average number of shares traded over a given period, usually between 20 to 30 trading days. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_adtv_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Average Daily Trading Volume
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAverageDailyTradingVolume
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'period', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_adtv" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_adtv`") # noqa: E501
if 'period' in params and params['period'] < 5: # noqa: E501
raise ValueError("Invalid value for parameter `period` when calling `get_security_price_technicals_adtv`, must be a value greater than or equal to `5`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_adtv`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'period' in params:
query_params.append(('period', params['period'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/adtv', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityAverageDailyTradingVolume', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_adx(self, identifier, **kwargs): # noqa: E501
"""Average Directional Index # noqa: E501
The Average Directional Index indicator is often used to identify decreasing or increasing price momentum for an underlying security, it is composed of a total of three indicators, the current trendline (adx), a positive directional indicator (di_pos), and a negative directional indicator (di_neg). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_adx(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Average Directional Index
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAverageDirectionalIndex
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_adx_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_adx_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_adx_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Average Directional Index # noqa: E501
The Average Directional Index indicator is often used to identify decreasing or increasing price momentum for an underlying security, it is composed of a total of three indicators, the current trendline (adx), a positive directional indicator (di_pos), and a negative directional indicator (di_neg). # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_adx_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Average Directional Index
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAverageDirectionalIndex
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'period', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_adx" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_adx`") # noqa: E501
if 'period' in params and params['period'] < 3: # noqa: E501
raise ValueError("Invalid value for parameter `period` when calling `get_security_price_technicals_adx`, must be a value greater than or equal to `3`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_adx`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'period' in params:
query_params.append(('period', params['period'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/adx', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityAverageDirectionalIndex', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_ao(self, identifier, **kwargs): # noqa: E501
"""Awesome Oscillator # noqa: E501
The Awesome Oscillator (ao) is a momentum indicator and is calculated by taking the difference between the latest 5 period simple moving average and the 34 period simple moving average. Rather than using the closing price like other indicators, the Awesome Oscillator uses the latest period`s midpoint value (period_high - period_low / 2). The Awesome Oscillator is useful in identifying and trading, zero-line crossovers, twin-peaks trading, and bullish/bearish saucers - Awesome Oscillator is often aggregated with additional technical indicators. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_ao(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int short_period: The number of observations to calculate short period Simple Moving Average of the Awesome Oscillator
:param int long_period: The number of observations to calculate long period Simple Moving Average of the Awesome Oscillator
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAwesomeOscillator
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_ao_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_ao_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_ao_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Awesome Oscillator # noqa: E501
The Awesome Oscillator (ao) is a momentum indicator and is calculated by taking the difference between the latest 5 period simple moving average and the 34 period simple moving average. Rather than using the closing price like other indicators, the Awesome Oscillator uses the latest period`s midpoint value (period_high - period_low / 2). The Awesome Oscillator is useful in identifying and trading, zero-line crossovers, twin-peaks trading, and bullish/bearish saucers - Awesome Oscillator is often aggregated with additional technical indicators. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_ao_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int short_period: The number of observations to calculate short period Simple Moving Average of the Awesome Oscillator
:param int long_period: The number of observations to calculate long period Simple Moving Average of the Awesome Oscillator
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAwesomeOscillator
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'short_period', 'long_period', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_ao" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_ao`") # noqa: E501
if 'long_period' in params and params['long_period'] < 5: # noqa: E501
raise ValueError("Invalid value for parameter `long_period` when calling `get_security_price_technicals_ao`, must be a value greater than or equal to `5`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_ao`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'short_period' in params:
query_params.append(('short_period', params['short_period'])) # noqa: E501
if 'long_period' in params:
query_params.append(('long_period', params['long_period'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/ao', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityAwesomeOscillator', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_atr(self, identifier, **kwargs): # noqa: E501
"""Average True Range # noqa: E501
The Average True Range (ATR) is a non-directional market volatility indicator often used to generate stop-out or entry indications. An increasing or expanding ATR typically indicates higher volatility, and a decreasing ATR indicates sideways price action and lower volatility. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_atr(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Average True Range
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAverageTrueRange
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_atr_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_atr_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_atr_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Average True Range # noqa: E501
The Average True Range (ATR) is a non-directional market volatility indicator often used to generate stop-out or entry indications. An increasing or expanding ATR typically indicates higher volatility, and a decreasing ATR indicates sideways price action and lower volatility. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_atr_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Average True Range
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityAverageTrueRange
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'period', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_atr" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_atr`") # noqa: E501
if 'period' in params and params['period'] < 4: # noqa: E501
raise ValueError("Invalid value for parameter `period` when calling `get_security_price_technicals_atr`, must be a value greater than or equal to `4`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_atr`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'period' in params:
query_params.append(('period', params['period'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/atr', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityAverageTrueRange', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_bb(self, identifier, **kwargs): # noqa: E501
"""Bollinger Bands # noqa: E501
Bollinger Bands can be a useful technical analysis tool for generating oversold or overbought indicators. Bollinger Bands are composed of three lines, a simple moving average (middle band) and an upper and lower band – the upper and lower bands are typically 2 standard deviations +/- from a 20-day simple moving average, but can be modified. Traders typically consider an underlying security to be overbought as the underlying`s price moves towards the upper band and oversold as the underlying price moves towards the lower band. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_bb(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Bollinger Bands
:param float standard_deviations: The number of standard deviations to calculate the upper and lower bands of the Bollinger Bands
:param str price_key: The Stock Price field to use when calculating Bollinger Bands
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityBollingerBands
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_bb_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_bb_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_bb_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Bollinger Bands # noqa: E501
Bollinger Bands can be a useful technical analysis tool for generating oversold or overbought indicators. Bollinger Bands are composed of three lines, a simple moving average (middle band) and an upper and lower band – the upper and lower bands are typically 2 standard deviations +/- from a 20-day simple moving average, but can be modified. Traders typically consider an underlying security to be overbought as the underlying`s price moves towards the upper band and oversold as the underlying price moves towards the lower band. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_bb_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Bollinger Bands
:param float standard_deviations: The number of standard deviations to calculate the upper and lower bands of the Bollinger Bands
:param str price_key: The Stock Price field to use when calculating Bollinger Bands
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityBollingerBands
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'period', 'standard_deviations', 'price_key', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_bb" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_bb`") # noqa: E501
if 'period' in params and params['period'] < 5: # noqa: E501
raise ValueError("Invalid value for parameter `period` when calling `get_security_price_technicals_bb`, must be a value greater than or equal to `5`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_bb`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'period' in params:
query_params.append(('period', params['period'])) # noqa: E501
if 'standard_deviations' in params:
query_params.append(('standard_deviations', params['standard_deviations'])) # noqa: E501
if 'price_key' in params:
query_params.append(('price_key', params['price_key'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/bb', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityBollingerBands', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_cci(self, identifier, **kwargs): # noqa: E501
"""Commodity Channel Index # noqa: E501
The Commodity Channel Index (CCI) is a technical indicator used to generate buy and sell signals by indicating periods of strength and weakness in the market. CCI signals that fall below -100 are often perceived as weakness in the underlying price movement and CCI signals that rise above 100 indicate strength behind the underlying price movement. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_cci(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Commodity Channel Index
:param float constant: The number of observations to calculate Commodity Channel Index
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityCommodityChannelIndex
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_cci_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_cci_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_cci_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Commodity Channel Index # noqa: E501
The Commodity Channel Index (CCI) is a technical indicator used to generate buy and sell signals by indicating periods of strength and weakness in the market. CCI signals that fall below -100 are often perceived as weakness in the underlying price movement and CCI signals that rise above 100 indicate strength behind the underlying price movement. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_cci_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Commodity Channel Index
:param float constant: The number of observations to calculate Commodity Channel Index
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityCommodityChannelIndex
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'period', 'constant', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_cci" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_cci`") # noqa: E501
if 'period' in params and params['period'] < 5: # noqa: E501
raise ValueError("Invalid value for parameter `period` when calling `get_security_price_technicals_cci`, must be a value greater than or equal to `5`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_cci`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'period' in params:
query_params.append(('period', params['period'])) # noqa: E501
if 'constant' in params:
query_params.append(('constant', params['constant'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/cci', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityCommodityChannelIndex', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_cmf(self, identifier, **kwargs): # noqa: E501
"""Chaikin Money Flow # noqa: E501
The Chaikin Money Flow (CMF) utilizes exponential moving averages as an indicator to monitor the flow of money and momentum. The CMF indicator oscillates around a midrange 0-line and ranges between 100 and -100. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_cmf(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Chaikin Money Flow
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityChaikinMoneyFlow
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_security_price_technicals_cmf_with_http_info(identifier, **kwargs) # noqa: E501
else:
(data) = self.get_security_price_technicals_cmf_with_http_info(identifier, **kwargs) # noqa: E501
return data
def get_security_price_technicals_cmf_with_http_info(self, identifier, **kwargs): # noqa: E501
"""Chaikin Money Flow # noqa: E501
The Chaikin Money Flow (CMF) utilizes exponential moving averages as an indicator to monitor the flow of money and momentum. The CMF indicator oscillates around a midrange 0-line and ranges between 100 and -100. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.get_security_price_technicals_cmf_with_http_info(identifier, _async=True)
>>> result = thread.get()
:param async bool
:param str identifier: A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID) (required)
:param int period: The number of observations to calculate Chaikin Money Flow
:param str start_date: Return technical indicator values on or after the date
:param str end_date: Return technical indicator values on or before the date
:param int page_size: The number of results to return
:param str next_page: Gets the next page of data from a previous API call
:return: ApiResponseSecurityChaikinMoneyFlow
If the method is called asynchronously,
returns the request thread.
"""
all_params = ['identifier', 'period', 'start_date', 'end_date', 'page_size', 'next_page'] # noqa: E501
all_params.append('async')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')
params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method get_security_price_technicals_cmf" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'identifier' is set
if ('identifier' not in params or
params['identifier'] is None):
raise ValueError("Missing the required parameter `identifier` when calling `get_security_price_technicals_cmf`") # noqa: E501
if 'period' in params and params['period'] < 5: # noqa: E501
raise ValueError("Invalid value for parameter `period` when calling `get_security_price_technicals_cmf`, must be a value greater than or equal to `5`") # noqa: E501
if 'page_size' in params and params['page_size'] > 10000: # noqa: E501
raise ValueError("Invalid value for parameter `page_size` when calling `get_security_price_technicals_cmf`, must be a value less than or equal to `10000`") # noqa: E501
collection_formats = {}
path_params = {}
if 'identifier' in params:
path_params['identifier'] = params['identifier'] # noqa: E501
query_params = []
if 'period' in params:
query_params.append(('period', params['period'])) # noqa: E501
if 'start_date' in params:
query_params.append(('start_date', params['start_date'])) # noqa: E501
if 'end_date' in params:
query_params.append(('end_date', params['end_date'])) # noqa: E501
if 'page_size' in params:
query_params.append(('page_size', params['page_size'])) # noqa: E501
if 'next_page' in params:
query_params.append(('next_page', params['next_page'])) # noqa: E501
header_params = {}
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = ['ApiKeyAuth'] # noqa: E501
return self.api_client.call_api(
'/securities/{identifier}/prices/technicals/cmf', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='ApiResponseSecurityChaikinMoneyFlow', # noqa: E501
auth_settings=auth_settings,
_async=params.get('async'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
def get_security_price_technicals_dc(self, identifier, **kwargs): # noqa: E501
"""Donchian Channel # noqa: E501