ethfinex交换的非官方python包装器
ethfinex-python的Python项目详细描述
ethfinex python
Ethfinex和Ethfinex Trustlessapi的非正式python客户端。
由Shane Fontaine根据麻省理工学院许可证提供。
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
i决不隶属于或由ethfinex、ethfinex trustless、ethfinex inc、bitfinex、ifinex inc、tether、tether有限公司或任何上述实体的子公司或附属公司资助。
功能性
- 一个简单易用的python包装器,用于公共端点和经过身份验证的端点。
- Easy trading directly against Ethfinex Trustless, Bitfinex and Ethfinex orderbooks
- 简单解析从ethfinex api返回的数据
开发中
- 更好的错误处理
- 测试
开始
本自述文件是关于此存储库中显示的python客户机语法的文档。有关完整语法详细信息,请参见函数docstrings。 这个api试图向ethfinex提供一个干净的接口,但是为了充分利用它,您必须熟悉官方的ethfinex文档。
您可以手动安装项目或使用pip:
pipinstallethfinex-python# orpipinstallgit+git://github.com/shanefontaine/ethfinex-python.git
公共客户
api中只有一些端点对每个人都可用。可以使用publicclient访问公共端点
importethfinexpublic_client=ethfinex.PublicClient()
publicclient方法
public_client.get_platform_status()
# Get the ticker for a specific pair.public_client.get_ticker('tBTCUSD')
# Get the trades for a specific pairpublic_client.get_trades('tBTCUSD')# To include a start and end timepublic_client.get_trades('tBTCUSD',start=1514764800000,end=1514765700000)# To reverse the order that data is delivered (old to new)public_client.get_trades('tBTCUSD',start=1514764800000,end=1514765700000,sort=1)
# Get the books for a specific pairpublic_client.get_books('tBTCUSD')# To get more or less granular precisionpublic_client.get_books('tBTCUSD',precision='P1')
# Get the stats for a specific pairpublic_client.get_stats('tBTCUSD','funding.size','long','hist')# To reverse the order that data is delivered (old to new)public_client.get_stats('tBTCUSD','funding.size','long','hist',sort=1)
# Get the candles for a specific pairpublic_client.get_candles('tBTCUSD','1m','hist')# To include a start and end timepublic_client.get_candles('tBTCUSD','1m','hist',start=1514764800000,end=1514765700000)
测试
使用pytest框架正在开发单元测试。欢迎投稿!
要运行完整的测试套件,请在项目目录中运行:
python -m pytest
更改日志
0.1.2
- 主要自述文件更新
0.1.1
- 添加ci
- 添加
public_client
测试
0.1.0
- 全功能公共客户端。
0.0.1
- 最初的pypi版本。