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