Project

General

Profile

Dashboard API Spec » History » Version 3

prin methirattanasophon, 03/12/2026 01:59 AM

1 1 Ryan Supawarapong
# Dashboard API Spec
2 2 Ryan Supawarapong
3
4
## gRPC for coin pricing
5
6
7
```{protobuf}
8
syntax = "proto3";
9
package dealer_api;
10
11
option go_package = "github.com/karn-zuvarna/dealer-api/grpc;grpc";
12
13 3 prin methirattanasophon
message GetProductsRequest {
14 2 Ryan Supawarapong
	repeated string coins = 1;
15
}
16
17
message ProductUpdate {
18
	int64 trade_id = 1;
19
	double price = 2;
20
	double size = 3;
21
	string time = 4;
22
	double bid = 5;
23
	double ask = 6;
24
	double volume = 7;
25
	double rfq_volume = 8;
26
	double conversions_volume = 9;
27
}
28
29
message Product {
30
	string name = 1;
31
	string display_name = 2;
32
	repeated ProductUpdate update = 3;
33
	double price_change = 4;
34
	double volume = 5;
35
}
36
37 3 prin methirattanasophon
message GetProductsResponse {
38 2 Ryan Supawarapong
	map<string, Product> products = 1;
39
}
40
41
service ProductsService {
42 3 prin methirattanasophon
	rpc GetProducts(GetProductsRequest) returns (GetProductsResponse);
43 2 Ryan Supawarapong
}
44
```