1 Star 1 Fork 0

阿希 / zb-restful-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

zb-restful-api

介绍

封装zb常用的行情接口,交易接口

软件架构

springboot2.x + okhttp3 + Retrofit2 + hutool工具类,提供springboot-starter引入方式 难点: zb交易所返回json格式不一致无法统一对象化处理,只能统一容错处理,将交易环节集中在过滤器统一排序,加密,验签

安装教程

  1. 引入依赖
<dependency>
	<groupId>cc.chenwenxi</groupId>
	<artifactId>zb-restful-api</artifactId>
	<version>0.0.1-SNAPSHOT</version>
</dependency>
  1. application.yml 加入配置
npc:
  exchange:
    zb:
      market-url: http://api.zb.live/data/v1/
      trade-url: https://trade.zb.live/api/
      access-key: 
      secret-key: 

使用说明

  1. 在代码中测试
private @Autowired MarketApiRestService marketApi;
private @Autowired TradeApiRestService tradeApi;

private Symbol symbol = new Symbol("ltc", Quote.qc);

@Test
public void account() {
	AccountBody account = tradeApi.getAccount();
	System.out.println(account);
}

@Test
public void getDepth() {
	DeptResult depth = marketApi.getDepth(symbol, 5);
	System.out.println(depth);
}

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

空文件

简介

封装zbapi 展开 收起
Java
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/lianlianyi/zb-restful-api.git
git@gitee.com:lianlianyi/zb-restful-api.git
lianlianyi
zb-restful-api
zb-restful-api
master

搜索帮助