/** * @example * { * from_token: "usd", * to_token: "cad" * } */ export interface CreateSwapsRequest { /** Business account that makes the swap, prefixed `biz_`. Provide this or `user_id`. */ account_id?: string; /** Source token amount. Required for a crypto pair: a decimal amount, or `all` to swap the whole from_token balance in the account's wallet, read from the chain when the swap is created (any token but USDT). An amount above that balance is rejected when the balance can be read. For fiat pairs: the amount of from_token to convert at the mid-market rate; omit (along with to_amount) to repay the full negative to_token balance instead. */ amount?: string | null; /** Source chain name or chain ID. Defaults to the source token's chain when omitted. */ from_chain?: CreateSwapsRequest.FromChain | null; /** Source token contract address or ticker symbol, such as "USDT". */ from_token: string; /** Maximum slippage tolerance in basis points. */ slippage_bps?: number | null; /** Fiat pairs only: sizes a partial repayment of the negative to_token balance, denominated in to_token. Must not exceed the debt. Mutually exclusive with amount. */ to_amount?: string | null; /** Destination chain name or chain ID. Defaults to the destination token's chain when omitted. */ to_chain?: CreateSwapsRequest.ToChain | null; /** Destination token contract address or ticker symbol, such as "XAUT". */ to_token: string; /** The caller's own user ID, prefixed `user_`, to swap in their personal account. Provide this or `account_id`. */ user_id?: string; } export declare namespace CreateSwapsRequest { /** * Source chain name or chain ID. Defaults to the source token's chain when omitted. */ type FromChain = string | number; /** * Destination chain name or chain ID. Defaults to the destination token's chain when omitted. */ type ToChain = string | number; }