Bot SDK

Calculate prices and execute buy/sell and mint transactions via the Moonit SDK

ℹ️

Join our developer TG channel for updates

Overview

The Moonit SDK provides the following functions :

  • Make full use of all features for our two curve options: standard and flat curves
  • Mint a Token
  • Retrieve Token Price & Position on Bonding Curve
  • Calculate Collateral & Token Flow (In/Out)
  • Execute Buy & Sell Transactions (both Exact In and Exact Out)

Installation


🧰

npm: @moonit/sdk

Example Code

🐙

GitHub - gomoonit/moonit-bot-examples: Examples for using the official SDK

ℹ️

The buy and sell instructions are also available on-chain via the Smart Contract and accessible through CPI (Cross-Program Invocation).

Migration from @wen-moon-ser/moonshot-sdk

If you are using the old moonshot-sdk there is a simple way to migrate to @moonit/sdk as the packages are compatible.

Replace the dependency @wen-moon-ser/moonshot-sdk with @moonit/sdk and update all Moonshot class imports with Moonit. Example: