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 ​

Currency ​

AddSymbolType ​

  • Summary: 增加交易对类型
  • Method: AddSymbolType
  • Endpoint: currency.Currency/AddSymbolType
  • Request:
  • Response:

UpdateSymbolType ​

  • Summary: 更新交易对类型
  • Method: UpdateSymbolType
  • Endpoint: currency.Currency/UpdateSymbolType
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

DeleteSymbolType ​

  • Summary: 删除交易对类型
  • Method: DeleteSymbolType
  • Endpoint: currency.Currency/DeleteSymbolType
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

GetSymbolTypeInfo ​

  • Summary: 获取交易对类型的详细信息
  • Method: GetSymbolTypeInfo
  • Endpoint: currency.Currency/GetSymbolTypeInfo
  • Request:
  • Response:

GetSymbolTypeList ​

  • Summary: 获取交易对类型列表
  • Method: GetSymbolTypeList
  • Endpoint: currency.Currency/GetSymbolTypeList
  • Request:
    • Content-Type: application/grpc
    • Schema: Empty
  • Response:

AddSymbolInfo ​

  • Summary: 新增交易对
  • Method: AddSymbolInfo
  • Endpoint: currency.Currency/AddSymbolInfo
  • Request:
  • Response:

UpdateSymbolInfo ​

  • Summary: 更新交易对信息
  • Method: UpdateSymbolInfo
  • Endpoint: currency.Currency/UpdateSymbolInfo
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

DeleteSymbolInfo ​

  • Summary: 删除交易对
  • Method: DeleteSymbolInfo
  • Endpoint: currency.Currency/DeleteSymbolInfo
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

GetSymbolInfo ​

  • Summary: 通过id获取交易对信息
  • Method: GetSymbolInfo
  • Endpoint: currency.Currency/GetSymbolInfo
  • Request:
  • Response:

GetSymbolInfoList ​

  • Summary: 通过名称获取交易对信息
  • Method: GetSymbolInfoList
  • Endpoint: currency.Currency/GetSymbolInfoList
  • Request:
  • Response:

GetAllSymbolInfo ​

  • Summary: 获取所有交易对信息
  • Method: GetAllSymbolInfo
  • Endpoint: currency.Currency/GetAllSymbolInfo
  • Request:
  • Response:

BatchGetSymbolInfo ​

AddSymbolSettings ​

  • Summary: 新增交易对配置参数
  • Method: AddSymbolSettings
  • Endpoint: currency.Currency/AddSymbolSettings
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

UpdateSymbolSettings ​

  • Summary: 更新交易对配置参数
  • Method: UpdateSymbolSettings
  • Endpoint: currency.Currency/UpdateSymbolSettings
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

DeleteSymbolSettings ​

  • Summary: 删除交易对配置参数
  • Method: DeleteSymbolSettings
  • Endpoint: currency.Currency/DeleteSymbolSettings
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

GetSymbolSettings ​

  • Summary: 查询交易对配置参数
  • Method: GetSymbolSettings
  • Endpoint: currency.Currency/GetSymbolSettings
  • Request:
  • Response:

GetSymbolSettingsList ​

BatchGetSymbolSettings ​

UpdateSymbolSettingsWithSymbolId ​

  • Summary: 更新交易对配置参数
  • Method: UpdateSymbolSettingsWithSymbolId
  • Endpoint: currency.Currency/UpdateSymbolSettingsWithSymbolId
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

DeleteSymbolSettingsWithSymbolId ​

  • Summary: 删除交易对配置参数
  • Method: DeleteSymbolSettingsWithSymbolId
  • Endpoint: currency.Currency/DeleteSymbolSettingsWithSymbolId
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

GetSymbolSettingsWithSymbolId ​

AddSymbolFilter ​

  • Summary: 新增交易对过滤参数
  • Method: AddSymbolFilter
  • Endpoint: currency.Currency/AddSymbolFilter
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

UpdateSymbolFilter ​

  • Summary: 更新交易对过滤参数
  • Method: UpdateSymbolFilter
  • Endpoint: currency.Currency/UpdateSymbolFilter
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

DeleteSymbolFilter ​

  • Summary: 删除交易对过滤参数
  • Method: DeleteSymbolFilter
  • Endpoint: currency.Currency/DeleteSymbolFilter
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

GetSymbolFilter ​

  • Summary: 查询交易对过滤参数
  • Method: GetSymbolFilter
  • Endpoint: currency.Currency/GetSymbolFilter
  • Request:
  • Response:

GetSymbolFilterList ​

BatchGetSymbolInfoList ​

GetSymbolGlobalSettings ​

