用于vexbi.com的python api客户端库

vexbi的Python项目详细描述


Coverage StatusBuild StatusPyPI version

用于Vexbiapi的python库。请阅读 关于如何开始使用 应用程序编程接口。

要求

  • Python2.7.0+
  • 吉特1.7.0+

开始

安装依赖项:

pip install -r requirements.txt

用法

#创建订单

/v2/订单

^{str1}$*发布*

摘要:创建买卖订单。描述:创建卖出/买入 命令。

参数

NameLocated inDescriptionRequiredSchem a
marke tformDataUnique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.Yesstrin g
sideformDataEither ‘sell’ or ‘buy’.Yesstrin g
volum eformDataThe amount user want to sell/buy. An order could be partially executed, e.g. an order sell 5 btc can be matched with a buy 3 btc order, left 2 btc to be sold; in this case the order’s volume would be ‘5.0’, its remaining_v olume would be ‘2.0’, its executed volume is ‘3.0’.Yesstrin g
priceformDataPrice for each unit. e.g. If you want to sell/buy 1 btc at 3000 usd, the price is ‘3000.0’Nostrin g
ord_ typeformDataThe type of order, can be ^{tt1}$ or ^{tt2}$No (defaults to ^{tt2}$strin g

响应

CodeDescription
201Create a Sell/Buy order.

#删除订单

/v2/订购/删除

^{str1}$*发布*

摘要:取消订单。说明:取消订单。

参数

NameLocated inDescriptionRequiredSchema
idformDataUnique order id.Yesinteger

响应

CodeDescription
201Cancel an order.

#全部清除

/v2/命令/清除

^{str1}$*发布*

摘要:取消我的所有订单。说明:取消所有我的 命令。

参数

NameLocated inDescriptionRequiredSchem a
sideformDataIf present, only sell orders (asks) or buy orders (bids) will be canncelled.Nostrin g

响应

CodeDescription
201Cancel all my orders.

#获得订单

/v2/订单

^{str1}$*获取*

摘要:获取订单,结果将分页。描述:获取 你的命令,结果是分页。

参数

NameLocated inDescriptionRequiredSchem a
marke tqueryUnique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.Yesstrin g
statequeryFilter order by state, default to ‘wait’ (active orders).Nostrin g
limitqueryLimit the number of returned orders, default to 100.Nointeg er
pagequerySpecify the page of paginated results.Nointeg er
order _byqueryIf set, returned orders will be sorted in specific order, default to ‘asc’.Nostrin g

响应

CodeDescription
200Get your orders, results is paginated.

#获取订单

/v2/顺序

^{str1}$*获取*

摘要:获取指定顺序的信息。描述:获取 指定顺序的信息。

参数

NameLocated inDescriptionRequiredSchema
idqueryUnique order id.Yesinteger

#获取帐户信息

/v2/成员/me

^{str1}$*获取*

摘要:获取您的个人资料和帐户信息。描述:获取 你的个人资料和帐户信息。

响应

CodeDescription
200Get your profile and accounts info.

#获取可用市场

/v2/市场

^{str1}$*获取*

摘要:获取所有可用市场。

描述:获取所有可用市场。

响应

CodeDescription
200Get all available markets.

#票务

/v2/票务

^{str1}$*获取*

摘要:获取所有市场的股票代码。描述:获取 所有市场。

响应

CodeDescription
200Get ticker of all markets.

#交易

/v2/交易

^{str1}$*获取*

摘要:获取市场上最近的交易,每个交易仅包括在内 一次。交易按反向创建顺序排序。描述:获取 最近市场上的交易,每笔交易只包括一次。交易是 按相反的创建顺序排序。

参数

NameLocated inDescriptionRequiredSchem a
marke tqueryUnique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.Yesstrin g
limitqueryLimit the number of returned trades. Default to 50.Nointeg er
times tampqueryAn integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.Nointeg er
fromqueryTrade id. If set, only trades created after the trade will be returned.Nointeg er
toqueryTrade id. If set, only trades created before the trade will be returned.Nointeg er
order _byqueryIf set, returned trades will be sorted in specific order, default to ‘desc’.Nostrin g

响应

CodeDescription
200Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.

#我的交易

/v2/交易/我的

^{str1}$*获取*

摘要:获取已执行的交易。交易按相反顺序排序 创建顺序。说明:获取已执行的交易。交易是 按相反的创建顺序排序。

参数

NameLocated inDescriptionRequiredSchem a
marke tqueryUnique market id. It’s always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. ‘btcusd’. All available markets can be found at /api/v2/mark ets.Yesstrin g
limitqueryLimit the number of returned trades. Default to 50.Nointeg er
times tampqueryAn integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.Nointeg er
fromqueryTrade id. If set, only trades created after the trade will be returned.Nointeg er
toqueryTrade id. If set, only trades created before the trade will be returned.Nointeg er
order _byqueryIf set, returned trades will be sorted in specific order, default to ‘desc’.Nostrin g

响应

CodeDescription
200Get your executed trades. Trades are sorted in reverse creation order.

测试

只需克隆repo,像在开发中一样安装依赖项 然后运行nose2python setup.py test

贡献

  1. 分叉(https://github.com/vexbiexchange/python-api-client/fork
  2. 创建功能分支(git checkout -bmy-new-feature
  3. 提交更改(git commit -am 'Add some feature'
  4. 推到分支(git push origin my-new-feature
  5. 创建新的拉取请求

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java消除多个构造函数中的冗余   java如何准备和提供测试数据   java如何处理Selenium Chromedriver选择证书弹出确认?   java服务器在命名时中断。重新绑定   java如何从包含许多元素的对象中提取对象的单个元素   主方法上的java执行   用于输出棋盘的按钮的java GridLayout   java如何结合Web/移动用户身份验证   要打开以运行(windows+R)和执行命令的Java代码   java我在忘记密码的电子邮件发送过程中遇到以下错误err=javax。邮政AuthenticationFailedException这是我的代码   列出在使用泛型集合的用户定义类中实现的JAVA 8。排序()不起作用   java Apache POI写入时间大于24小时   java Hibernate通过另一个实体映射   使用Java在现有json文件中追加json对象   Spring批处理上的java停止处理   java为特定的mybatisspring映射器设置不同的执行器类型   java我想阅读html的内容,我需要用所需的文本对其进行更改