用于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数组。按字符串排序   如何使用Netbeans设置Java打印的页面大小   java有没有一种方法可以获取sparkjava/嵌入式jetty服务器的主线程执行器?   正则表达式Java正则表达式:需要更简单的解决方案   无法使用java解析XML   MySQL Java JDBC:如何获取自动递增列的名称?   java错误:“限定符必须是表达式”Android Studio   Spring+java。lang.NoClassDefFoundError:weblogic/logging/LogEntryFormatter   java将JList插入GridLayout   listview中的java Get selected复选框   使用CriteriaBuilder的java JPA左外部联接会导致错误:不允许部分对象查询维护缓存或进行编辑   java循环双链接列表addToHead和print   java更好地检测三角形按钮(libgdx)   java ConcurrentHashMap迭代保证人   java如何获取控制台。通过webdriver记录信息?   java Javafx阶段为空   java如何使用apachetika从excel文件中访问空白单元格   java使用SQlite数据库列填充AutoCompleteTextView   java如何在不使用idea构建整个maven项目的情况下运行主方法?