Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 745 Bytes

File metadata and controls

40 lines (27 loc) · 745 Bytes

Trigger API (Limit Order) - Get & Cancel Order(s)

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()).

Prerequisites

  • Node.js (v16 or higher)
  • npm (v10 or higher)
  • Solana Wallet Public Address
  • Helius RPC API Key
  • Solana Wallet Private Key

Usage

  1. Clone the repository
git clone https://github.com/Jupiter-DevRel/typescript-examples.git
  1. Navigate to the trigger/get-cancel-order directory
cd trigger/get-cancel-order
  1. Install the dependencies
npm install
  1. Run the script
npm run example