Cancel Order
Cancel a resting order. Requires write. The cancel signature is a wallet signature over the string tokenplay-clob-cancel-v1|<user>|<orderId> — a different, shorter message than the order: an order signature authorises settlement and must not also authorise a cancel, so the order's own signature is deliberately not accepted.
This is an engine cancel, so there is no explorer transaction. Funds become idle/withdrawable in the CLOB exchange; use the contract's withdraw (EVM: npm run mm -- withdraw --amount <amount>; Solana: the bridge's POST /tx/withdraw) to return them to the wallet. Answers 200 { "ok": true }; 401 when the signature does not verify; 422 { "ok": false, "reason": "…" } when the order is no longer resting. Afterwards the order is listed by GET /users/{user}/orders/closed.
Cancel signature — EVM
import { Wallet } from "ethers";const wallet = new Wallet(process.env.PRIVATE_KEY);const orderId = "o104";const market = "evm:97:314";const user = wallet.address;// A different, shorter message than the order: an order signature// authorises settlement and must not also authorise a cancel.const signature = await wallet.signMessage( "tokenplay-clob-cancel-v1|" + user + "|" + orderId);console.log("DELETE https://app-staging.daejin.xyz/clob/v1/orders/" + orderId + "?market=" + encodeURIComponent(market) + "&user=" + user + "&signature=" + encodeURIComponent(signature));Cancel signature — Solana
import { ed25519 } from "@noble/curves/ed25519";import bs58 from "bs58";const secret = bs58.decode(process.env.SOLANA_PRIVATE_KEY);const seed = secret.slice(0, 32);const user = bs58.encode(ed25519.getPublicKey(seed));const orderId = "o104";const market = "373";// A different, shorter message than the order: an order signature// authorises settlement and must not also authorise a cancel.const signature = bs58.encode(ed25519.sign( new TextEncoder().encode("tokenplay-clob-cancel-v1|" + user + "|" + orderId), seed));console.log("DELETE https://app-staging.daejin.xyz/clob/v1/orders/" + orderId + "?market=" + market + "&user=" + user + "&signature=" + encodeURIComponent(signature));Or with the bundled clients: npm run mm -- cancel --id o104 / npm run mm:solana -- cancel --id o104.
Developer-portal API key (tp_live_… / tp_test_…), also accepted as Authorization: Bearer tp_…. Public market data needs no key; user-scoped reads need read, placing and cancelling need write.
In: header
Path Parameters
Query Parameters
Response Body
curl -X DELETE "https://example.com/orders/string?market=string&user=string"