{"openapi":"3.1.0","info":{"title":"allyc API","version":"1.0.0-demo","description":"La API del data lake de allyc: instrumentos, cotizaciones, comitentes, saldos, tenencias, movimientos y webhooks del mercado de capitales argentino, normalizados en un solo esquema.\n\n**Demo**: usá la key `allyc_demo_2026_k7m2p9x4`. Los datos son sintéticos.","contact":{"name":"allyc","url":"https://allyc.lat"}},"servers":[{"url":"https://allyc.lat/api/v1","description":"allyc — demo"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"También se acepta `Authorization: Bearer <key>`."}}},"paths":{"/status":{"get":{"summary":"Estado del servicio","description":"Público, sin API key. Devuelve el estado del data lake.","security":[],"tags":["Servicio"],"responses":{"200":{"description":"OK"}}}},"/instruments":{"get":{"summary":"Listar instrumentos","tags":["Market data"],"description":"Scope requerido: `market:read`.","parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["BONO","ACCION","CEDEAR","ON","LETRA","FCI"]}},{"name":"segment","in":"query","schema":{"type":"string"}},{"name":"search","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":100,"maximum":200}}],"responses":{"200":{"description":"Lista de instrumentos","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"ticker":{"type":"string","example":"AL30"},"name":{"type":"string","example":"Bonar 2030 Ley Arg."},"type":{"type":"string","enum":["BONO","ACCION","CEDEAR","ON","LETRA","FCI"]},"currency":{"type":"string","example":"ARS"},"segment":{"type":"string","example":"Renta Fija"},"last_price":{"type":"number","example":112450},"variation_24h":{"type":"number","example":1.24},"volume_24h":{"type":"number","example":1834000000}}}},"meta":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"source":{"type":"string","example":"allyc-data-lake"}}}}}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/instruments/{ticker}":{"get":{"summary":"Detalle de un instrumento","tags":["Market data"],"description":"Scope requerido: `market:read`.","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string","example":"AL30"}}],"responses":{"200":{"description":"Instrumento","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"ticker":{"type":"string","example":"AL30"},"name":{"type":"string","example":"Bonar 2030 Ley Arg."},"type":{"type":"string","enum":["BONO","ACCION","CEDEAR","ON","LETRA","FCI"]},"currency":{"type":"string","example":"ARS"},"segment":{"type":"string","example":"Renta Fija"},"last_price":{"type":"number","example":112450},"variation_24h":{"type":"number","example":1.24},"volume_24h":{"type":"number","example":1834000000}}},"meta":{"type":"object","properties":{"generated_at":{"type":"string","format":"date-time"},"source":{"type":"string","example":"allyc-data-lake"}}}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/instruments/{ticker}/quotes":{"get":{"summary":"Histórico de cotizaciones","tags":["Market data"],"description":"Scope requerido: `market:read`. Serie de precios y volumen.","parameters":[{"name":"ticker","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":40,"maximum":200}}],"responses":{"200":{"description":"Serie histórica"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/market/summary":{"get":{"summary":"Resumen de mercado","tags":["Market data"],"description":"Scope requerido: `market:read`. Volumen, top movers, más operados y FX de referencia.","responses":{"200":{"description":"Resumen"}}}},"/accounts":{"get":{"summary":"Listar comitentes","tags":["Cuentas"],"description":"Scope requerido: `accounts:read`. Si la key pertenece a una ALyC, solo devuelve sus comitentes.","responses":{"200":{"description":"Comitentes con saldos multi-moneda"}}}},"/accounts/{number}":{"get":{"summary":"Detalle de un comitente","tags":["Cuentas"],"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string","example":"10241"}}],"responses":{"200":{"description":"Comitente"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/accounts/{number}/positions":{"get":{"summary":"Tenencias valorizadas","tags":["Cuentas"],"description":"Scope requerido: `accounts:read`. Posiciones con precio promedio, último precio, valor de mercado y PnL.","parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Tenencias"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/accounts/{number}/movements":{"get":{"summary":"Movimientos","tags":["Cuentas"],"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"Movimientos liquidados"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/webhooks":{"get":{"summary":"Listar webhook endpoints","tags":["Webhooks"],"description":"Scope requerido: `webhooks:manage`.","responses":{"200":{"description":"Endpoints registrados"}}},"post":{"summary":"Registrar un webhook endpoint","tags":["Webhooks"],"description":"Scope requerido: `webhooks:manage`. Eventos: `quote.updated`, `account.movement`, `sync.completed`. El `secret` se devuelve una sola vez; cada entrega llega firmada con HMAC-SHA256 en el header `allyc-signature`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","example":"https://tu-sistema.com/hooks/allyc"},"events":{"type":"array","items":{"type":"string"},"example":["account.movement"]}}}}}},"responses":{"200":{"description":"Endpoint creado (incluye secret)"},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/webhooks/{id}":{"delete":{"summary":"Desactivar un webhook endpoint","tags":["Webhooks"],"description":"Scope requerido: `webhooks:manage`. Deja de entregar eventos; el historial se conserva.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Endpoint desactivado"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}},"/webhooks/{id}/test":{"post":{"summary":"Enviar un evento de prueba","tags":["Webhooks"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Entrega generada, con firma"},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"invalid_api_key"},"message":{"type":"string"}}}}}}}}}}}}}