Closed rise0chen closed 1 year ago
What are the arguments you used within the above method?
let history = self.exchange.get_price(Period::minutes(UtcOffset::UTC, 1), 100).await.unwrap();
let price = self.exchange.get_price(Period::seconds(UtcOffset::UTC, 1), 1).await;
It may be caused by network fluctuations.
Can we set timeout for http?
You can set timeout at request level.
Yes, or you can use TimeoutLayer
if you are familiar with tower
.
Sometimes it takes a long time(2m 11s), but in most cases it only takes a short time(0.7s).
Do you know what causes it to take a long time?