client-jvm
client-jvm copied to clipboard
Universal Snapshot missing field
Hello,
The universal snapshot endpoint returns the Ticker symbol. This is not reflected sadly in the API. So I am forced as a workaround to call the search ticker endpoint in order to get the ticker Symbol followed by a call to get the ticker details. It would be nice if I could avoid this unnecessary call to the API, by adding this field to the model.
Thanks :)
Hey @upMKuhn, thanks for reporting this. Is this an issue with the API itself or the JVM client library missing a field in the results? What field are you looking for from ticker details that you want included in the universal snapshot? Basically, I'm wondering if this is a feature request or a bug.
Hello @justinpolygon
it is a bug in the JVM client. In summary, the field ticker is exposed in the API, but not in the client. See:
{
"market_status": "early_trading",
"name": "Agilent Technologies Inc.",
"ticker": "A",
"type": "stocks",
"session": {
"change": 4.95,
"change_percent": 3.843,
"early_trading_change": 0.21,
"early_trading_change_percent": 0.163,
"late_trading_change": 0,
"late_trading_change_percent": 0,
"close": 133.74,
"high": 134.04,
"low": 128.77,
"open": 129.09,
"volume": 1731449,
"previous_close": 128.79,
"price": 133.74
}
},
@Serializable
data class Snapshot (
// Common: fields that apply to most/all of the asset types.
val error: String? = null,
val message: String? = null,
val market_status: String? = null,
val name: String? = null,
val type: String? = null, // Type of the asset: stocks, options, fx, crypto, indices.
@SerialName("session") val session: SnapshotSession? = null,
// fmv is only available on Business plans, see docs for details.
@SerialName("fmv") val fmv: Double? = null,
// Quote is only returned if your current plan includes quotes.
@SerialName("last_quote") val lastQuote: Quote? = null,
// Trade is only returned if your current plan includes trades.
@SerialName("last_trade") val lastTrade: SnapshotsTrade? = null,
// Options
@SerialName("break_even_price") val breakEvenPrice: Double? = null,
@SerialName("details") val optionDetails: SnapshotContractDetails? = null,
@SerialName("greeks") val optionGreeks: SnapshotGreeks? = null,
@SerialName("implied_volatility") val impliedVolatility: Double? = null,
@SerialName("open_interest") val openInterest: Double? = null,
@SerialName("underlying_asset") val underlyingAsset: SnapshotUnderlyingAsset? = null,
// Indices
@SerialName("value") val value: Double? = null,
)
There is the name, but not the ticker. The ticker details are null.