用于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 Google Guice非目标绑定   java Gradle war插件创建目录结构   排序2D int数组JAVA   java如何使用mongostat获取一整天Mongo数据库上创建/插入/删除/更新的总次数?   java是否使用静态方法?   Java验证后设置密码   java使用BlockingQueue的   java Richfaces 3正在尝试获取类型上的动态列工作属性“0”   oop缩写长对象链(java)   java Dekker算法在三个进程中运行不正常   为什么在Eclipse中编写java时需要在类文件中使用包行?   在ANTLR中解析错误输入时发生java OutOfMemoryError