The resource loading... loading...

We asked a question about the k-line.

Author: tony233, Created: 2021-08-03 22:26:26, Updated:

I looked at the API documentation about exchange.GetRecords (),Log (),Current K-line (),Last (),Rekords (-1),Current K-line (),Rekords (-2)) Here records[-1] represents the latest k line, I want to ask what does the latest k line mean? For example, if I set the cycle to 5 minutes, if it is now 9:32, then I use record=exchange.GetRecords ((PERIOD_M5) record[-1][Close button] In other words, if the time cycle I set doesn't end, what does the price look like?


More

The grassThe latest version of K Line's Close has been changing according to the market.

The grassTime zones are different, timelines are the same

tony233Why is your local time on your platform 8 hours slower than Beijing time... I spent half a day thinking how the exchange rate is not right, the time is wrong...

tony233 666

The grassNote the difference between ms and s, except for 1000 tries.

tony233I also want to ask a question, my record [-1]['Time'] get is how does the time stamp convert costly time, I've gotten it wrong, please help me see, I use python '" Start: 2021-08-02 00:00:00 This is the latest version of the game. End: 2021-08-03 00:00:00 This is a list of all the different ways I'm going to post this post. period: 1h [{"eid":"okex","currency":"BTC_USDT","stocks:"0}] '" import numpy as np import pandas as pd Import time import date time from fmz import* # Import all FMZ functions I'm going to try to get this to work. while True: record = exchange.GetRecords time1 = record[-1]['Time'] time_local = time.localtime ((time1) time2 = time.strftime (("%Y-%m-%d %H:%M:%S", time_local) print ((time2) So the output is going to be this.

tony233Oh, that's right, thank you.