美文网首页
(ccxt笔记)OKEX交易所方法调试:取服务器时间

(ccxt笔记)OKEX交易所方法调试:取服务器时间

作者: 红枕斜阳 | 来源:发表于2021-02-22 22:38 被阅读0次

方法:.fetch_time()

import ccxt  # 导入库
from pprint import pp

class MyOkex(ccxt.okex):
    # 直接继续ccxt相应交易所类后再写自己的方法。
    def __init__(self):
        super(MyOkex, self).__init__()


# 实例化
myOkex=MyOkex()
info=myOkex.fetch_time()
pp(info)

结果:

1614001673340
# 毫秒级时间戳,对应北京时间:2021-02-22 21:47:53
# 时间戳在线转换工具:https://tool.lu/timestamp/

相关文章

网友评论

      本文标题:(ccxt笔记)OKEX交易所方法调试:取服务器时间

      本文链接:https://www.haomeiwen.com/subject/tyklfltx.html