GetSymbolRules ​

  • Summary: 查询交易手续费
  • Method: GetSymbolRules
  • Endpoint: currency.Currency/GetSymbolRules
  • Request:
  • Response:

SetSymbolRules ​

  • Summary: 设置交易手续费
  • Method: SetSymbolRules
  • Endpoint: currency.Currency/SetSymbolRules
  • Request:
  • Response:
    • Content-Type: application/grpc
    • Schema: Empty

GetSymbolTradeFee ​

  • Summary: 获取交易对手续费
  • Method: GetSymbolTradeFee
  • Endpoint: currency.Currency/GetSymbolTradeFee
  • Request:
  • Response:

ListAsset ​

  • Summary: ListAsset
  • Method: ListAsset
  • Endpoint: currency.Currency/ListAsset
  • Request:
  • Response:

3. Components ​

3.1 Schemas ​

AddSymbolFilterRequest ​

FieldTypeDescription
symbolIdint64交易对id
filtersAddSymbolFilterRequest.Filter交易对过滤参数

Filter ​

FieldTypeDescription
maxNotionalValuestring最大名义价值
maxLeveragestring最大杠杆
maintMarginRatiostring维持保证金率

AddSymbolInfoRequest ​

FieldTypeDescription
symbolNamestring交易对名称
pairstring标的交易对
contractTypestring合约类型
deliveryDateint64交割日期
onboardDateint64上线日期
baseAssetstring标的资产
quoteAssetstring计价资产
typeIdint64交易对类型
descriptionstring交易对描述
symbolstring交易对
symbolIconstring图标
symbolFlagstringSHOW/HIDDEN
isStablecoinstringnone

AddSymbolInfoResponse ​

FieldTypeDescription
symbolIdint64交易对ID

AddSymbolSettingsRequest ​

FieldTypeDescription
symbolIdint64none
settingsAddSymbolSettingsRequest.Settingsnone

Settings ​

FieldTypeDescription
settingsKeystring交易对配置参数
settingsValuestring交易对配置参数

AddSymbolTypeRequest ​

FieldTypeDescription
typeNamestring交易对类型名称
typeDescstring交易对类型描述

AddSymbolTypeResponse ​

FieldTypeDescription
typeIdint64交易对类型ID

BatchGetSymbolInfoListRequest ​

FieldTypeDescription
symbolsstringnone
typeIdint64none

BatchGetSymbolInfoListResponse ​

FieldTypeDescription
listGetAllSymbolInfoResponsenone

BatchGetSymbolInfoRequest ​

FieldTypeDescription
symbolstringnone

BatchGetSymbolInfoResponse ​

FieldTypeDescription
infoGetSymbolInfoResponse.SymbolInfonone

BatchGetSymbolSettingsRequest ​

FieldTypeDescription
symbolsBatchGetSymbolSettingsRequest.Symbolsnone
typeIdint64none
symbolFlagstringnone

Symbols ​

FieldTypeDescription
settingsKeystringnone
symbolstringnone

BatchGetSymbolSettingsResponse ​

FieldTypeDescription
listBatchGetSymbolSettingsResponse.ListEntrynone
updateTimeint64none

ListEntry ​

FieldTypeDescription
keystringnone
valueBatchGetSymbolSettingsResponse.SymbolSettingsnone

SymbolSettings ​

FieldTypeDescription
settingsBatchGetSymbolSettingsResponse.SymbolSettings.SettingsEntrynone

SettingsEntry ​

FieldTypeDescription
keystringnone
valuestringnone

DeleteSymbolFilterRequest ​

FieldTypeDescription
filterIdsint64交易对id

DeleteSymbolInfoRequest ​

FieldTypeDescription
symbolIdint64交易对id

DeleteSymbolSettingsRequest ​

FieldTypeDescription
settingIdsint64交易对id

DeleteSymbolSettingsWithSymbolIdRequest ​

FieldTypeDescription
symbolIdint64交易对id
settingsKeystringnone

DeleteSymbolTypeRequest ​

FieldTypeDescription
typeIdint64交易对类型ID

GetAllSymbolInfoRequest ​

FieldTypeDescription
symbolIdint64交易对id
symbolstring交易对名称

GetAllSymbolInfoResponse ​

FieldTypeDescription
infoGetSymbolInfoResponse.SymbolInfonone
typeGetSymbolTypeInfoResponse.SymbolTypenone
settingsGetSymbolSettingsResponse.Settingsnone
filtersGetSymbolFilterResponse.Filternone

GetSymbolFilterListRequest ​

FieldTypeDescription
symbolIdint64交易对id
symbolstring交易对

GetSymbolFilterListResponse ​

FieldTypeDescription
filtersGetSymbolFilterResponse.Filternone

