For machine-readable docs: curl -H "Accept: text/plain" /docs or ?format=md

DELETE /v1/orders

Cancel one or more orders on a Manifest market. Returns a base64-encoded VersionedTransaction for client-side signing.
← Back to Overview

Quick Start

import { Keypair, VersionedTransaction, Connection } from "@solana/web3.js";

const MANIFEST_ORDERS_URL = "https://manifest-orders.fly.dev";

const connection = new Connection("https://api.mainnet-beta.solana.com");

const wallet = Keypair.fromSecretKey(/* your key */);

// 1. Build the cancel transaction

const response = await fetch(${MANIFEST_ORDERS_URL}/v1/orders, {

method: "DELETE",

headers: { "Content-Type": "application/json" },

body: JSON.stringify({

maker: wallet.publicKey.toBase58(),

baseMint: "So11111111111111111111111111111111111111112",

quoteMint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",

orders: [

{ clientOrderId: 1234567 },

],

computeUnitPrice: "auto",

}),

});

const { transaction, cancelled } = await response.json();

console.log("Cancelling orders:", cancelled);

// 2. Deserialize and sign

const tx = VersionedTransaction.deserialize(Buffer.from(transaction, "base64"));

tx.sign([wallet]);

// 3. Send

const sig = await connection.sendRawTransaction(tx.serialize());

console.log("Submitted:", sig);

use solana_client::rpc_client::RpcClient;

use solana_sdk::{

signature::{Keypair, Signer},

transaction::VersionedTransaction,

};

use base64::Engine;

use serde::{Deserialize, Serialize};

#[derive(Serialize)]

struct CancelOrder {

#[serde(rename = "clientOrderId", skip_serializing_if = "Option::is_none")]

client_order_id: Option<u64>,

#[serde(rename = "sequenceNumber", skip_serializing_if = "Option::is_none")]

sequence_number: Option<u64>,

}

#[derive(Serialize)]

struct CancelOrdersRequest {

maker: String,

#[serde(rename = "baseMint")]

base_mint: String,

#[serde(rename = "quoteMint")]

quote_mint: String,

orders: Vec<CancelOrder>,

#[serde(rename = "computeUnitPrice")]

compute_unit_price: String,

}

#[derive(Deserialize)]

struct CancelledOrder {

#[serde(rename = "sequenceNumber")]

sequence_number: u64,

#[serde(rename = "clientOrderId")]

client_order_id: u64,

}

#[derive(Deserialize)]

struct CancelOrdersResponse {

transaction: String,

cancelled: Vec<CancelledOrder>,

}

fn main() -> Result<(), Box<dyn std::error::Error>> {

let rpc = RpcClient::new("https://api.mainnet-beta.solana.com");

let wallet = Keypair::new(); // load your keypair

// 1. Build the cancel transaction

let client = reqwest::blocking::Client::new();

let resp: CancelOrdersResponse = client

.delete("https://manifest-orders.fly.dev/v1/orders")

.json(&CancelOrdersRequest {

maker: wallet.pubkey().to_string(),

base_mint: "So11111111111111111111111111111111111111112".into(),

quote_mint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v".into(),

orders: vec![CancelOrder {

client_order_id: Some(1234567),

sequence_number: None,

}],

compute_unit_price: "auto".into(),

})

.send()?

.json()?;

println!("Cancelling {} orders", resp.cancelled.len());

// 2. Deserialize and sign

let tx_bytes = base64::engine::general_purpose::STANDARD

.decode(&resp.transaction)?;

let mut tx: VersionedTransaction = bincode::deserialize(&tx_bytes)?;

tx.try_sign(&[&wallet], *tx.message.recent_blockhash())?;

// 3. Send

let sig = rpc.send_transaction(&tx)?;

println!("Submitted: {sig}");

Ok(())

}

Request Body

{

"maker": "YourWalletPubkey...",

"baseMint": "So11111111111111111111111111111111111111112",

"quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",

"orders": [

{ "clientOrderId": 1234567 }

],

"computeUnitPrice": "auto"

}

Parameters

ParameterTypeRequiredDescription
makerstringYesBase58 public key of the wallet that owns the orders.
payerstringNoBase58 public key of the wallet paying for the transaction. Defaults to maker.
baseMintstringYesBase token mint address.
quoteMintstringYesQuote token mint address.
ordersarrayYesArray of order identifiers to cancel.
computeUnitPrice"auto" or numberNo"auto" targets 1000 lamports for transaction priority. A number sets the exact microLamports per CU. Omit to skip.

Order Identifier

Each order in the array must have either clientOrderId or sequenceNumber (or both):

FieldTypeDescription
clientOrderIdnumberCancel by client order ID. Resolved to sequence number via the wrapper.
sequenceNumbernumberCancel by exchange-assigned sequence number.
If both are provided, sequenceNumber takes precedence.

Success Response

{

"transaction": "AQAAAAAAAAAA...",

"requestId": "550e8400-e29b-41d4-a716-446655440000",

"cancelled": [

{

"sequenceNumber": 42100,

"clientOrderId": 1234567

}

]

}

FieldTypeDescription
transactionstringBase64-encoded VersionedTransaction. Sign with your wallet and submit. Uses Address Lookup Tables when available.
requestIdstringUUID for tracking this request.
cancelledarrayOrders that will be cancelled. Each includes both sequenceNumber and clientOrderId.
warningstring(Optional) Present when some requested orders were not found.

Error Response

{

"error": "orders not found",

"cause": "No open orders found with clientOrderId=9999",

"code": 404

}

FieldTypeDescription
errorstringShort error category.
causestringDetailed error message.
codenumberHTTP status code.

Validation Rules

Examples

# Cancel by client order ID

curl -X DELETE https://manifest-orders.fly.dev/v1/orders \

-H "Content-Type: application/json" \

-d '{

"maker": "YourWalletPubkey...",

"baseMint": "So11111111111111111111111111111111111111112",

"quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",

"orders": [

{ "clientOrderId": 1234567 }

],

"computeUnitPrice": "auto"

}'

# Cancel by sequence number

curl -X DELETE https://manifest-orders.fly.dev/v1/orders \

-H "Content-Type: application/json" \

-d '{

"maker": "YourWalletPubkey...",

"baseMint": "So11111111111111111111111111111111111111112",

"quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",

"orders": [

{ "sequenceNumber": 42100 }

],

"computeUnitPrice": "auto"

}'

# Mix both identifier types

curl -X DELETE https://manifest-orders.fly.dev/v1/orders \

-H "Content-Type: application/json" \

-d '{

"maker": "YourWalletPubkey...",

"baseMint": "So11111111111111111111111111111111111111112",

"quoteMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",

"orders": [

{ "clientOrderId": 1234567 },

{ "sequenceNumber": 42100 }

],

"computeUnitPrice": "auto"

}'