GithubHelp home page GithubHelp logo

vnpy_okx's People

Contributors

ezmoney-sniper avatar kandyye avatar noranhe avatar praying avatar veighna-global avatar vn-crypto avatar vnpy avatar zweix123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vnpy_okx's Issues

缺少default_name导致会出现找不到gateway的错误

缺少default_name导致会出现找不到gateway的错误
应该加上:

class OkexGateway(BaseGateway):

default_name: str = "OKEX"

default_setting = {
    "API Key": "",
    "Secret Key": "",
    "Passphrase": "",
    "会话数": 3,
    "代理地址": "",
    "代理端口": "",
    "服务器": ["REAL", "TEST"]
}

3.0运行时,AttributeError: OKEX

完整报错如下,麻烦大神们帮帮忙,感谢

File "/Users/xiaofeiwang/Documents/Quant/vnpy_okex-main/run.py", line 5, in
from vnpy_okex import OkexGateway
File "/Users/xiaofeiwang/Documents/Quant/vnpy_okex-main/vnpy_okex/init.py", line 25, in
from .okex_gateway import OkexGateway
File "/Users/xiaofeiwang/Documents/Quant/vnpy_okex-main/vnpy_okex/okex_gateway.py", line 119, in
class OkexGateway(BaseGateway):
File "/Users/xiaofeiwang/Documents/Quant/vnpy_okex-main/vnpy_okex/okex_gateway.py", line 133, in OkexGateway
exchanges: Exchange = [Exchange.OKEX]
File "/Users/xiaofeiwang/opt/anaconda3/envs/py37_vnpy/lib/python3.9/enum.py", line 429, in getattr
raise AttributeError(name) from None
AttributeError: OKEX

vt_orderid返回为空

buy或sell后vt_orderid返回为空,我看了下,okex_gateway.py 中904行
return order.vt_orderid
OrderData结构没有vt_orderid变量,改为
return order.orderid
后返回正常

下单精度问题

okex里最小购买量与交易数量精度是分开的,有
lotSz | String | 下单数量精度,如 BTC-USDT-SWAP:1
minSz | String | 最小下单数量
但是cta_engine.send_order里是使用minSz来修正精度的,会导致卖出失败。比如eth的最小下单数为0.01,但是交易精度有1e-6

连接错误

正常填写settins中的字段,会报错

公共频道触发异常,类型:<class 'aiohttp.client_exceptions.ClientConnectorError'>,信息:Cannot connect to host wspap.okex.com:8443 ssl:False [信号灯超时时间已到]

私有频道触发异常,类型:<class 'aiohttp.client_exceptions.ClientConnectorError'>,信息:Cannot connect to host wspap.okex.com:8443 ssl:False [信号灯超时时间已到]

Beginner's Handbook

Can you provide a manual for the use of the OKEX module, such as the configuration meaning and usage process?

okex 合约乘数取值有分歧

image

okex 合约中新增的一个参数。
ctVal 合约面值应该理解为原有的合约乘数吧? 拥有反向合约 计价单位为 张 时使用
ctMult 合约乘数。应该作为统一账户中按照 计价单位为 币 时使用

在差价计算中
image
买入 [email protected] crv 使用 64.98 usdt
对应应该卖出 6.4 张合约 而非 64 张.
币本位计算中 64张合约价值是640 u

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.