Project

General

Profile

Dashboard API Spec » History » Version 5

Ryan Supawarapong, 03/12/2026 02:09 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 4 prin methirattanasophon
	string id = 1;
31
	repeated ProductUpdate update = 2;
32
	double price_change = 3;
33
	double volume = 4;
34 2 Ryan Supawarapong
}
35
36 3 prin methirattanasophon
message GetProductsResponse {
37 2 Ryan Supawarapong
	map<string, Product> products = 1;
38
}
39
40
service ProductsService {
41 5 Ryan Supawarapong
	rpc GetProducts(GetProductsRequest) returns (stream GetProductsResponse);
42 2 Ryan Supawarapong
}
43
```