HTTP API계정
최근 체결 내역
요청 만들기
값을 바꾸면 명령이 함께 바뀝니다. 토큰은 여기에 입력하지 않습니다. 명령은 SPECTRE_LOCAL_API_TOKEN 환경 변수에서 토큰을 읽습니다. 자신의 터미널에서 실행하세요.
명령
curl 'http://127.0.0.1:48180/v1/account/fills?connection_id=12&limit=50' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
연결의 체결 내역이며, 오래된 것부터 나열됩니다. 터미널은 API를 켠 뒤로 연결마다 최근 체결 내역 1000건을 보관합니다.
bearerToken account:readheader
인증Bearer <token>Local API 토큰입니다: spt_와 16진수 문자 64개. Settings App → 일반 → Local API에서 복사합니다. Authorization 헤더로만 받습니다. 작업에 나열된 이름은 그 작업에 필요한 권한입니다. 터미널의 토큰에는 모든 권한이 있습니다.
권한: account:read
connection_id*integer계정을 읽을 연결입니다.
형식
int64limit?integer최근 체결 내역 중 몇 건을 반환할지입니다.
범위
1 <= value <= 1000기본값
100since_ts?integer거래소 시간이 이 시각 또는 그 이후인 체결 내역만 반환합니다. UTC 밀리초입니다.
형식
int64연결의 체결 내역입니다.
application/json- response
connection_id*integer형식
int64data*array<>curl 'http://127.0.0.1:48180/v1/account/fills?connection_id=12&limit=50' \ -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"응답 예제
{ "connection_id": 12, "data": [ { "trade_id": "t1", "order_id": "987654321", "instrument": "binance:futures:BTCUSDT", "side": "buy", "price": "67000.1", "qty": "0.012", "fee": "0.32", "fee_currency": "USDT", "position_side": "long", "ts": 1730294400123 } ]}