Skip to content

darkice1/easy-biance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

币安JAVASDK

快速接入币安的开源sdk。目前实现了最实用的部分接口。

升级信息

  1. 1.0.5支持多实例可以传入参数进行实例化
  2. 1.0.4增加部分币安接口

初始化

建立放config.txt中的url与api信息。config.txt示例

BIANCE_URL=https://api.binance.com
BIANCE_KEY=my key
BIANCE_SECRET=my secret

maven

<!-- https://mvnrepository.com/artifact/com.github.darkice1/easy-biance -->
<dependency>
    <groupId>com.github.darkice1</groupId>
    <artifactId>easy-biance</artifactId>
    <version>1.0.5</version>
</dependency>

币安API文档

  1. 英文 https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md
  2. 中文比较老需要以英文为准 https://github.com/binance/binance-spot-api-docs/blob/master/rest-api_CN.md

服务器时间

BianceClient.time()

交易规范信息

BianceClient.exchangeInfo()

深度信息

BianceClient.depth()

近期成交

BianceClient.trades()

查询历史成交

BianceClient.historicalTrades()

近期成交(归集)

BianceClient.aggTrades()

K线数据

BianceClient.klines()

24hr价格变动情况

BianceClient.hr24()

查询订单

BianceClient.findorder()

最优挂单接口

BianceClient.bookTicker()

当前平均价格

BianceClient.avgPrice()

最新价格接口

BianceClient.tickerPrice()

最优挂单接口

BianceClient.bookPrice()

下单 (TRADE)

https://binance-docs.github.io/apidocs/spot/cn/#trade-3 BianceClient.order()

测试下单 (TRADE)

https://binance-docs.github.io/apidocs/spot/cn/#trade-2 BianceClient.orderTest()

当前挂单 (USER_DATA)

https://binance-docs.github.io/apidocs/spot/cn/#user_data-35 BianceClient.openOrders()

查询所有订单 (USER_DATA)

https://binance-docs.github.io/apidocs/spot/cn/#user_data-36 BianceClient.allOrders()

获取账户信息

BianceClient.account()

账户成交历史

BianceClient.myTrades()

获取子账号列表

BianceClient.subAccountList()

币安宝获取活期产品列表

BianceClient.dailyProductList()

币安宝获取用户当日剩余活期可申购余额

BianceClient.dailyUserLeftQuota()

币安宝获取用户活期产品持仓

BianceClient.dailyPosition()

币安宝获取用户当日活期可赎回余额

BianceClient.dailyUserRedemptionQuota()

查询赚币活期产品列表

https://binance-docs.github.io/apidocs/spot/cn/#user_data-65 BianceClient.simpleEarnFlexibleList()

获取活期产品持仓(USER_DATA)

https://binance-docs.github.io/apidocs/spot/cn/#user_data-67 BianceClient.simpleEarnFlexiblePosition()

赚币账户(USER_DATA)

https://binance-docs.github.io/apidocs/spot/cn/#user_data-69 BianceClient.simpleEarnAccount()

申购定期产品(TRADE)

https://binance-docs.github.io/apidocs/spot/cn/#trade-15 BianceClient.simpleEarnFlexibleSubscribe()

赎回活期产品 (TRADE)

https://binance-docs.github.io/apidocs/spot/cn/#trade-16 BianceClient.simpleEarnFlexibleRedeem()

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages