flash_loan
Marginfi flash loan for arbitrage (non-custodial, atomic).
instructions are JSON ix executed between borrow + repay legs. Returns a single UNSIGNED base64 tx that reverts unless repaid in-transaction. The borrowed token is authenticity-verified first; set allow_unverified=true to borrow an unverified mint at your own risk. Past the daily free tier an x402 payment_header is required.
idempotency_key (optional): a client-generated UUID.
Retrying with the same key + same args replays the original result instead
of re-issuing the flash loan tx.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | ||
| amount | Yes | ||
| caller_id | No | ||
| instructions | Yes | ||
| pay_in_crank | No | ||
| payment_header | No | ||
| wallet_address | Yes | ||
| idempotency_key | No | ||
| allow_unverified | No | ||
| marginfi_account | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||