historical Bitcoin OHLC data for the last 7 days
Historical data The Trading cube covers real time and roughly the last 30 days. For anything older, rebuild the same numbers from raw trades with DEXTradeByTokens. Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/ Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retenti
What it returns
- currency ID
- currency name
- currency symbol
- block date
- block time
- timestamp
- start
- duration
- end
- base
- base attributed to USD
- quote
- USD
- is quoted in USD
- open
- high
- low
- close
- mean
- simple moving
- weighted simple moving
- exponential moving
Filters
- currency ID is bid:bitcoin
- time duration is 3600
The query
# Historical data
# The Trading cube covers real time and roughly the last 30 days. For
# anything older, rebuild the same numbers from raw trades with
# DEXTradeByTokens.
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
{
Trading {
Currencies(
where: {
Currency: { Id: { is: "bid:bitcoin" } },
Interval: { Time: { Duration: { eq: 3600 } } },
Block: {Time:{
since_relative:{days_ago:7}
}}
},
limit: { count: 240 },
orderBy: { descending: Block_Time }
) {
Currency {
Id
Name
Symbol
}
Block {
Date
Time
Timestamp
}
Interval {
Time {
Start
Duration
End
}
}
Volume {
Base
BaseAttributedToUsd
Quote
Usd
}
Price {
IsQuotedInUsd
Ohlc {
Open
High
Low
Close
}
Average {
Mean
SimpleMoving
WeightedSimpleMoving
ExponentialMoving
}
}
}
}
}
Similar queries
- Currency Liquidity Across Chains · Trading (all chains) · Currencies
- Latest Bitcoin Price (Trading API) · Trading (all chains) · Currencies
- Arbitrum mcap · Trading (all chains) · Currencies
- btc volume, tokens vs currency cube · Trading (all chains) · Currencies
- tv-currency · Trading (all chains) · Currencies