Price a set of symbols
/ pricesReturn the USD price of every symbol named, one entry per symbol, in the order asked, as {prices}.
Like the network catalogue, this states no scope: a price belongs to the market rather than to a workspace, so every caller is answered the same figures.
The batch never partially fails, and that is the whole reason it is separate from the single read.
A symbol Stridge cannot price comes back with
usd_price: nullINSIDE a200, never as an error. A screen showing twelve balances asks for twelve symbols in one request, and one asset whose upstream is down must not blank the other eleven. The only failures here are failures of the REQUEST itself: naming no symbols at all (422parameter_missing), naming more than the cap (422parameter_invalid), or sending a query parameter other thansymbols(400parameter_unknown).A symbol outside Stridge's registry is answered
nullalongside everything else rather than refused, for the same reason. A client that wants to know WHICH of "unknown" or "unpriceable" happened asks about that one symbol on its own, where the two are told apart.
Query parameters
- symbolsstringrequired
The symbols to price, comma-separated. Normalised to upper case, blanks skipped, repeats collapsed.
Show full descriptionShow less
At least one is required (
422parameter_missingwhen none is left) and at most 25 are accepted (422parameter_invalidpast that), counted AFTER that normalisation, so a caller listing the same symbol twice is not charged for two.
Responses
One entry per requested symbol, priced or explicitly unpriced.
- objectstringrequired
The object's type, always
asset_price. - asset_symbolstringrequired
The asset's ticker, normalised to upper case. A price is per SYMBOL and not per chain: the same asset is worth the same wherever it is deployed, which is why this family is keyed differently from the network catalogue.
- usd_pricestring | nullrequired
The price in USD as an exact decimal string, never a JSON number, or
nullwhen Stridge cannot currently price the asset. A client renders the absence rather than a zero:0is a price, and showing one for an asset nobody could value would be a lie a person acts on.
- objectstringrequired
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400header_invalidInvalid header
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 409environment_provisioningEnvironment provisioning
- 422parameter_missingMissing parameter
- 429rate_limitedToo many requests