Implement getMarketPrices API endpoint

- Increase rate limit to 10 calls per second.
- Use the new API also for the getMarketPrice call, this makes the 'Can get market prices' API test pass
This commit is contained in:
premek 2021-11-17 15:50:29 +01:00 committed by woodser
parent b1e69f9fdc
commit f27e3e3d1a
7 changed files with 176 additions and 54 deletions

View file

@ -238,6 +238,8 @@ message GetCryptoCurrencyPaymentMethodsReply {
service Price {
rpc GetMarketPrice (MarketPriceRequest) returns (MarketPriceReply) {
}
rpc GetMarketPrices (MarketPricesRequest) returns (MarketPricesReply) {
}
}
message MarketPriceRequest {
@ -248,6 +250,18 @@ message MarketPriceReply {
double price = 1;
}
message MarketPricesRequest {
}
message MarketPricesReply {
repeated MarketPriceInfo market_price = 1;
}
message MarketPriceInfo {
string currency_code = 1;
double price = 2;
}
///////////////////////////////////////////////////////////////////////////////////////////
// GetTradeStatistics
///////////////////////////////////////////////////////////////////////////////////////////
@ -371,7 +385,7 @@ message TradeInfo {
bool is_withdrawn = 23;
string contract_as_json = 24;
ContractInfo contract = 25;
string maker_deposit_tx_id = 100;
string taker_deposit_tx_id = 101;
}
@ -389,7 +403,7 @@ message ContractInfo {
string maker_payout_address_string = 10;
string taker_payout_address_string = 11;
uint64 lock_time = 12;
string arbitrator_node_address = 100;
}