How to Get All Historic Data from Binance's API Using this Script, and Build MACD, RSI etc.

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
Hi, can you explain a bit more what the issue is and I'll try to help you debug it?
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
That script gathers historic data and you should be getting close to current. It's designed for using for backtesting. So you would gather data over a period of time, and then use that data to test your algorithms.

If you need current data then using websockets is better, because that script uses a rest API. What are you trying to do with the script? Do you want it for testing an algorithm?
 

workdezire

Affiliate Member
Joined
Aug 11, 2019
Posts/Comments
16
Received Likes
2
Location
India
ETX
0
Ok its using rest api fine, what i want is current hours Upper ,Lower and Middle of bollbingers bands data which i am getting of 2hrs ago, it should give me current hours or atleast last hours data,
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
Yes it should be giving you the data up to maximum one hour ago. How far back are you taking the data from? Are you taking the entire history of Binance?
 

workdezire

Affiliate Member
Joined
Aug 11, 2019
Posts/Comments
16
Received Likes
2
Location
India
ETX
0
no i started the script 2 hrs ago and i have data collected of 48 hrs till now, but the last hours data is of 2hrs ago.
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
Let me take a quick look at the script now. Please just give me a minute or two.
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
If you check the epoch time its of 8 am current is 11am.
Can you run this: https://api.binance.com/api/v1/klines?symbol=ETHBTC&interval=1h in the browser, and compare that against what you are getting when you run the script. Check whether the current price is the same for the results of the script and that rest call.

The time that you're getting as the last time stamp might be different from your local time, but the price should be the same if the script is functional.
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
There shouldn't be a gap of 3hrs missing from the data. I'm also not normally running it for only 48 hours of 1h data though. What is the interval you are using? 1hr?
 

workdezire

Affiliate Member
Joined
Aug 11, 2019
Posts/Comments
16
Received Likes
2
Location
India
ETX
0
There shouldn't be a gap of 3hrs missing from the data. I'm also not normally running it for only 48 hours of 1h data though. What is the interval you are using? 1hr?
I need to check on it gimi some time i will reply back
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
Sure, I am here for a few more hours tonight. Let me know and I'll try to help you resolve it.
 

Quantum

Founder of Emerging.Technology
Staff member
Admin
Moderator
Joined
Jul 8, 2018
Posts/Comments
324
Received Likes
101
Location
Emerging.Technology
ETX
135
is it possible for you to be available tomorrow also same time
No problem, I'll be here the same time tomorrow and we can go over the script again then. Also, yes, the bollingers should be current and the data should be current also.
 

ruslanv7

Newcomer
Joined
Jun 27, 2020
Posts/Comments
3
Received Likes
0
Location
New York
ETX
0
An official in the firm of Waterfirst called the emergency meeting on April 29 after 120 customers called the firm to complain. At one stage, six customers were being offered immediate loans totalling £100,000 to cover repayments on loans they had taken out with the firm. The company has also issued legal letters to a further 9,872 customers, seeking payback of loans of up to £15,000. Customers who went to the Financial Services Authority (FSA) complained that they had not known that the company offered rapid-reversion lending. Under this arrangement, a borrower’s existing loan will be switched to a one-month loan at its interest rate, regardless of whether the borrower pays the new loan back on time. If the customer does not pay off the loan within 14 days, they will lose their money and be given no repayment option but to reapply for a further loan. Almost 30,000 customers have now complained about the firm to the FSA, the Financial Ombudsman Service and two other consumer associations. Waterfirst said it had a repayment plan in place for every customer. The offer has been withdrawn for those who did not accept it. The firm said it did not know how many of the debts it has to repay. It has stopped contacting customers with outstanding loans and now forwards inquiries to Financial Rescue Solutions, a collection agency the firm employs. The company is recruiting experts to help assess an “unprecedented level” of complaints. Chairman Michael Brewer said: “The continuing enquiries we receive from irate customers are leaving us with a significant amount of debt. “Obviously, this situation is very worrying as it requires us to look at quite significant changes. We have therefore taken the decision to transfer the management of most of our customer base to a specialist company.”