This is a basic TypeScript example showing how to interact with the Polynomial Perpetuals platform.
It includes simple functions to fetch market/account data and place a market order using Nitro Mode API with session key signing.
Polynomial Trade offers a built-in affiliate rewards system to incentivize integrations. As a developer, you can onboard users through your unique referral code and start earning immediately.
You’ll receive:
- 10% of AMM fees generated by your referred users
- 20% of their trading points
🔗 Learn more: Affiliate Documentation
🎯 Generate your referral code: Referral Code Tool
🛠 Join the program: Raise a ticket on Discord
- Fetch market and account info
- Simulate post-order details
- Sign and place a Nitro Mode market order
- Minimal error handling and structure for quick experimentation
Clone the repo and install dependencies:
npm install
Replace placeholder values like SESSION_KEY and WALLET_ADDRESS in the example scripts.
Run the main example:
npm run dev
- This is not production-ready.
- Session keys are used directly in code for simplicity.
- Order signing uses EIP-712 and viem’s wallet utilities.
- For more details on the API, refer to API Documentation.
- For queries, issues or feature requests, please open a ticket on the Discord.