Skip to main content

solPrice

Returns the SOL/USD price the history service currently uses when computing solAmountUsd / avgPriceUsd fields on trades. Refreshed every few seconds by the internal price worker.

Arguments

None.

Return type

type SolPrice {
  solPrice: Float!
  hasValidPrice: Boolean!   # false if price worker hasn't produced a reading yet
  lastUpdated: String!      # ISO-8601
}

Example

query { solPrice { solPrice hasValidPrice lastUpdated } }
curl -X POST https://ca.raze.sh/api/sol/graphql \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_your_key_here" \
  -d '{"query":"query { solPrice { solPrice hasValidPrice lastUpdated } }"}'