Dexterity Typscript Scripts

A recolection of scripts that expose different ways to interact & fetch information from the Dexterity Protocol through the Typescript SDK

Index:

  1. Create TRG, Get TRGs, Deposit, Withdraw, Place Order

  2. Get all MPGs and their Products for each

  3. Orderbook

  4. Mark & Index Price

  5. Account info

  6. Instructions Bundle

Requirements:

Create a typescript project:

mkdir dexterity-project
cd dexterity-project
npm i typescript --save-dev
npx tsc --init

Install Dependencies:

npm install @solana/web3.js @hxronetwork/dexterity-ts @project-serum/anchor

Create a Solana Wallet and export your private/secret-key:

Send yourself some devnet SOL:

Send yourself some devnet UXDC to trade on Devnet:


Create TRG, Get TRGs, Deposit, Withdraw, Place Order:


Get all MPGs and Products for each:

Get all the MPGs for dexterity on the selected Solana network (mainnet, devenet or testnet) and each of their products


Orderbook:

Get Live Orderbook ASK & BID data for a given product in a given MPG


Mark & Index Price:

Fetch for Index & Mark prices for a desired product in a desired MPG


Account info:


Instructions Bundles

Last updated