open-api-sdk-v5's Introduction
open-api-sdk-v5's People
Forkers
osctrade chencang chengpeng2015 juvu feekia zrduanyi panxianhai sparm26 kevin0307 qkqkqqk38 benbenfun chengsanc kringpin323 yurichange liangxuegui kukupigs jeffluoo richardodliu linbobwz jinyan0531 pengbaba sleepcodebed fiarsalsheikh ares-star handayu hao507 huangzhangfeng yanjing2407 magicianxu1984 18734883702 yanqinghou vitoyane youngsion zhoudahu azimanuar5874 lanzhizhuxia 979070830 lozn00 kcin135 kylingood varfigstar wangst-alan liumingyu0729 shiyuetanhua vincentyjk maxond wizhiai pythonok human2312 hl0422 zhouhang0716 xiongbenwu ppt331 keshunchen getandpost godolike fanlifei2020 josephwn tony470s crazybanboo limingjin10 shulinhu ayxemma songshuailin mainbloq somethinghero liuxinrui1 ymoffice digyang awsay hhhhelix bailzx5522 nhchmg ahmed-alshmre kiefer- s414250301 cblk xifes8291 llgyf q71378609 rafaelfliu faceny jacktbak yuying990718 yfge gavin-tang drdarbin nathonnot sydowma jekweb charlessong scottzhangzc cohenstar igsgd 709211857 jkok005 ysh000 acuilab wetangel wyd199open-api-sdk-v5's Issues
存在多线程导致程序执行完毕后无法正常退出
Python版本API名称错误
# Get Account Configuration
def get_position_mode(self, posMode):
params = {'posMode': posMode}
return self._request_with_params(POST, POSITION_MODE, params)
经测试,这里是Set,并不是Get
Not acctual issue but need help!
Hi, How do i grab a single value from a function that returns multiple? Like if im using the get_ticker function for example and i only want to grab the 24H price and store it as an variable to do something with how do i do that without getting all of this returned?
{'code': '0', 'msg': '', 'data': [{'instType': 'SPOT', 'instId': 'ETH-BTC', 'last': '0.075', 'lastSz': '0.086', 'askPx': '0.075', 'askSz': '132971196.739574', 'bidPx': '0.0721', 'bidSz': '23.652', 'open24h': '0.062', 'high24h': '0.07615', 'low24h': '0.0609', 'volCcy24h': '524334416.762623', 'vol24h': '8436393910.5933', 'ts': '1630925573714', 'sodUtc0': '0.062', 'sodUtc8': '0.06199'}]}
文档注释
okex和okex_http2不能整合吗?init.py文件直接复制的v3版本的还没改过来。
api在国内访问受限
你好,请问下,okex的api好像在**大陆访问受限。请问您是用什么方式,才能够访问到api,得到api的返回结果呢?
python 把延迟 ws.send('ping') 45 秒后 发 这个怎么搞?
EOF occurred in violation of protocol (_ssl.c:2423)
JAVA的sdk怎么处理消息呢?
比如我使用ws获取到了 我当前的订单被平仓了 我想反向开仓,但是 我尝试修改onMessage方法,执行的时候 客户端会断开连接,请问有提供处理消息的接口或者方法吗?
网格委托下单参数没有
帮我看下50101是什么问题?开始以为www.okex.win不行,换成www.okex.com也还是一样。
KEY,PASSPHRASE,SIGN做了脱敏处理,都是自家账号申请的数据。
Request(2021-04-19 21:49:10:346):
Url: https://www.okex.com/api/v5/asset/deposit-history?ccy=USDT&state=&after=&before=&limit=
Method: GET
Headers:
Accept: application/json
Content-Type: application/json; charset=UTF-8
Cookie: locale=en_US
OK-ACCESS-KEY: 641e5ce6---****-23cb7740ffe8
OK-ACCESS-PASSPHRASE: *****
OK-ACCESS-SIGN: **************************
OK-ACCESS-TIMESTAMP: 2021-04-19T13:49:10.342Z
x-simulated-trading: 1
request body:
preHash: 2021-04-19T13:49:10.342ZGET/api/v5/asset/deposit-history?ccy=USDT&state=&after=&before=&limit=
2021-04-19 21:49:11.158 [MyScheduler_Worker-1] INFO com.okex.open.api.client.APIClient:157 -
Response(2021-04-19 21:49:11:158):
Status: 401
Message:
2021-04-19 21:49:11.188 [MyScheduler_Worker-1] ERROR org.quartz.core.JobRunShell:211 - Job DEFAULT.org.jeecg.modules.quartz.job.PushQueryJob threw an unhandled Exception:
com.okex.open.api.exception.APIException: 50101 : Broker id of APIKey does not match current environment.
Latencyt problem
I get latency problem with below code. Do you have any idea how to fix that?
error_o = 1
while error_o <= 1:
try:
wso = create_connection("wss://wsaws.okex.com:8443/ws/v5/public")
error_o = 2
continue
except:
print('connect ws error,retry...')
error_o = 0
time.sleep(5)
trade_okex ="""
{
"op": "subscribe",
"args": [
{
"channel": "trades",
"instId": "BTC-USDT"
}
]
}
"""
wso.send(trade_okex)
db_one_o = []
db2_o =[]
dif = dt.datetime.now()
while True :
try:
db_one_o.append(json.loads(wso.recv()))
for i in range(1,len(db_one_o)):
if db_one_o[i]['data'][0]['side'] == 'buy':
drct = 1
else:
drct = -1
db2_o.append({'datetime' : datetime.fromtimestamp(float(db_one_o[i]['data'][0]['ts'])/1000),
'date_time' : datetime.fromtimestamp(float(db_one_o[i]['data'][0]['ts'])/1000).strftime('%Y-%m-%d %H:%M'),
'price': float(db_one_o[i]['data'][0]['px']),
'qty': float(db_one_o[i]['data'][0]['sz'])*drct,
'Volume' : float(db_one_o[i]['data'][0]['px'])*float(db_one_o[i]['data'][0]['sz'])*drct})
except:
continue
def send(msg, chat_id, token=token):
bot = telegram.Bot(token=token)
bot.sendMessage(chat_id=chat_id, text= str(msg))
try:
db3_o = pd.DataFrame(db2_o)
db3_o.drop_duplicates(keep='first',inplace=True)
db3_o.reset_index(drop=True)
db4_o = db3_o.groupby('date_time').agg({'qty':['sum'],'price':['mean'],'Volume':['sum']}).reset_index()
db5_o = pd.DataFrame({'Time':db4_o['date_time'], 'qty':db4_o['qty']['sum'], 'price':db4_o['price']['mean'], 'Volume':db4_o['Volume']['sum']})
except:
continue`
x-simulated-trading异常
APIHttpClient里面写死了x-simulated-trading header,这是个bug吧!
请问打算出golang版本的v5吗
用java版本请求交易类数据报 50102错误
报错如下:
20:04:49.639 [main] INFO com.okex.open.api.client.APIHttpClient -
Request(2023-07-04 20:04:49:637):
Url: https://aws.okx.com/api/v5/account/balance?ccy=USDT
Method: GET
Headers:
Accept: application/json
Content-Type: application/json; charset=UTF-8
Cookie: locale=en_US
OK-ACCESS-KEY: e6de4122-97cd-484a-91c0-1fda26b6ca01
OK-ACCESS-PASSPHRASE: Songbo@123
OK-ACCESS-SIGN: MuKYoZHZvQKbzTU5/4ktT7zow2p4XHiT5zSjg+/SZZ4=
OK-ACCESS-TIMESTAMP: 2023-07-04T12:04:49.584Z
x-simulated-trading: 1
request body:
preHash: 2023-07-04T12:04:49.584ZGET/api/v5/account/balance?ccy=USDT
20:04:50.280 [main] INFO com.okex.open.api.client.APIClient -
Response(2023-07-04 20:04:50:280):
Status: 401
Message:
Response Body:{"code":"50102","data":[],"msg":"Timestamp request expired"}
com.okex.open.api.exception.APIException: 50102 : Timestamp request expired
这个时间戳应该怎么设置啊?大侠教我
okex 下单成交后并设置 止盈止损功能api似乎没有呀 单纯的止盈止损下拉列表和我说的不一样。
app或者网页端第一个选项卡开仓后会弹出对话框输入止盈止损,但是api没看到下单选项有这个,单纯的止盈止损下拉列表和我说的不一样。
springboot调用v5API可以更新一下如何使用吗?
获取法币汇率的方法参数写错了
获取法币汇率的方法参数写错了,应该是EXCHANGE_RATE
怎么在UbuntuKylin 22.04上运行python-API-SDK-V5?
我想在ubuntuKylin 22.04运行python-API-SDK-V5, ubuntuKylin里自带的python版本是3.10.4。运行该代码时,提示"the loop parameter was removed from Lock() since it is no longer necessary。可以让它支持3.10吗?应该怎么修改代码?
接口错误
这个接口调用错了, 应该是set position mode, 然后在account文件里也还没封装好set position mode这个接口
计划委托接口下单的参数缺失
post请求一直签名失败,能帮忙看看是什么问题么?
body: {"instId": "BTC-USD-SWAP", "tdMode": "cross", "side": "buy", "ordType": "market", "sz": "0.01", "ccy": "", "clOrdId": "", "tag": "", "posSide": "long", "px": "None", "reduceOnly": ""}
{"msg":"Invalid Sign","code":50113}, 401
用的是python的api
国内可用的URL
python的consts.py文件中的 www.okex.com 在国内无法访问。请问有能在国内访问的URL吗?我每次应该如何获到最新的可用的URL ?
Authentication example for bash
Hello,
Can you please put an example for the authentication part for bash/shell script ?
I wrote my tools in bash while I was on another exchange and now I intend to move to OKX
So any help please ? thank you .
Bug with parsing timestamp from OKEx server
I'd create a pull request with fix of this bug, but it wasn't accepted for 2 weeks..
OKEx return array in response, but now it's parsing like an dict.
java sdk Timestamp request expired
com.okex.open.api.exception.APIException: 50102 : Timestamp request expired
V5 有NODE.JS版本的SDK?
V5 有NODE.JS版本的SDK?
{"code":"51000","data":[],"msg":"Parameter tpTriggerPx error"}
Dear friends i using the okx-python-sdk-api-v5 to place an positions and using algo order for set sl and tp . in some situations i just need stop lost and no needs for take profit so i just fill the slTriggerPx and slOrdPx parameter for place algo order and i get this error {"code":"51000","data":[],"msg":"Parameter tpTriggerPx error"}
can you tell me why the both of sl and tp parametes are required ? and how can i just set sl parameter?
行情接口报NULL空指针异常
cs版本的SDK 一年多没更新了 是不打算支持还是什么
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.