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
string
Optional chain identifier (
"base" or "bsc").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
PublicClient
required
Viem public client for reading from the blockchain
string
required
Chain identifier (
"base" or "bsc")string
required
Market ticker
string
required
Position side:
"yes" or "no"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
PublicClient
required
Viem public client for reading from the blockchain
string
required
ERC20 token contract address
string
required
Wallet address to check balance for
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
string
required
Position token contract address
string
required
Market ticker (used for token symbol)
string
required
Position side:
"yes" or "no"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