Skip to content

Gate Launchpool Snapshot Pipeline

SyncGateLaunchpoolWorkflow собирает Gate Launchpool project-list и пишет snapshots в TimescaleDB.

Endpoint

  • GET https://www.gate.com/apiw/v2/earn/launch-pool/project-list
  • query params по умолчанию:
  • page=1
  • pageSize=1000
  • status=0

Поддерживаемые списки проектов в payload: - data.processingList - data.endList - data.list - data.end.list

Ingestion

  • входной SQL-контракт: SELECT * FROM ingest_gate_launchpool_snapshot($1::jsonb)
  • projects upsert: ON CONFLICT (snapshot_at, project_id) DO UPDATE
  • subpools upsert: ON CONFLICT (snapshot_at, project_id, subpool_key) DO UPDATE
  • asset mapping:
  • project_asset_id и subpool_asset_id (asset-level) через exchange_symbol_assets с fallback на exchange_assets* + exchange_asset_mappings + global_asset_networks
  • если mapping отсутствует/неоднозначен, строки сохраняются, а причина уходит в fct_gate_launchpool_quarantine

Tables

  • fct_gate_launchpool_snapshot
  • fct_gate_launchpool_subpool_snapshot
  • fct_gate_launchpool_response_snapshot
  • fct_gate_launchpool_quarantine
  • fct_gate_launchpool_5min (continuous aggregate)
  • fct_gate_launchpool_daily (continuous aggregate)

Access Denied policy

  • HTTP 403 или HTML Access Denied -> typed error gate_access_denied
  • это fatal ошибка: workflow run завершится failed

Manual run

docker compose exec -T temporal temporal workflow start \
  --address temporal:7233 --namespace default --task-queue default \
  --type SyncGateLaunchpoolWorkflow \
  --workflow-id sync-gate-launchpool-manual-$(date +%s) \
  --input '{"page":1,"page_size":1000,"status":0}'

Ensure schedule run

docker compose exec -T temporal temporal workflow start \
  --address temporal:7233 --namespace default --task-queue default \
  --type EnsureGateLaunchpoolScheduleWorkflow \
  --workflow-id ensure-gate-launchpool-schedule-$(date +%s) \
  --input '{"schedule_id":"sync-gate-launchpool-5m","cron":"*/5 * * * *","timezone":"UTC","task_queue":"default","page":1,"page_size":1000,"status":0}'

Schedule параметры: - schedule_id=sync-gate-launchpool-5m - cron */5 * * * * - overlap SKIP

Политики retention/compression

  • retention:
  • fct_gate_launchpool_snapshot: 7 days
  • fct_gate_launchpool_subpool_snapshot: 7 days
  • fct_gate_launchpool_5min: 30 days
  • fct_gate_launchpool_daily: 1 year
  • fct_gate_launchpool_quarantine: 7 days
  • compression:
  • fct_gate_launchpool_snapshot: after 1 day
  • fct_gate_launchpool_subpool_snapshot: after 1 day
  • fct_gate_launchpool_5min: after 7 days
  • fct_gate_launchpool_daily: after 30 days
  • fct_gate_launchpool_quarantine: after 1 day