MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_time

Method fetch_time

python/ccxt/xt.py:824–845  ·  view source on GitHub ↗

fetches the current integer timestamp in milliseconds from the xt server https://doc.xt.com/#market1serverInfo :param dict params: extra parameters specific to the xt api endpoint :returns int: the current integer timestamp in milliseconds from the xt server

(self, params={})

Source from the content-addressed store, hash-verified

822 return self.milliseconds() - self.options['timeDifference']
823
824 def fetch_time(self, params={}) -> Int:
825 """
826 fetches the current integer timestamp in milliseconds from the xt server
827
828 https://doc.xt.com/#market1serverInfo
829
830 :param dict params: extra parameters specific to the xt api endpoint
831 :returns int: the current integer timestamp in milliseconds from the xt server
832 """
833 response = self.publicSpotGetTime(params)
834 #
835 # {
836 # "rc": 0,
837 # "mc": "SUCCESS",
838 # "ma": [],
839 # "result": {
840 # "serverTime": 1677823301643
841 # }
842 # }
843 #
844 data = self.safe_value(response, 'result')
845 return self.safe_integer(data, 'serverTime')
846
847 def fetch_currencies(self, params={}) -> Currencies:
848 """

Callers 1

latoken-example.pyFile · 0.45

Calls 3

safe_valueMethod · 0.80
safe_integerMethod · 0.80
publicSpotGetTimeMethod · 0.65

Tested by

no test coverage detected