Skip to content

SyncKuCoinLaunchpoolSnapshot

Purpose

Собирает KuCoin GemPool (launchpool) через публичные API и ingests snapshot через SQL-контракт.

Код: internal/worker/activities/sync_kucoin_launchpool.go

Input / Output

Input (models.SyncKuCoinLaunchpoolInput): - include_current (optional, default true) - include_history (optional, default true) - history_page_size (optional, default 20, max 50) - max_history_pages (optional, default 10)

Output (models.SyncKuCoinLaunchpoolResult): - snapshot_at - projects_seen, projects_upserted - subpools_seen, subpools_upserted - quarantine_rows

External Dependencies

  • HTTP API:
  • /_api/gem-staking-front/gempool/staking/campaign
  • /_api/gem-staking-front/gempool/staking/campaign/history
  • /_api/gem-staking-front/gempool/staking/campaign/details (fallback/detail)
  • DB: SQL function ingest_kucoin_launchpool_snapshot($1::jsonb) + fct_kucoin_launchpool_*

Idempotency

  • Ingestion SQL использует upsert-модель по ключам snapshot таблиц.

Error Taxonomy

  • database pool is not initialized
  • kucoin_access_denied (non-retryable)
  • api_error (с записью в fct_kucoin_launchpool_quarantine)
  • SQL ingest ошибки

Callers

Observability

  • Логи: kucoin_launchpool_mapping_coverage, kucoin launchpool request failed