@storm-trade/sdk
TypeScript icon, indicating that this package has built-in type declarations

0.7.1 • Public • Published

Storm Trade Typescript SDK

Welcome to the TON Perpetual Futures SDK! This TypeScript-based software development kit (SDK) is designed to help developers build applications that interact with perpetual futures decentralized exchange (DEX) contracts on the TON blockchain. With this SDK, you'll be able to fetch data from these smart contracts and send transactions to the TON blockchain.

Note: Typescript usage is strongly recommended.

Key Features

  • TypeScript SDK: Leverage TypeScript for type safety and robustness in your development process.
  • Perpetual Futures DEX Interaction: Connect with perpetual futures DEX contracts on the TON blockchain to fetch real-time market data and place trades.
  • Transaction Packing and Sending: Prepare and broadcast transactions to the TON network, ensuring a seamless interaction experience.

Installation

Using NPM:

npm install @ton/core @ton/crypto @ton/ton @storm-trade/sdk

Using Yarn:

yarn add @ton/core @ton/crypto @ton/ton @storm-trade/sdk

Examples

Check out the following examples in the examples repo:

  1. increase-position.ts: Init sdk and prepare an increase (open) position tx.
  2. close-position.ts: Init sdk, fetch actual position data and prepare a close position tx.
  3. create-limit-order.ts: Set up SDK and prepare a limit or stop-limit order for sending to the blockchain.
  4. increase-position-sync.ts: More performant sdk usage with a synchronous tx preparation.
  5. market.ts: Fetching an actual market's data, funding, prices.
  6. position-manager.ts: Getting trader's position data: long/short positions, orders, pnl, marginRatio etc.
  7. send-with-mnemonic.ts: Prepare increase position tx, set up sdk and wallet with mnemonic, sing and send tx to the blockchain.
  8. ton-connect.ts: Prepare increase position tx, and send tx to the blockchain via TON Connect.

License

The TON Perpetual Futures SDK is open-source software released under the MIT License. For more information, see the LICENSE file.

Happy coding! 💻✨

Readme

Keywords

Package Sidebar

Install

npm i @storm-trade/sdk

Homepage

storm.tg

Weekly Downloads

45

Version

0.7.1

License

MIT

Unpacked Size

706 kB

Total Files

92

Last publish

Collaborators

  • stfy
  • eliseev_s
  • execc