Exchange

취소 후 재주문

한 번의 요청으로 기존 주문을 취소하고 신규 주문을 생성합니다.

post/v1/orders/cancel_and_new

Request

  • Base URL
    https://api.upbit.com
  • URL
    https://api.upbit.com/v1/orders/cancel_and_new
  • Auth
    none declared

Request body

prev_order_uuidstring

취소하고자 하는 주문의 유일식별자(UUID)

prev_order_identifierstring

취소하고자 하는 주문의 클라이언트 지정 식별자

new_ord_type'limit' | 'price' | 'market' | 'best' required

주문 유형.

  • limit: 지정가 주문
  • price: 시장가 주문(매수)
  • market: 시장가 주문(매도)
  • best: 최유리 주문
new_volumestring decimal

신규 주문 수량

new_pricestring decimal

신규 주문 단가 또는 총액

new_identifierstring

신규 주문의 클라이언트 지정 식별자

new_time_in_force'fok' | 'ioc' | 'post_only'

주문 체결 조건.

  • fok: Fill or Kill
  • ioc: Immediate or Cancel
  • post_only: 메이커 전용 주문
new_smp_type'cancel_maker' | 'cancel_taker' | 'reduce'

자전거래 체결 방지(SMP) 모드.

  • cancel_maker: 메이커 주문 취소
  • cancel_taker: 테이커 주문 취소
  • reduce: 자전거래가 발생할 수량만큼 메이커·테이커 주문 수량 차감

Example request

{
  "prev_order_uuid": "9ca023a5-851b-4fec-9f0a-48cd83c2eaae",
  "prev_order_identifier": "9ca023a5-851b-4fec-9f0a-48cd83c2eaae",
  "new_volume": "remain_only",
  "new_price": "1000",
  "new_identifier": "9ca023a5-851b-4fec-9f0a-48cd83c2eaae"
}

Response

Object of cancel-and-new order result

uuidstring required

취소된 기존 주문의 유일 식별자

side'ask' | 'bid' required

취소된 기존 주문의 주문 방향(매수/매도)

ord_type'limit' | 'price' | 'market' | 'best' required

취소된 기존 주문의 주문 유형.

  • limit: 지정가 주문
  • price: 시장가 주문(매수)
  • market: 시장가 주문(매도)
  • best: 최유리 주문
pricestring decimal

취소된 기존 주문의 주문 단가 또는 총액

지정가 주문의 경우 단가, 시장가 매수 주문의 경우 매수 총액입니다.

state'wait' | 'watch' | 'done' | 'cancel' required

취소된 기존 주문의 주문 상태

  • wait: 체결 대기
  • watch: 예약 주문 대기
  • done: 체결 완료
  • cancel: 주문 취소
marketstring required

페어(거래쌍)의 코드

created_atstring required

취소된 기존 주문의 생성 시각 (KST 기준)

[형식] yyyy-MM-ddTHH:mm:ss+09:00

volumestring decimal

취소된 기존 주문의 주문 요청 수량

remaining_volumestring decimal required

취소된 기존 주문의 체결 후 남은 주문 양

executed_volumestring decimal required

취소된 기존 주문의 체결된 양

reserved_feestring decimal required

취소된 기존 주문의 수수료로 예약된 비용

remaining_feestring decimal required

취소된 기존 주문의 남은 수수료

paid_feestring decimal required

취소된 기존 주문의 사용된 수수료

lockedstring decimal required

취소된 기존 주문의 거래에 사용 중인 비용

prevented_volumestring decimal required

자전거래 방지로 인해 취소된 수량.

동일 사용자의 주문 간 체결이 발생하지 않도록 설정(SMP)에 따라 취소된 주문 수량입니다.

prevented_lockedstring decimal required

자전거래 방지로 인해 해제된 자산. 자전거래 체결 방지 설정으로 인해 취소된 주문의 잔여 자산입니다.

  • 매수 주문의 경우: 취소된 금액
  • 매도 주문의 경우: 취소된 수량
trades_countinteger required

취소된 기존 주문에 대한 체결 건수

new_order_uuidstring

주문 성공 시 신규 주문의 유일 식별자(UUID)

new_order_identifierstring

주문 성공 시 신규 주문의 클라이언트 지정 식별자

Example response

{
  "uuid": "ad217e24-ed02-469c-9b30-c08dbbda6908",
  "side": "bid",
  "ord_type": "limit",
  "price": "100000000",
  "state": "wait",
  "market": "KRW-BTC",
  "created_at": "2025-07-04T15:00:00+09:00",
  "volume": "1",
  "remaining_volume": "1",
  "executed_volume": "0.0",
  "reserved_fee": "70000.0",
  "remaining_fee": "70000.0",
  "paid_fee": "0.0",
  "locked": "100070000.0",
  "prevented_volume": "0",
  "prevented_locked": "0",
  "new_order_uuid": "4b07aa31-4747-485c-8bce-ac5495e4a639",
  "new_order_identifier": "9ca023a5-851b-4fec-9f0a-48cd83c2eaae"
}

Changes

No recorded changes to this operation across all 1 revision of this API.