Skip to content

storm-trade/sdk-raw-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Storm Trade SDK Examples

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 project examples folder:

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published