Backfill historical price data

post/api/assetpricing/v1/admin/backfill

Triggers a backfill operation for historical price data for a specific asset.

This endpoint fetches historical OHLC data from available vendors and stores it in the database. Either 'days' or 'start_time' must be provided to specify the backfill range.

Safety behaviour:

  • By default, existing data is preserved if new data has fewer records
  • Set force_replace=true to override

Request Body

symbol string required
Asset symbol (e.g., 'btc', 'eth')
Min length: >= 1 characters
Example: btc
quote_symbol string
Quote asset symbol
Example: fiatusd
days integer <int64>
Number of days from now (1-365)
Minimum: >= 1
Maximum: <= 365
Example: 30
start_time string
Start timestamp (ISO-8601)
Example: 2024-01-01T00:00:00.000Z
end_time string
End timestamp (ISO-8601), defaults to now
Example: 2024-01-31T23:59:59.000Z
force_replace boolean required
Replace even if new data has fewer records (use with caution)
Example: false

200 Response

asset_id string required
asset_symbol string required
quote_asset_symbol string required
provider string
records_deleted integer <int32>required
records_inserted integer <int32>required
daily_rows_upserted integer <int32>required
start_time string required
end_time string required
message string

400 Response

string

500 Response

string