This scripts shows how to use the V1 Trigger API and get all trigger orders and either:
- Cancel the first order in the list (
getAndCancelOrder()). - Cancel all orders in a single transaction (
getAndCancelMultipleOrders()).
- Node.js (v16 or higher)
- npm (v10 or higher)
- Solana Wallet Public Address
- Helius RPC API Key
- Solana Wallet Private Key
- Clone the repository
git clone https://github.com/Jupiter-DevRel/typescript-examples.git- Navigate to the
trigger/get-cancel-orderdirectory
cd trigger/get-cancel-order- Install the dependencies
npm install- Run the script
npm run example