okcoin / rest Goto Github PK
View Code? Open in Web Editor NEWOKCoin Rest Api客户端示例 目前只提供C++、C# 、Java、PHP、Python
OKCoin Rest Api客户端示例 目前只提供C++、C# 、Java、PHP、Python
调用请求返回报错
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
On line 58 - rate should be price, otherwise you receive 10000 error:
Change:
$parameters=array("amount"=>$Amount, "partner"=>$this->partner, "rate"=>$Price, "symbol"=>'btc_usd',
To:
$parameters=array("amount"=>$Amount, "partner"=>$this->partner, "price"=>$Price, "symbol"=>'btc_usd',
In the OkcoinSpotAPI.py file, the trades function only takes the symbol param, but the url can also take the since param. e.g. https://www.okcoin.cn/api/trades.do?symbol=ltc_usd&since=5000
I've tried to add the since param, but cannot seem to get it to work. I'm not very experienced with python. Any help would be really appreciated.
def httpGet(url,resource,params=''):
conn = http.client.HTTPSConnection(url, timeout=10)
pydev debugger: starting
现货行情
Traceback (most recent call last):
File "/Applications/Aptana Studio 3/plugins/org.python.pydev_3.0.0.1388187472/pysrc/pydevd.py", line 1479, in <module>
debugger.run(setup['file'], None, None)
File "/Applications/Aptana Studio 3/plugins/org.python.pydev_3.0.0.1388187472/pysrc/pydevd.py", line 1125, in run
pydev_imports.execfile(file, globals, locals) #execute the script
File "/Applications/Aptana Studio 3/plugins/org.python.pydev_3.0.0.1388187472/pysrc/_pydev_execfile.py", line 38, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc) #execute the script
File "/Users/apple/node/undo4096/tool/videoPei/btc/Client.py", line 21, in <module>
print (okcoinSpot.ticker('btc_usd'))
File "/Users/apple/node/undo4096/tool/videoPei/btc/OkcoinSpotAPI.py", line 19, in ticker
return httpGet(self.__url,TICKER_RESOURCE,params)
File "/Users/apple/node/undo4096/tool/videoPei/btc/HttpMD5Util.py", line 19, in httpGet
conn = http.client.HTTPSConnection(url, timeout=10)
AttributeError: 'module' object has no attribute 'HTTPSConnection'
The java example does not work.
One of the problems is that the secret_key is not being added to the param map before the signature is created.
The apis for php are obsolete and don't include how to sign the request!
Hi All,
In OKCoin php API I'm getting 10007, Signature does not match error while trading. I passed the API key and Secret key to instance creation. Please help.
Thanks in advance,
Anish T
Hello there, thanks for the hardwork and for making some API client examples in Python.
I kindly wanted to ask if we could break this out into a package say OKCoin/okpy as a separate repository and make that installable via pip or easy_install. I would be happy to help out with this process if interesting.
Thank you!
什么时候支持V3接口
还有群不让加了??什么情况?
These two API has given every record a param 'type', it value 'buy' or 'sell'.
I think there exist some problem.One trade record means someone/somebodys buy and someone/somebodys sell. How to set the param 'type'?
通过api 是否可以查询 现在okcoin 所支持的交易货币
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.