Could Crypto Functionality be Added? #49
Answered
by
alvarobartt
sahelanthropussy
asked this question in
Q&A
-
Hi alvarobartt, |
Beta Was this translation helpful? Give feedback.
Answered by
alvarobartt
Oct 17, 2022
Replies: 1 comment
-
Hi @sahelanthropussy, indeed you can currently do that with from investiny import search_assets
results = search_assets(query="bitcoin")
print(results)
>>> [{'symbol': 'BTC/USD', 'full_name': 'Bitfinex:BTC/USD', 'description': 'Bitcoin US Dollar', 'type': 'Forex', 'ticker': '945629', 'exchange': 'Bitfinex'}, {'symbol': 'BTC/USD', 'full_name': 'Investing.com:BTC/USD', 'description': 'Bitcoin', 'type': 'Index', 'ticker': '1057391', 'exchange': 'Investing.com'}, {'symbol': 'WGMI', 'full_name': 'NASDAQ:WGMI', 'description': 'Valkyrie Bitcoin Miners ETF', 'type': 'ETF', 'ticker': '1187014', 'exchange': 'NASDAQ'}, {'symbol': 'CRYP', 'full_name': 'NYSE:CRYP', 'description': 'AdvisorShares Managed Bitcoin Strategy ETF', 'type': 'ETF', 'ticker': '1188202', 'exchange': 'NYSE'}, {'symbol': 'BITI', 'full_name': 'NYSE:BITI', 'description': 'ProShares Short Bitcoin Strategy ETF', 'type': 'ETF', 'ticker': '1192319', 'exchange': 'NYSE'}, {'symbol': 'XBTF', 'full_name': 'NYSE:XBTF', 'description': 'VanEck Bitcoin Strategy ETF', 'type': 'ETF', 'ticker': '1178671', 'exchange': 'NYSE'}, {'symbol': 'BITS', 'full_name': 'NASDAQ:BITS', 'description': 'Global X Blockchain & Bitcoin Strategy ETF', 'type': 'ETF', 'ticker': '1187217', 'exchange': 'NASDAQ'}, {'symbol': 'BTF', 'full_name': 'NASDAQ:BTF', 'description': 'Valkyrie Bitcoin Strategy ETF', 'type': 'ETF', 'ticker': '1178479', 'exchange': 'NASDAQ'}, {'symbol': 'RIGZ', 'full_name': 'NYSE:RIGZ', 'description': 'Viridi Bitcoin Miners ETF', 'type': 'ETF', 'ticker': '1175614', 'exchange': 'NYSE'}, {'symbol': 'NYXBT', 'full_name': 'NYSE:NYXBT', 'description': 'NYSE Bitcoin', 'type': 'Index', 'ticker': '1011883', 'exchange': 'NYSE'}] Then if you want to retrieve the historical data, you just need to retrieve the from investiny import historical_data
data = historical_data(investing_id= 945629)
print(data)
>>> {'date': ['09/19/2022', '09/20/2022', '09/21/2022', '09/22/2022', '09/23/2022', '09/24/2022', '09/25/2022', '09/26/2022', '09/27/2022', '09/28/2022', '09/29/2022', '09/30/2022', '10/01/2022', '10/02/2022', '10/03/2022', '10/04/2022', '10/05/2022', '10/06/2022', '10/07/2022', '10/08/2022', '10/09/2022', '10/10/2022', '10/11/2022', '10/12/2022', '10/13/2022', '10/14/2022', '10/15/2022', '10/16/2022', '10/17/2022'], 'open': [19424.00390625, 19544.515625, 18886.623046875, 18476.53515625, 19413, 19298.802734375, 18935, 18817, 19229.53125, 19096.595703125, 19419, 19588, 19429.990234375, 19317, 19066, 19638, 20340, 20156, 19957, 19533, 19418.01171875, 19444.4296875, 19128, 19062.02734375, 19158, 19387, 19187, 19072, 19266], 'high': [19684, 19634, 19888, 19502, 19512, 19314.00390625, 19179, 19326, 20373, 19783, 19651.27734375, 20171, 19485, 19396, 19688, 20470, 20363, 20444, 20053, 19621.373046875, 19551.369140625, 19526.958984375, 19260, 19232, 19503, 19946, 19227, 19428, 19683], 'low': [18318, 18769, 18214, 18378.755859375, 18562, 18822, 18647, 18699, 18856, 18495, 18863, 19201, 19172, 18945, 18985, 19510, 19756.822265625, 19866, 19336, 19275, 19326, 19056, 18870, 19026, 18200, 19103, 18993, 19068, 19168], 'close': [19544.515625, 18886.623046875, 18476.53515625, 19413, 19298.802734375, 18935, 18817, 19229.53125, 19096.595703125, 19419, 19588, 19429.990234375, 19317, 19066, 19638, 20340, 20156, 19957, 19533, 19418.01171875, 19444.4296875, 19128, 19062.02734375, 19158, 19387, 19187, 19072, 19269, 19516]} I really hope this information was useful! 🤗 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
alvarobartt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @sahelanthropussy, indeed you can currently do that with
investiny.search_assets
e.g.