XRP Ledger AMM APIs are now live!
API Categorization: Alpha (unstable API, expect changes)
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
- Trading and market making - Providing liquidity into AMMs make it easy to generate revenue on-chain
- 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:
- RLUSD
- 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 lpTokenIn
parameter.
References
- AMM Create
- XRP Ledger reference: https://xrpl.org/docs/references/protocol/transactions/types/ammcreate
- Palisade API reference: https://developers.palisade.co/reference/transactionsservice_submitammcreate
- AMM Deposit
- XRP Ledger reference: https://xrpl.org/docs/references/protocol/transactions/types/ammdeposit
- Palisade API reference: https://developers.palisade.co/reference/transactionsservice_submitammdeposit
- AMM Withdraw
- XRP Ledger reference: https://xrpl.org/docs/references/protocol/transactions/types/ammwithdraw
- Palisade API reference: https://developers.palisade.co/reference/transactionsservice_submitammwithdraw