GetSymbolFilterRequest ​

FieldTypeDescription
filterIdsint64交易对id

GetSymbolFilterResponse ​

FieldTypeDescription
filtersGetSymbolFilterResponse.Filter交易对过滤参数

Filter ​

FieldTypeDescription
filterIdint64过滤参数id
symbolIdint64交易对id
maxNotionalValuestring最大名义价值
maxLeveragestring最大杠杆
maintMarginRatiostring维持保证金率

GetSymbolGlobalSettingsRequest ​

FieldTypeDescription
typeIdint64交易对类型ID:defaule:spot

GetSymbolGlobalSettingsResponse ​

FieldTypeDescription
listGetSymbolGlobalSettingsResponse.ListEntrynone

ListEntry ​

FieldTypeDescription
keystringnone
valuestringnone

GetSymbolInfoListRequest ​

FieldTypeDescription
typeIdint64交易对类型
keywordstring搜索关键字
flagstringflag:TRADING,DISABLE 默认all
levelIdint64levelID
statusstringTRADING/DISABLE

GetSymbolInfoListResponse ​

FieldTypeDescription
listGetSymbolInfoResponse.SymbolInfo货币信息列表

GetSymbolInfoRequest ​

FieldTypeDescription
symbolIdint64交易对id

GetSymbolInfoResponse ​

FieldTypeDescription
infoGetSymbolInfoResponse.SymbolInfo交易对信息

SymbolInfo ​

FieldTypeDescription
symbolIdint64symbol ID
symbolNamestring交易对名称
pairstring标的交易对
contractTypestring合约类型
deliveryDateint64交割日期
onboardDateint64上线日期
baseAssetstring标的资产
quoteAssetstring计价资产
typeIdint64交易对类型
descriptionstring交易对描述
statusstring交易对状态:"DISABLE" "TRADING"
createTimeint64交易对创建时间
updateTimeint64交易对更新时间
symbolstring交易对
symbolIconstring图标
symbolFlagstringSHOW/HIDDEN
rulesGetSymbolRulesResponse.SymbolRulesnone
isStablecoinstring是否是稳定币:TRUE/FALSE

GetSymbolRulesRequest ​

FieldTypeDescription
typeIdint64交易对类型:3-SPOT,5-OTC
levelIdsint64none
symbolIdint64交易对Id:非必填,当设置全局则可为空

GetSymbolRulesResponse ​

FieldTypeDescription
rulesGetSymbolRulesResponse.SymbolRules交易手续费
statusstring交易对状态:当为默认时忽略该字段
isDefaultstring是否启用默认费率ENABLE/DISABLE

SymbolRules ​

FieldTypeDescription
makerFeeRatestring名称
takerFeeRatestringnone
levelIdint64none
symbolIdint64none
symbolTypeIdint64none
remarkstringnone
updateTimeint64none

GetSymbolSettingsListRequest ​

FieldTypeDescription
symbolIdint64交易对id

GetSymbolSettingsListResponse ​

FieldTypeDescription
settingsGetSymbolSettingsResponse.Settingsnone

GetSymbolSettingsRequest ​

FieldTypeDescription
settingIdsint64交易对id

GetSymbolSettingsResponse ​

FieldTypeDescription
settingsGetSymbolSettingsResponse.Settings交易对配置参数

Settings ​

FieldTypeDescription
settingIdint64settingId
symbolIdint64symbolId
settingsKeystring交易对配置参数
settingsValuestring交易对配置参数

GetSymbolSettingsWithSymbolIdRequest ​

FieldTypeDescription
symbolIdint64none
settingsKeystringnone

GetSymbolSettingsWithSymbolIdResponse ​

FieldTypeDescription
settingsGetSymbolSettingsWithSymbolIdResponse.Settings交易对配置参数

Settings ​

FieldTypeDescription
settingIdint64settingId
symbolIdint64symbolId
settingsKeystring交易对配置参数
settingsValuestring交易对配置参数

GetSymbolTradeFeeRequest ​

FieldTypeDescription
typeIdint64交易对类型:3-SPOT,5-OTC
levelIdint64none
symbolstring交易对
symbolIdint64none

GetSymbolTradeFeeResponse ​

FieldTypeDescription
rulesGetSymbolRulesResponse.SymbolRulesnone

GetSymbolTypeInfoRequest ​

FieldTypeDescription
typeIdint64交易对类型ID

GetSymbolTypeInfoResponse ​

FieldTypeDescription
infoGetSymbolTypeInfoResponse.SymbolType交易对类型信息

SymbolType ​

