marketoverview.v1.MarketOverviewService
GetCurrencyConversionRates
Get fiat units per USD and USD per stablecoin unit, grouped with source freshness.
Method
POST
Path
marketoverview.v1.MarketOverviewService/GetCurrencyConversionRates
Service
marketoverview.v1.MarketOverviewService
Visibility
Public endpoint
POST
marketoverview.v1.MarketOverviewService/GetCurrencyConversionRates Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/marketoverview.v1.MarketOverviewService/GetCurrencyConversionRates' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{}'Responses
{
"fiat": {
"rates": [
{
"code": "value",
"unitsPerUsdE8": "1"
}
],
"sourceTsSec": "1735689600",
"stale": false
},
"snapshotTsSec": "1735689600",
"stablecoins": [
{
"code": "value",
"sourceTsSec": "1735689600",
"stale": false,
"usdPerUnitE8": "1"
}
]
}Request
marketoverview.v1.GetCurrencyConversionRatesRequestResponse
marketoverview.v1.GetCurrencyConversionRatesResponse 3 fields
2 fields
code string
Supported fiat currency code.
unitsPerUsdE8 string (int64)
Fiat currency units per 1 USD, scaled by 1e8. USD has the identity value 1e8.
sourceTsSec string (uint64)
Shared source observation time in seconds since the Unix epoch (UTC).
stale boolean
True once the source observation is at least two hours old.
4 fields
code string
Supported stablecoin code (USDC or USDT).
usdPerUnitE8 string (int64)
USD per 1 stablecoin unit, scaled by 1e8. This is an observed price, not a fixed peg.
sourceTsSec string (uint64)
This stablecoin's source observation time in seconds since the Unix epoch (UTC).
stale boolean
True once this stablecoin's source observation is at least five seconds old.
snapshotTsSec string (uint64)
Response construction time in seconds since the Unix epoch (UTC).
| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| bad-request | 400 | invalid_argument | Bad Request | Bad request. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Service Unavailable | Service unavailable. |
| upstream-error | 502 | unavailable | Upstream Error | Upstream error. |