Upload backfill events in JSON format

post/api/staking/v1/admin/{coin}/upload-backfill-events

Admin endpoint to upload backfill reward events in JSON format. Only supports ETH and HTETH coins.

JSON format: Array of event objects with coin, epoch, validator, type fields

  • coin: ETH or HTETH (case-insensitive)
  • epoch: Non-negative integer representing the epoch number
  • validator: Validator address (0x prefix will be removed automatically)
  • type: STAKING, TIPS, MEV, or CLAIM

Example JSON:

{
  "events": [
    { "coin": "ETH", "epoch": 12345, "validator": "0xabc123", "type": "STAKING" },
    { "coin": "ETH", "epoch": 12346, "validator": "0xdef456", "type": "TIPS" },
    { "coin": "HTETH", "epoch": 12347, "validator": "0xghi789", "type": "MEV" }
  ]
}

Processing:

  • Maximum events per upload: 500,000
  • Events are processed in two phases: validation then batch saving (1000 events per batch)
  • Validation errors will return all issues without saving any data
  • Batch save errors will stop processing and return resume information
  • Each entry creates an unprocessed reward record with NEW_FORCE state and zero reward amount

Path Parameters

  • coinstringRequired
    The coin type for backfill. Must be 'eth' or 'hteth'.
    Enum: eth hteth

Request Body

events array[object] required
Array of backfill events to process
Min items: >= 1 items
Max items: <= 500000 items
coin string required
The coin symbol (ETH or HTETH)
Example: ETH
epoch integer <int64>required
The epoch number (non-negative)
Minimum: >= 0
Example: 12345
validator string required
Validator address (0x prefix optional, will be removed)
Example: 0xabc123
type string required
The reward type
Allowed values: STAKING TIPS MEV CLAIM
Example: STAKING

200 Response

totalProcessed integer required
Total number of lines processed in the CSV file (including header)
Example: 1001
successfulInserts integer required
Number of entries successfully inserted into the database
Example: 1000
errors array[string] required
List of validation or processing errors. Empty if all entries were processed successfully.
Example: ["Line 2: Expected 4 columns but got 3","Line 5: Invalid coin 'SOL'. Supported coins: ETH, HTETH"]

400 Response

error string
errorName string
reqId string
context object

401 Response

error string
errorName string
reqId string
context object

403 Response

error string
errorName string
reqId string
context object

500 Response

error string
errorName string
reqId string
context object