Minting & Burning
executeMintFlow
Withdraw position tokens from the exchange to your wallet as ERC-20 tokens.
Example
executeBurnFlow
Deposit position tokens from your wallet back to the exchange as tradeable positions.
Example
Token Queries
getCreatedTokens
Retrieve information about position tokens that have been created on-chain.
Parameters
Returns
List of created position tokens with their contract addresses and market information.Example
getPositionTokenAddress
Get the on-chain token address for a specific market position.
Parameters
Returns
Token address if the position has been minted,null otherwise.
Example
getTokenBalance
Get the balance of an ERC20 token for a specific address.
Parameters
Returns
Token balance as abigint. Position tokens have 0 decimals.
Example
Wallet Integration
addTokenToWallet
Add a position token to the user’s wallet (e.g., MetaMask).
Parameters
Returns
true if the user accepted the request, false otherwise.
Example
This method requires a browser environment with an injected Web3 wallet (like MetaMask). It will throw an error if called in a non-browser environment or if no wallet is detected.
Important Notes
- Token addresses are only available after positions have been minted on-chain
- Position tokens have 0 decimals - quantities represent whole tokens
- Token symbols are automatically generated from the market ID (first 7 chars) and side