See the canonical spec:
.TypeScriptimport { Client, Wallet } from 'xrpl'; async function voteAMM(): Promise<void> { const client = new Client('wss://honeycluster.dev'); await client.connect(); const wallet = Wallet.fromSeed('s...'); const prepared = await client.autofill({ TransactionType: 'AMMVote', Account: wallet.address, Asset: { currency: 'USD', issuer: 'r...issuer', value: '0' }, Asset2: '0', TradingFee: 500, }); const signed = wallet.sign(prepared); const res = await client.submitAndWait(signed.tx_blob); console.log(res); await client.disconnect(); } voteAMM().catch(console.error);
| Field | Type | Required | Description |
|---|---|---|---|
Account | String | Yes | The address of the account voting on the AMM |
Asset | Object | Yes | The first asset in the AMM pool |
Asset2 | String/Object | Yes | The second asset in the AMM pool |
TradingFee | Number | Yes | The trading fee to vote for (in units of 1/100,000) |
Asset/Asset2:
For XRP: "0"
For issued currency: {"currency": "USD", "issuer": "r...", "value": "0"}
TradingFee:
Range: 0 to 1000
Represents 0% to 1% fee (e.g., 500 = 0.5%)
Must be a valid fee value for the AMM
Allows LP token holders to vote on AMM governance proposals
Voting power is proportional to LP token holdings
Used for decisions like fee changes and protocol upgrades
Always use autofill to set fees and sequence safely when using the XRPL client library