본문으로 건너뛰기

트레이딩

주문 취소

Cancellation is free, best-effort, and idempotent. Today you can cancel one order at a time per request. Bulk cancel — by ID list, by market, or account-wide — is planned; see the workaround below until it ships. A race window exists in all modes: in-flight fills committed before your cancel reaches the matcher will still complete.

단일 주문 취소

주문 ID가 있을 때는 DELETE 방식을 사용하십시오. 응답이 취소를 확인하며, DELETE를 두 번 호출해도 안전합니다.

POST /api/v1/orders/:id/cancel
Authorization: Bearer $SATORIEX_TOKEN

202 Accepted  -> { "code": 0, "data": { ...full order object with status "cancelled" } }

일괄 취소

예정

세 가지 일괄 패턴을 지원합니다: ID 목록, 하나의 마켓의 모든 주문, 또는 패닉 버튼 — 계정의 모든 미체결 주문.

그 동안은 클라이언트 측에서 단일 취소 엔드포인트를 반복하십시오. 취소는 무료이고 빠르므로, 미체결 주문 목록을 빠르게 반복하는 것이 비상 청산에 잘 작동합니다.

# Today: cancel one order at a time.
for id in "${ORDER_IDS[@]}"; do
  curl -X POST https://staging.satoriex.io/api/v1/orders/$id/cancel \
    -H "Authorization: Bearer $SATORIEX_TOKEN"
done

패닉 취소는 몇 초에 한 번으로 속도가 제한됩니다 — 일반 흐름이 아닌 비상 청산용입니다.

취소 가능한 항목

주문 상태취소 가능?비고
pending Flagged for cancel; the matcher skips it on next processing — the order has not yet been added to the book.
open Resting in the book; cancel removes it immediately. This is the common cancel case.
partial 예 (미체결 잔량만) 이미 체결된 주식은 포지션에 남으며, 미체결 잔량만 취소됩니다.
filled 아니오 이미 정산됨 — 조치 불가.
cancelled 멱등 반복 호출은 동일한 성공 응답을 반환합니다.

취소는 소급 적용되지 않습니다

취소 요청이 매칭 후 1밀리초 뒤에 도착하면 거래가 성사된 것입니다. 이 창을 허용하도록 전략을 설계하십시오 — 해당 경우 IOC 또는 FOK 유효 시간을 사용하십시오.