blockchain/generate/rpc/blockchain.proto

35 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

2025-08-04 01:55:56 +00:00
syntax = "proto3";
package blockchain;
option go_package = "code.30cm.net/digimon/app-cloudep-blockchain";
// OKResp
message OKResp {}
// NoneReq
message NoneReq {}
2025-08-04 14:02:01 +00:00
// 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; // 報價資產顯示的小數位數
}
2025-08-04 01:55:56 +00:00
service BlockchainService{
2025-08-04 14:02:01 +00:00
// ListSymbols retrieves all available trading symbols.
rpc ListSymbols(ListSymbolsRequest) returns(ListSymbolsResponse);
// Ping is a health-check endpoint.
2025-08-04 01:55:56 +00:00
rpc Ping(NoneReq) returns(OKResp);
2025-08-04 14:02:01 +00:00
}