question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to get historical and current daily "closing" prices?

See original GitHub issue

Question…

I’ve been reading the manual so this is likely to be me not understanding what I should be looking for. I’m trying to get the “closing” prices for one or more assets either historical or current. I’m using midnight UTC as the closing time. Not sure if there is a recommended way.

I tried using fetch_ohlcv for a small window but it seems convoluted and I’m not entirely sure I’m actually getting what I should be getting. Is there a recommended way or perhaps an example in the examples folder that is close to what I should be looking at? I don’t mind doing the work but any help narrowing down my search or an example would be great.

Thank you!

  • OS: OSX and Ubuntu
  • Programming Language version: Python 3 or JavaScript
  • CCXT version: 1.18.603
  • Exchange: Kraken
  • Method: fetch_ohlcv?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
lgomezcommented, Jun 2, 2019

Wow @kroitor … that was probably the fastest response I’ve ever gotten from any Github issue. I was literally tipping a follow up question asking if I could do what you just described. So thank you very much for the response. I’ll go ahead and try that.

0reactions
ghostcommented, Jan 7, 2022

You add a pram to the call. fetch_ohlcv(‘ETH/USDT’, ‘1d’, timestamp).

Timestamp is in millisecond and is the start date of the data range. Example 1641565197193. Which is equal to a date and time from the date you want data. You can get this conversion at https://www.epochconverter.com/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where Can I Find Historical Stock/Index Quotes? - Investopedia
Finding historical quotes on stocks and indices online has never been easier. ... enter a date range as well as daily, weekly, or...
Read more >
Historical Data - Nasdaq
Historical data provides up to 10 years of daily historical stock prices and volumes for each stock. Historical price trends can indicate the...
Read more >
STOCKHISTORY function - Microsoft Support
Function returns historical price data about the financial instrument corresponding to this value. ... Closing price on the last trading day in the...
Read more >
Get Current and Historical Stock Prices into Excel
You can select the tickers, then click the Data > Stocks command in the Data Types group. When you do, Excel attempts to...
Read more >
Download historical data in Yahoo Finance - SLN2311
You can view historical price, dividend, and split data for most quotes in Yahoo Finance to forecast the future of a company or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found