Skip to content

API Reference ​


1. Info ​

  • Title: gRPC API
  • Version: 1.0.0
  • Description: This documentation is generated from protobuf files using protoc-gen-doc.

2. Paths ​

Market ​

Time ​

  • Summary: Time
  • Method: Time
  • Endpoint: market.Market/Time
  • Request:
    • Content-Type: application/grpc
    • Schema: Empty
  • Response:

Depth ​

  • Summary: 深度信息
  • Method: Depth
  • Endpoint: market.Market/Depth
  • Request:
  • Response:

Trades ​

  • Summary: 近期成交
  • Method: Trades
  • Endpoint: market.Market/Trades
  • Request:
  • Response:

Klines ​

  • Summary: K线数据
  • Method: Klines
  • Endpoint: market.Market/Klines
  • Request:
  • Response:

MiniTicker ​

  • Summary: 24hr价格变动情况
  • Method: MiniTicker
  • Endpoint: market.Market/MiniTicker
  • Request:
  • Response:

GetSymbolMiniTicker ​


3. Components ​

3.1 Schemas ​

DepthRequest ​

FieldTypeDescription
symbolstring交易对(btc_usdt_perp|eth_usdt_perp)
limitint32页数:默认 100; 最大 5000. 可选值:[5, 10, 20, 50, 100, 500, 1000, 5000] 如果 limit > 5000, 最多返回5000条数据.

DepthResponse ​

FieldTypeDescription
symbolstring交易对
bidsbytes买单:{价格,数量}
asksbytes卖单:{价格,数量}
lastUpdateIdint64none

GetSymbolMiniTickerRequest ​

FieldTypeDescription
symbolstring交易对(btc_usdt_perp|eth_usdt_perp)

GetSymbolMiniTickerResponse ​

FieldTypeDescription
symbolstring交易对
openPricestring开盘价:24小时前开始第一笔成交价格
highPricestring最高价
lowPricestring最低价
closePricestring收盘价:最新成交价格
volumestring成交量
quoteVolumestring成交额
timeint64none

KlinesRequest ​

FieldTypeDescription
symbolstring交易对(btc_usdt_perp|eth_usdt_perp)
intervalstring详见枚举定义:K线间隔(1m|3m|5m|15m|30m|1h|2h|4h|6h|8h|12h|1d|3d|1w|1M)
startTimeint64从该时刻之后的成交记录开始返回结果
endTimeint64返回该时刻为止的成交记录
limitint32Default 500; max 1500.

KlinesResponse ​

FieldTypeDescription
listKlinesResponse.Klinenone

Kline ​

FieldTypeDescription
openTimeint64开盘时间
closeTimeint64收盘时间
symbolstring交易对
intervalstring时间间隔
openstring开盘价
closestring收盘价
highstring最高价
lowstring最低价
volumestring交易量
quoteVolumestring交易额
numint64交易次数
timeint64时间

MiniTickerRequest ​

FieldTypeDescription
symbolsstringnone

MiniTickerResponse ​

FieldTypeDescription
listGetSymbolMiniTickerResponsenone

TimeResponse ​

FieldTypeDescription
serverTimeint64当前服务器时间

TradesRequest ​

FieldTypeDescription
symbolstring交易对(btc_usdt_perp|eth_usdt_perp)
limitint32Default 500; max 1000.

TradesResponse ​

FieldTypeDescription
listTradesResponse.Tradenone

Trade ​

FieldTypeDescription
pricestring价格
qtystring成交量
quoteQtystring成交额
timeint64成交时间
isBuyerMakerbool买方是否为挂单方:true-是,false-否
symbolstring交易对

3.2 Enums ​


4. Scalar Value Types ​

Proto TypeGo TypeC++ TypeJava TypePython TypeNotes
doublefloat64doubledoublefloat
floatfloat32floatfloatfloat
int32int32int32intintUses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.
int64int64int64longint/longUses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.
uint32uint32uint32intint/longUses variable-length encoding.
uint64uint64uint64longint/longUses variable-length encoding.
sint32int32int32intintUses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
sint64int64int64longint/longUses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.
fixed32uint32uint32intintAlways four bytes. More efficient than uint32 if values are often greater than 2^28.
fixed64uint64uint64longint/longAlways eight bytes. More efficient than uint64 if values are often greater than 2^56.
sfixed32int32int32intintAlways four bytes.
sfixed64int64int64longint/longAlways eight bytes.
boolboolboolbooleanboolean
stringstringstringStringstr/unicodeA string must always contain UTF-8 encoded or 7-bit ASCII text.
bytes[]bytestringByteStringstrMay contain any arbitrary sequence of bytes.

🚀 构建现代化数字资产交易平台