본문으로 건너뛰기
HTTP API계정

미체결 주문 및 트리거 주문

요청 만들기

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

명령
curl 'http://127.0.0.1:48180/v1/account/orders?connection_id=12' \
  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
GET
/account/orders

연결의 미체결 주문과 트리거 주문입니다. key와 exchange_id는 알려질 때까지 null입니다. size, filled, remaining은 기준 코인 단위입니다.

인증

bearerToken account:read
header인증Bearer <token>

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

권한: account:read

쿼리 매개변수

connection_id*integer

계정을 읽을 연결입니다.

형식int64

응답 본문

연결의 주문과 트리거입니다.

application/json
  1. response
connection_id*integer
형식int64
data*array<>
triggers*array<>
요청 예제
curl 'http://127.0.0.1:48180/v1/account/orders?connection_id=12' \  -H "Authorization: Bearer $SPECTRE_LOCAL_API_TOKEN"
응답 예제
{  "connection_id": 12,  "data": [    {      "key": "t-123456789012345678",      "exchange_id": "987654321",      "instrument": "binance:futures:BTCUSDT",      "side": "buy",      "type": "limit",      "price": "67000.1",      "size": "0.012",      "filled": "0",      "remaining": "0.012",      "notional": "804",      "status": "open",      "created_ts": 1730294400123    }  ],  "triggers": [    {      "id": "42",      "instrument": "binance:futures:BTCUSDT",      "type": "stop_loss",      "trigger_price": "66000",      "rule": "price_below_or_equal",      "size": "0.012",      "notional": "804",      "status": "open",      "order_type": "market",      "client_id": "c1",      "created_ts": 1730294400123    }  ]}