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=1pageSize=1000status=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_snapshotfct_gate_launchpool_subpool_snapshotfct_gate_launchpool_response_snapshotfct_gate_launchpool_quarantinefct_gate_launchpool_5min(continuous aggregate)fct_gate_launchpool_daily(continuous aggregate)
Access Denied policy
HTTP 403или HTMLAccess Denied-> typed errorgate_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 daysfct_gate_launchpool_subpool_snapshot: 7 daysfct_gate_launchpool_5min: 30 daysfct_gate_launchpool_daily: 1 yearfct_gate_launchpool_quarantine: 7 days- compression:
fct_gate_launchpool_snapshot: after 1 dayfct_gate_launchpool_subpool_snapshot: after 1 dayfct_gate_launchpool_5min: after 7 daysfct_gate_launchpool_daily: after 30 daysfct_gate_launchpool_quarantine: after 1 day