Developer Guide
Price Candles Data Structure
struct TimestampedValue has copy, drop, store {
value: u128, // Price or other numerical value
timestamp: u64 // Unix timestamp in milliseconds
}struct Candle has copy, drop, store {
low: TimestampedValue, // Lowest price in the time period
high: TimestampedValue, // Highest price in the time period
open: TimestampedValue, // Opening price of the time period
close: TimestampedValue // Closing price of the time period
}Data Availability
Querying Candle Data
Method 1: Get Latest Candles
Method 2: Get Latest Candles from Specific Time
Reading Technical Indicators
Asset Pair IDs
Price Pair
Pair ID
Candle Durations
Timeframe
Duration ( in milliseconds)
Edge Cases and Best Practices
Missing Candles
Understanding Return Values
Indicator Lag
Period Validation
Gas Optimization
Decimal Handling
Testing Your Integration
Last updated
