Skip to content

Commit

Permalink
Added market hours and indices (#110)
Browse files Browse the repository at this point in the history
* Added market hours and indices
  • Loading branch information
justinpolygon authored Jul 17, 2023
1 parent 76cca3a commit 75bd92d
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package io.polygon.kotlin.sdk.rest.reference

import io.ktor.http.*
import io.polygon.kotlin.sdk.rest.PolygonRestOption
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/** See [PolygonReferenceClient.getMarketStatusBlocking] */
Expand All @@ -15,7 +16,10 @@ suspend fun PolygonReferenceClient.getMarketStatus(vararg opts: PolygonRestOptio
data class MarketStatusDTO(
val market: String? = null,
val serverTime: String? = null,
val afterHours: Boolean = false,
val earlyHours: Boolean = false,
val exchanges: ExchangesStatusDTO = ExchangesStatusDTO(),
val indicesGroups: IndicesGroupsStatusDTO = IndicesGroupsStatusDTO(),
val currencies: CurrenciesStatusDTO = CurrenciesStatusDTO()
)

Expand All @@ -26,8 +30,21 @@ data class ExchangesStatusDTO(
val otc: String? = null
)

@Serializable
data class IndicesGroupsStatusDTO(
@SerialName("s_and_p") val sAndP: String? = null,
@SerialName("societe_generale") val societeGenerale: String? = null,
val msci: String? = null,
@SerialName("ftse_russell") val ftseRussell: String? = null,
val mstar: String? = null,
val mstarc: String? = null,
val cccy: String? = null,
val nasdaq: String? = null,
@SerialName("dow_jones") val dowJones: String? = null
)

@Serializable
data class CurrenciesStatusDTO(
val fx: String? = null,
val crypto: String? = null
)
)

0 comments on commit 75bd92d

Please sign in to comment.