Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Universal Snapshot missing field #150

Open
upMKuhn opened this issue Dec 13, 2023 · 4 comments
Open

Universal Snapshot missing field #150

upMKuhn opened this issue Dec 13, 2023 · 4 comments
Assignees

Comments

@upMKuhn
Copy link

upMKuhn commented Dec 13, 2023

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 :)

@justinpolygon justinpolygon self-assigned this Dec 14, 2023
@justinpolygon
Copy link
Contributor

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.

@upMKuhn
Copy link
Author

upMKuhn commented Dec 14, 2023

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
            }
        },

@upMKuhn
Copy link
Author

upMKuhn commented Dec 14, 2023

@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,
)

@upMKuhn
Copy link
Author

upMKuhn commented Dec 14, 2023

There is the name, but not the ticker. The ticker details are null.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants