본문으로 건너뛰기
HTTP API연결

연결 조회

요청 만들기

값을 바꾸면 명령이 함께 바뀝니다. 토큰은 여기에 입력하지 않습니다. 명령은 SPECTRE_LOCAL_API_TOKEN 환경 변수에서 토큰을 읽습니다. 자신의 터미널에서 실행하세요.

명령
curl 'http://127.0.0.1:48180/v1/connections/12' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/connections/{id}

인증

bearerToken connections:read
header인증Bearer <token>

Local API 토큰입니다: spt_와 16진수 문자 64개. Settings App → 일반 → Local API에서 복사합니다. Authorization 헤더로만 받습니다. 작업에 나열된 이름은 그 작업에 필요한 권한입니다. 터미널의 토큰에는 모든 권한이 있습니다.

권한: connections:read

경로 매개변수

id*integer

연결 id입니다.

형식int64

응답 본문

해당 연결입니다.

application/json
  1. response
id*integer
형식int64
exchange*string

종목 주소에서와 같이 소문자로 쓴 거래소입니다: binance.

market*string

spot, futures, …

label*string
enabled*boolean
read_only*boolean

터미널이 시장 데이터를 위해 만든, 자격 증명이 없는 연결입니다.

has_credentials*boolean
proxy_bound*boolean

연결에 프록시가 바인딩되어 있는지 여부입니다.

status*
요청 예제
curl 'http://127.0.0.1:48180/v1/connections/12' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
응답 예제
{  "id": 12,  "exchange": "binance",  "market": "futures",  "label": "Main",  "enabled": true,  "read_only": false,  "has_credentials": true,  "proxy_bound": false,  "status": {    "state": "connected",    "last_event": {      "code": "connected",      "ts": 1730294400123    }  }}