REST API
Portfolio reads and signature-authorized cancellation.
Developers / 01
Confirm the active proxy, network and settlement token, load the checked-in ABI, then calculate fees from the contract rather than hard-coding historical values.
Arbitrum One chain ID is 42161.
Use the active proxy with StockTrading.json.
Read settlement token, factory, fee, asset fee and minimum fee.
Show spender and requested amount before ERC-20 approval.
const provider = new ethers.BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
const network = await provider.getNetwork();
if (network.chainId !== 42161n) throw new Error('Switch to Arbitrum One');
const trading = new ethers.Contract(TRADING_PROXY, STOCK_TRADING_ABI, signer);
const fee = await trading.calculateFee(orderValue, 1);
Portfolio reads and signature-authorized cancellation.
Functions, events, enums and downloads.