FieldTypeDescription
typeIdint64交易对类型ID
typeNamestring交易对类型名称
typeDescstring交易对类型描述
createTimeint64交易对类型创建时间
updateTimeint64交易对类型更新时间

GetSymbolTypeListResponse ​

FieldTypeDescription
listGetSymbolTypeInfoResponse.SymbolType交易对类型列表

ListAssetRequest ​

FieldTypeDescription
typeIdint64none
baseAssetstringnone
quoteAssetstringnone

ListAssetResponse ​

FieldTypeDescription
otcSymbolsListAssetResponse.OTCSymbolnone

OTCSymbol ​

FieldTypeDescription
symbolIconstringnone
baseAssetstringnone
quoteAssetstringnone
baseIconstringnone
quoteIconstringnone
symbolstringnone
symbolNamestringnone
symbolIdint64none
symbolTypeIdint64none
contractTypestringnone

SetSymbolRulesRequest ​

FieldTypeDescription
typeIdint64交易对类型:3-SPOT,5-OTC
rulesSetSymbolRulesRequest.SymbolRulesnone
symbolIdint64交易对Id:非必填,当设置全局则可为空
isDefaultstring设置是否默认:ENABLE/DISABLE,非必填,设置默认配置则不需要填写
statusstring设置交易状态:TRADING/DISABLE,非必填,设置默认配置则不需要填写

SymbolRules ​

FieldTypeDescription
makerFeeRatestringnone
takerFeeRatestringnone
levelIdint64none
remarkstringnone

TimeResponse ​

FieldTypeDescription
serverTimeint64当前服务器时间

UpdateSymbolFilterRequest ​

FieldTypeDescription
filtersUpdateSymbolFilterRequest.Filternone

Filter ​

FieldTypeDescription
filterIdint64过滤参数id
maxNotionalValuestring最大名义价值
maxLeveragestring最大杠杆
maintMarginRatiostring维持保证金率

UpdateSymbolInfoRequest ​

FieldTypeDescription
symbolIdint64symbol ID
symbolNamestring交易对名称
pairstring标的交易对
contractTypestring合约类型
deliveryDateint64交割日期
onboardDateint64上线日期
baseAssetstring标的资产
quoteAssetstring计价资产
typeIdint64交易对类型
descriptionstring交易对描述
statusstring交易对状态:"DISABLE" "TRADING"
symbolstring交易对
symbolIconstring图标
symbolFlagstringSHOW/HIDDEN

UpdateSymbolSettingsRequest ​

FieldTypeDescription
settingsUpdateSymbolSettingsRequest.Settingsnone

Settings ​

FieldTypeDescription
symbolIdint64settingId int64 settingId = 1[(validate.rules).int64.gt = 0];
settingsKeystring交易对配置参数
settingsValuestring交易对配置参数

UpdateSymbolSettingsWithSymbolIdRequest ​

FieldTypeDescription
symbolIdint64symbolId
settingsUpdateSymbolSettingsWithSymbolIdRequest.Settingsnone

Settings ​

FieldTypeDescription
settingsKeystring交易对配置参数
settingsValuestring交易对配置参数

UpdateSymbolTypeRequest ​

FieldTypeDescription
typeIdint64交易对类型ID
typeNamestring交易对类型名称
typeDescstring交易对类型描述

3.2 Enums ​

SettingsKey ​

NameNumberDescription
None0none
ReservePrice1保留价
PricePrecision2价格小数点位数
QuantityPrecision3数量小数点位数
BaseAssetPrecision4标的资产精度
QuoteAssetPrecision5计价资产精度
MarginAsset6保证金资产
MinOrderQuantity7最小下单数量
LimitOrderMaxOrderQuantity8最大下单数量
MarketOrderMaxOrderQuantity9none
MinOrderPrice10最小下单价格
MaxOrderPrice11最大下单价格
LimitOrderPriceLimitRate12限价订单价格上下限(5% = 0.05)
MarketOrderPriceLimitRate13市价订单价格上下限(5% = 0.05)
MinNotionalValue14最小名义价值USDT(5)
MaxNotionalValue15最大名义价值USDT(2500000)
MaxPositionPercent16最大持仓量百分比(10%=0.1)
MaxLeverage17最大杠杆(100)
FundingFeeIntervalHours18资金费率计算间隔(小时)
FundingFeeMaxRate19资金费率最大值(0.1% = 0.001)
FundingFeeMinRate20资金费率最小值(-0.1% = -0.001)
InterestRate21利率(0.1% = 0.001)
MakerFeeRate22MakerFeeRate
TakerFeeRate23TakerFeeRate

SymbolStatus ​

NameNumberDescription
Unknown0none
TRADING1交易
DISABLE2禁用

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.

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