# XRP Ledger AMM APIs are now live!

Alpha
API Categorization: Alpha (unstable API, expect changes).

Wallet-as-a-Service (Palisade) brings deeper integration into the XRP ledger through our latest AMM APIs. These APIs allow customers to programmatically interact with AMMs on the XRP Ledger.

## Use-cases

1. Trading and market making - Providing liquidity into AMMs makes it easy to generate revenue on-chain.
2. Asset Tokenization - XRP’s AMMs make it easy to provide liquidity on-chain, enabling token issuers to facilitate trades using the built-in DEX.


## Security considerations

Transactions initiated using AMM APIs are subject to the same policy engine rules. Since `AMMCreate` and `AMMDeposit` result in multiple assets being withdrawn from the wallet, the policy engine will expect policies to be defined for each affected asset.

For example, if an `AMMDeposit` transaction is depositing into a `RLUSD/USD` pool, the policy engine will require the policies to be defined for the following assets:

1. RLUSD.
2. USD.


Note that issuer must be defined in the policy for issued assets such as above.

## Limitations

AMM APIs are available on XRP Ledger only.

## AMM Deposit

### Summary

AMM Deposit is only supported in two-asset mode. Depositing using a single asset into a two-asset pool is currently unsupported.

### Unsupported modes

The request parameter `lpTokenOut` is not yet supported.

Flag `DEPOSIT_SINGLE_ASSET` is not supported.

The request parameter `amount2` must be specified.

## AMM Withdraw

### Summary

AMM Withdraw only supports withdrawing assets by specifying `lpTokenIn` in the request parameter. Withdrawing assets by specifying the assets to withdraw individually or singularly is currently unsupported.

### Unsupported modes

The request parameter must specify the `lpTokenIn` parameter.

## References

* AMM Create
  * XRP Ledger reference: [https://xrpl.org/docs/references/protocol/transactions/types/ammcreate](https://xrpl.org/docs/references/protocol/transactions/types/ammcreate)
  * Wallet-as-a-Service (Palisade) API reference: [Wallet-as-a-Service (Palisade) API](/products/wallet/api-docs/palisade-api/palisade-api)
* AMM Deposit
  * XRP Ledger reference: [https://xrpl.org/docs/references/protocol/transactions/types/ammdeposit](https://xrpl.org/docs/references/protocol/transactions/types/ammdeposit)
  * Wallet-as-a-Service (Palisade) API reference: [Wallet-as-a-Service (Palisade) API](/products/wallet/api-docs/palisade-api/palisade-api)
* AMM Withdraw
  * XRP Ledger reference: [https://xrpl.org/docs/references/protocol/transactions/types/ammwithdraw](https://xrpl.org/docs/references/protocol/transactions/types/ammwithdraw)
  * Wallet-as-a-Service (Palisade) API reference: [Wallet-as-a-Service (Palisade) API](/products/wallet/api-docs/palisade-api/palisade-api)