Perdagangan
Batalkan order
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.
Batalkan satu order
Gunakan metode DELETE saat Anda memiliki ID order. Respons mengkonfirmasi pembatalan; memanggil DELETE dua kali adalah aman.
POST /api/v1/orders/:id/cancel
Authorization: Bearer $SATORIEX_TOKEN
202 Accepted -> { "code": 0, "data": { ...full order object with status "cancelled" } }Pembatalan massal
DirencanakanTiga pola massal didukung: daftar ID, semua order di satu pasar, atau tombol panik โ setiap order terbuka di akun.
Sementara itu, iterasi endpoint pembatalan tunggal di sisi klien. Pembatalan gratis dan cepat, sehingga loop ketat atas daftar order terbuka Anda berfungsi baik untuk pelepasan darurat.
# 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"
donePembatalan panik dibatasi frekuensinya satu kali setiap beberapa detik โ ini untuk unwind darurat, bukan untuk alur normal.
Apa yang dapat dibatalkan
| Status order | Dapat dibatalkan? | Catatan |
|---|---|---|
| pending | Ya | Flagged for cancel; the matcher skips it on next processing โ the order has not yet been added to the book. |
| open | Ya | Resting in the book; cancel removes it immediately. This is the common cancel case. |
| partial | Ya (hanya sisa) | Saham yang sudah terisi tetap di posisi Anda; hanya sisa yang belum terisi yang dibatalkan. |
| filled | Tidak | Sudah diselesaikan โ tidak ada tindakan yang mungkin. |
| cancelled | Idempoten | Panggilan berulang mengembalikan respons sukses yang sama. |
Pembatalan tidak retroaktif