❌ Cancel Specific Order
Cancel a specific order by its order ID using the Forkast SDK with TypeScript examples, required parameters, and authentication details.
Cancels a single existing order by its order ID.
import { ForkastSDK, Network } from "@forkastgg/client";
const sdk = new ForkastSDK(Network.TESTNET, "YOUR_API_KEY");
const accountService = sdk.getAccountService();
const orderService = sdk.getOrderService();
const { accessToken } = await accountService.loginWithPrivateKey(
"YOUR_PRIVATE_KEY"
);
const result = await orderService.cancelOrder("ORDER_ID", accessToken);
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
orderId | string | Yes | Order Id from order response |
accessToken | string | Yes | Access Token received from login response |