35 lines
1.1 KiB
Protocol Buffer
35 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
||
package blockchain;
|
||
|
||
option go_package = "code.30cm.net/digimon/app-cloudep-blockchain";
|
||
|
||
// OKResp
|
||
message OKResp {}
|
||
// NoneReq
|
||
message NoneReq {}
|
||
|
||
// ListSymbolsRequest is the request for the ListSymbols RPC.
|
||
// It is currently empty but can be extended with filtering or pagination fields in the future.
|
||
message ListSymbolsRequest {}
|
||
|
||
// ListSymbolsResponse contains a list of symbols.
|
||
message ListSymbolsResponse {
|
||
repeated Symbol symbols = 1;
|
||
}
|
||
// Symbol represents information about a trading pair.
|
||
message Symbol {
|
||
string symbol = 1; // 交易對名稱 (BTCUSDT)
|
||
string status = 2; // 狀態(如 "TRADING" 表示可交易)
|
||
string base_asset = 3; // 主幣種(如 BTCUSDT 的 BTC)
|
||
int32 base_asset_precision = 4; // 主幣的小數點精度
|
||
string quote_asset = 5; // 報價幣種(如 BTCUSDT 的 USDT)
|
||
int32 quote_asset_precision = 6; // 報價資產顯示的小數位數
|
||
}
|
||
|
||
service BlockchainService{
|
||
// ListSymbols retrieves all available trading symbols.
|
||
rpc ListSymbols(ListSymbolsRequest) returns(ListSymbolsResponse);
|
||
// Ping is a health-check endpoint.
|
||
rpc Ping(NoneReq) returns(OKResp);
|
||
}
|