OAuth로 AI Agent를 연결하세요. 무인 자동화에는 머신 클라이언트 또는 서비스 계정을 사용하고 자격 증명을 보호된 환경 변수 또는 시크릿 저장소에 보관하십시오.
Argus 자체는 투자 판단이나 주문을 생성하지 않지만, 클라이언트 Agent가 합법적으로 얻은 데이터로 독립적으로 추론하고 출력하는 것을 제한하지 않습니다.
REST 및 API
- 현재 REST 스키마는 권위 OpenAPI 문서를 사용합니다.
- OAuth Bearer token을 보냅니다. machine client와 service account는 X-Argus-API-Key를 사용할 수 있습니다.
- 구조화된 HTTP 응답과 상태 코드를 OpenAPI 계약에 따라 검증하세요.
- 400/422는 요청 문제, 401은 인증, 403은 거버넌스 거부, 500/503은 서비스 장애로 처리합니다.
- audit_id를 보존하고 재시도 가능한 장애만 제한적으로 재시도합니다.
# First run: argus auth login
import json
from urllib.request import Request, HTTPRedirectHandler, build_opener
from argus.cli.oauth import CliOAuthProfile
profile = CliOAuthProfile()
token = profile.client().access_token()
if token is None:
raise RuntimeError("Run argus auth login first")
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, *args, **kwargs):
return None
request = Request(
profile.api_base_url + "/v1/entity-resolve",
data=json.dumps(json.loads(r'''{"identifier_type":"lei","identifier_value":"HWUPKR0MPOU8FGXBT394","purpose":"factual_lookup","requires_redistribution":false}''')).encode(),
headers={"Authorization": f"Bearer {token}",
"Content-Type": "application/json", "User-Agent": "Argus REST client"},
method="POST",
)
with build_opener(NoRedirect()).open(request, timeout=30) as response:
envelope = json.load(response)
print(json.dumps(envelope, indent=2))