openapi: 3.1.0 info: title: Mimic API description: |- Mimic API lets you execute on-chain wallet actions via signed intents, including transfers, swaps, bridges, lending, staking, and automated portfolio strategies such as DCA, stop-loss/take-profit, and rebalancing. Most actions follow a two-step flow: compute EIP-712 data to sign via `POST /{action}/prepare`, then submit the signature via `POST /{action}/{id}/execute` to execute it. license: name: Apache 2.0 url: https://www.apache.org/licenses/LICENSE-2.0.html version: 0.0.1-rc externalDocs: description: Find out more about Mimic. url: https://mimic.fi security: - ApiKeyAuth: [] tags: - name: General description: Query the chains and settler addresses supported by the API. - name: Tokens description: Query the tokens supported by the API and their prices. - name: Wallets management description: >- Create and manage wallets. For Safe wallets, compute EIP-712 data to sign via `POST /wallets/safe/prepare`, then submit the signature via `POST /wallets/safe/{id}/execute`. For custodial EOA wallets, create directly via `POST /wallets/eoa`. - name: Transfers description: >- Send tokens to a recipient. Compute EIP-712 data to sign via `POST /transfers/prepare`, then submit the signature via `POST /transfers/{id}/execute`. - name: Contract calls description: >- Execute arbitrary contract calls from a wallet. Compute EIP-712 data to sign via `POST /calls/prepare`, then submit the signature via `POST /calls/{id}/execute`. EOAs are not supported (unless they use proper EIP-7702 delegation). - name: Swap description: >- Single-chain and recurring swap-based actions. Compute EIP-712 data to sign via `POST /{action}/prepare`, then submit the signature via `POST /{action}/{id}/execute`. - name: Swaps x-parent: Swap description: >- Swap one token for another on a single chain. Compute EIP-712 data to sign via `POST /swaps/prepare`, then submit the signature via `POST /swaps/{id}/execute`. - name: DCA x-parent: Swap description: >- Recurring dollar-cost averaging strategy. Compute EIP-712 data to sign via `POST /dca/prepare`, which also returns an `id`, then submit the signature via `POST /dca/{id}/execute`. - name: Stop loss x-parent: Swap description: >- Monitor a token's exchange rate and swap it once it falls to or below a threshold. Compute EIP-712 data to sign via `POST /stop-loss/prepare`, then submit the signature via `POST /stop-loss/{id}/execute`. - name: Take profit x-parent: Swap description: >- Monitor a token's exchange rate and swap it once it rises to or above a threshold. Compute EIP-712 data to sign via `POST /take-profit/prepare`, then submit the signature via `POST /take-profit/{id}/execute`. - name: Limit order x-parent: Swap description: >- Swap a fixed amount of `tokenIn` for `tokenOut` once the market rate reaches or exceeds the requested `limitRate`. Compute EIP-712 data to sign via `POST /limit-order/prepare`, then submit the signature via `POST /limit-order/{id}/execute`. - name: Bridge description: >- Cross-chain token transfers. Compute EIP-712 data to sign via `POST /bridges/prepare`, then submit the signature via `POST /bridges/{id}/execute`. - name: Earn description: >- Lending, staking and yield strategies. Compute EIP-712 data to sign via `POST /{action}/prepare`, then submit the signature via `POST /{action}/{id}/execute`. - name: Lendings x-parent: Earn description: >- Deposit a token into a lending protocol to generate yield, or withdraw it. Compute EIP-712 data to sign via `POST /lendings/{action}/prepare`, then submit the signature via `POST /lendings/{action}/{id}/execute`. - name: Lending rebalancing x-parent: Earn description: >- Move a deposit to the highest-yielding of the selected lending protocols, either once or as a recurring strategy that keeps monitoring APY. Compute EIP-712 data to sign via `POST /lending-rebalancing/prepare`, then submit the signature via `POST /lending-rebalancing/{id}/execute`. - name: Stakings x-parent: Earn description: >- Deposit ETH into a staking protocol to generate yield, or unstake it. Compute EIP-712 data to sign via `POST /stakings/{action}/prepare`, then submit the signature via `POST /stakings/{action}/{id}/execute`. - name: Assets management description: >- Automated strategies that manage a portfolio over time. Compute EIP-712 data to sign via `POST /{action}/prepare`, then submit the signature via `POST /{action}/{id}/execute`. - name: Deposit splitting x-parent: Assets management description: >- A Safe wallet that accumulates incoming deposits of a given token and periodically splits the balance across one or more recipients. Compute EIP-712 data to sign via `POST /deposit-splitting/prepare`, then submit the signature via `POST /deposit-splitting/{id}/execute`. - name: Portfolio rebalancing x-parent: Assets management description: >- Rebalance a portfolio to target token allocations, either once or as a recurring strategy. Compute EIP-712 data to sign via `POST /portfolio-rebalancing/prepare`, then submit the signature via `POST /portfolio-rebalancing/{id}/execute`. - name: Stablecoin consolidation x-parent: Assets management description: >- Swap all tokens above a given USD threshold into a stablecoin, each swap in a separate transaction. Compute EIP-712 data to sign via `POST /stablecoin-consolidation/prepare`, then submit the signature via `POST /stablecoin-consolidation/{id}/execute`. paths: /chains: get: tags: - General description: Get supported chains. security: [] responses: '200': description: List of supported chains. content: application/json: schema: type: object required: - chains properties: chains: type: array items: type: object required: - id - name properties: id: allOf: - $ref: '#/components/schemas/Chain' description: >- Identifier used to reference this chain everywhere else in the API. name: type: string description: Human-readable chain name. example: Ethereum /settlers: get: tags: - General description: >- Get Mimic's smart contract address for each supported chain. This is the address a user's wallet must allow to move its funds when executing an action. security: [] responses: '200': description: List of settler addresses for all supported chains. content: application/json: schema: type: object required: - settlers properties: settlers: type: array items: $ref: '#/components/schemas/Settler' '400': $ref: '#/components/responses/BadRequest' /settlers/{chain}: get: tags: - General description: >- Get Mimic's smart contract address for a supported chain. This is the address a user's wallet must allow to move its funds when executing an action. security: [] parameters: - name: chain in: path required: true description: Chain for which to get the settler address. schema: $ref: '#/components/schemas/Chain' responses: '200': description: Settler address for the requested chain. content: application/json: schema: $ref: '#/components/schemas/Settler' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' /tokens: get: tags: - Tokens description: >- Returns the tokens supported by the API, optionally filtered by chain. security: [] parameters: - name: chains in: query required: false description: >- Only return tokens on these chains, as a comma-separated list. Omit to return tokens on every supported chain. style: form explode: false schema: type: array items: $ref: '#/components/schemas/Chain' example: 'ethereum,base' responses: '200': description: List of supported tokens. content: application/json: schema: type: object required: - tokens properties: tokens: type: array items: $ref: '#/components/schemas/Token' '400': $ref: '#/components/responses/BadRequest' /tokens/{address}: get: tags: - Tokens description: >- Returns information about a specific supported token, including its current USD price. parameters: - name: address in: path required: true description: Token contract address. schema: $ref: '#/components/schemas/Address' - name: chain in: query required: true description: >- Chain the token is on. schema: $ref: '#/components/schemas/Chain' responses: '200': description: The requested token, including its current USD price. content: application/json: schema: allOf: - $ref: '#/components/schemas/Token' - type: object required: - price properties: price: type: string description: >- Current token price in USD, as a decimal string. example: '1.0' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /wallets/eoa: post: tags: - Wallets management description: >- Create a new custodial EOA wallet, generating and storing a new keypair managed by Mimic. parameters: - $ref: '#/components/parameters/IdempotencyKey' requestBody: required: true content: application/json: schema: type: object required: - chain properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: >- Chain for which to create the wallet. externalId: $ref: '#/components/schemas/ExternalId' responses: '200': description: The newly created EOA wallet. content: application/json: schema: type: object required: - chain - address properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain this wallet was created for. address: allOf: - $ref: '#/components/schemas/Address' description: >- Address of the created EOA wallet, in the format used by the requested chain. externalId: $ref: '#/components/schemas/ExternalId' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '409': $ref: '#/components/responses/Conflict' get: tags: - Wallets management description: >- List the custodial EOA wallets created under the caller's account, optionally filtered by chain, address and/or externalId. parameters: - name: chain in: query required: false description: Only return wallets created for this chain. schema: $ref: '#/components/schemas/Chain' - name: address in: query required: false description: >- Only return wallets matching this address, if they belong to the caller's account. schema: $ref: '#/components/schemas/Address' - name: externalId in: query required: false description: >- Only return wallets matching this external identifier. schema: $ref: '#/components/schemas/ExternalId' responses: '200': description: List of EOA wallets. content: application/json: schema: type: object required: - wallets properties: wallets: type: array items: type: object required: - address - chain properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain this wallet was created for. address: allOf: - $ref: '#/components/schemas/Address' description: >- Address of the EOA wallet, in the format used by chain. externalId: $ref: '#/components/schemas/ExternalId' '401': $ref: '#/components/responses/Unauthorized' /wallets/safe/{id}/execute: post: tags: - Wallets management description: >- Submit the signature of the data obtained from `POST /wallets/safe/prepare` to create the Safe wallet. Call this before the `signBefore` deadline returned by `POST /wallets/safe/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /wallets/safe/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /wallets/safe/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /wallets/safe/prepare: post: tags: - Wallets management description: >- Computes EIP-712 data to be signed to create a new Safe wallet. Submit the resulting signature via `POST /wallets/safe`. requestBody: required: true content: application/json: schema: type: object required: - chain - owner properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain for which to create the wallet. owner: allOf: - $ref: '#/components/schemas/Address' description: Address that will own the Safe wallet. expectedAddress: allOf: - $ref: '#/components/schemas/Address' description: >- Use this field to create a wallet with the same address as one previously deployed on another chain. If the wallet already exists for the specified `owner` and `chain`, wallet creation is skipped. externalId: allOf: - $ref: '#/components/schemas/ExternalId' description: >- Use this field to reference a wallet by an ID from your own system, such as your user's ID. Not required to be unique. When used alongside `expectedAddress`, the request is rejected if the existing wallet already has a different `externalId`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /wallets/safe/{id}: get: tags: - Wallets management description: Get the status of a Safe wallet creation execution. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /wallets/safe/prepare`. responses: '200': description: Status of the wallet creation execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Present only when status is `succeeded`. walletAddress: allOf: - $ref: '#/components/schemas/Address' description: >- Address of the created wallet. Present only when status is `succeeded`. externalId: $ref: '#/components/schemas/ExternalId' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /wallets/{wallet}/balances: get: tags: - Wallets management description: Get the current balance of a specific token held by a wallet, on a specific chain. parameters: - name: wallet in: path required: true description: Wallet address to query. schema: $ref: '#/components/schemas/Address' - name: chain in: query required: true description: Chain to read the balance on. schema: $ref: '#/components/schemas/Chain' - name: token in: query required: true description: >- Token contract address. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. schema: $ref: '#/components/schemas/Address' responses: '200': description: Token balance. content: application/json: schema: type: object required: - amount properties: amount: type: string description: Token balance, as a decimal string. example: '10.5' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /transfers/{id}/execute: post: tags: - Transfers description: >- Submit the signature of the data obtained from `POST /transfers/prepare`, along with any required approvals, to transfer tokens from a wallet to a recipient. Call this before the `signBefore` deadline returned by `POST /transfers/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /transfers/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /transfers/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /transfers/prepare: post: tags: - Transfers description: >- Computes EIP-712 data to be signed to transfer tokens from a wallet to a recipient. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /transfers/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - token - amount - wallet - recipient properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the transfer will be executed. token: allOf: - $ref: '#/components/schemas/Address' description: Token to transfer. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. amount: type: string description: Amount of token to transfer, as a decimal string. example: '10.5' wallet: allOf: - $ref: '#/components/schemas/Address' description: Address from where the funds will be pulled. recipient: allOf: - $ref: '#/components/schemas/Address' description: Address that receives the tokens. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /transfers/{id}: get: tags: - Transfers description: Get the status of a transfer execution. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /transfers/prepare`. responses: '200': description: Status of the transfer execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Present only when status is `succeeded`. '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /calls/{id}/execute: post: tags: - Contract calls description: >- Submit the signature of the data obtained from `POST /calls/prepare` to execute one or more arbitrary contract calls from a wallet, atomically. Call this before the `signBefore` deadline returned by `POST /calls/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /calls/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /calls/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /calls/prepare: post: tags: - Contract calls description: >- Computes EIP-712 data to be signed to execute one or more arbitrary contract calls from a wallet, atomically. Submit the resulting signature via `POST /calls/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - wallet - calls properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the calls will be executed. wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address that executes the calls. EOAs are not supported (unless they use proper EIP-7702 delegation). description: type: string description: >- Human-readable label describing what the calls do. example: 'Approve USDC' calls: type: array description: >- Calls to execute, in order and atomically. If any call reverts, the whole batch reverts. minItems: 1 items: type: object required: - to - data properties: to: allOf: - $ref: '#/components/schemas/Address' description: Target contract address to call. data: allOf: - $ref: '#/components/schemas/HexString' description: ABI-encoded calldata for the call. value: allOf: - $ref: '#/components/schemas/BigInteger' description: >- Native token value to send with this call, in wei. Defaults to '0'. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /calls/{id}: get: tags: - Contract calls description: Get the status of contract calls execution. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /calls/prepare`. responses: '200': description: Status of the call execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Present only when status is `succeeded`. returnData: type: array description: >- Raw return data from each call, in the same order as the request's `calls`. Present only when status is `succeeded`. items: $ref: '#/components/schemas/HexString' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /swaps/{id}/execute: post: tags: - Swaps description: >- Submit the signature of the data obtained from `POST /swaps/prepare`, along with any required approvals, to execute the single-chain swap. Call this before the `signBefore` deadline returned by `POST /swaps/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /swaps/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /swaps/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /swaps/prepare: post: tags: - Swaps description: >- Computes EIP-712 data to be signed to create a single-chain swap operation. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /swaps/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - tokenIn - amount - tokenOut - wallet - slippageBps properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the swap will be executed. tokenIn: allOf: - $ref: '#/components/schemas/Address' description: Token to swap from. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. amount: type: string description: Amount of tokenIn to swap, as a decimal string. example: '0.05' tokenOut: allOf: - $ref: '#/components/schemas/Address' description: Token to swap to. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. wallet: allOf: - $ref: '#/components/schemas/Address' description: Address from where the funds will be pulled. slippageBps: $ref: '#/components/schemas/SlippageBps' recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the tokenOut. Defaults to `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /swaps/{id}: get: tags: - Swaps description: Get the status of a swap execution. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /swaps/prepare`. responses: '200': description: Status of the swap execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Present only when status is `succeeded`. amountOut: type: string description: >- Actual amount of tokenOut received. Present only when status is `succeeded`. '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /bridges/{id}/execute: post: tags: - Bridge description: >- Submit the signature of the data obtained from `POST /bridges/prepare`, along with any required approvals, to move a token from one chain to another. Call this before the `signBefore` deadline returned by `POST /bridges/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /bridges/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /bridges/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /bridges/prepare: post: tags: - Bridge description: >- Computes EIP-712 data to be signed to move a token from one chain to another. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /bridges/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - sourceChain - destinationChain - token - amount - wallet - slippageBps properties: sourceChain: allOf: - $ref: '#/components/schemas/Chain' description: Chain to bridge the token from. destinationChain: allOf: - $ref: '#/components/schemas/Chain' description: Chain to receive the token on. token: allOf: - $ref: '#/components/schemas/Address' description: Token to bridge. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. amount: type: string description: Amount of token to bridge, as a decimal string. example: '0.05' wallet: allOf: - $ref: '#/components/schemas/Address' description: Address from where the funds will be pulled. slippageBps: $ref: '#/components/schemas/SlippageBps' recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the token on destinationChain. Defaults to `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /bridges/{id}: get: tags: - Bridge description: Get the status of a bridge execution. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /bridges/prepare`. responses: '200': description: Status of the bridge execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash on sourceChain. Present only when status is `succeeded`. destinationTxHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash on destinationChain. Present only when status is `succeeded`. amountOut: type: string description: >- Actual amount of token received on destinationChain. Present only when status is `succeeded`. '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /lendings/deposit/{id}/execute: post: tags: - Lendings description: >- Submit the signature of the data obtained from `POST /lendings/deposit/prepare`, along with any required approvals, to deposit a token into a lending protocol to generate yield. Call this before the `signBefore` deadline returned by `POST /lendings/deposit/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /lendings/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lendings/deposit/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /lendings/deposit/prepare: post: tags: - Lendings description: >- Computes EIP-712 data to be signed to deposit a token into a lending protocol to generate yield. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /lendings/deposit/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - token - protocol - amount - wallet properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the deposit will be made. token: type: string description: Underlying token to lend. enum: - USDC - USDT protocol: type: string description: Lending protocol to deposit into. enum: - aave - compound - morpho - spark amount: type: string description: Amount of token to deposit, as a decimal string. example: '10.5' wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address from where the funds will be pulled and that receives the deposit position. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /lendings/withdraw/{id}/execute: post: tags: - Lendings description: >- Submit the signature of the data obtained from `POST /lendings/withdraw/prepare`, along with any required approvals, to withdraw a token from a lending protocol. Call this before the `signBefore` deadline returned by `POST /lendings/withdraw/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /lendings/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lendings/withdraw/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /lendings/withdraw/prepare: post: tags: - Lendings description: >- Computes EIP-712 data to be signed to withdraw a token from a lending protocol. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /lendings/withdraw/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - token - protocol - wallet oneOf: - title: By token amount required: - amount - title: By fraction of the position required: - balanceBps properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the position exists. token: type: string description: Underlying token to withdraw. enum: - USDC - USDT protocol: type: string description: Lending protocol to withdraw from. enum: - aave - compound - morpho - spark amount: type: string description: >- Amount of token to withdraw, as a decimal string. Exactly one of `amount` or `balanceBps` is required. To withdraw the whole balance, prefer `balanceBps` to avoid leaving dust behind. example: '10.5' balanceBps: type: integer description: >- Fraction of the position to withdraw, in basis points (e.g. 10000 = 100% (full exit), 5000 = 50%). Exactly one of `amount` or `balanceBps` is required. minimum: 0 maximum: 10000 example: 10000 wallet: allOf: - $ref: '#/components/schemas/Address' description: Address holding the position. recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the withdrawn token. Defaults to `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /lendings/{id}: get: tags: - Lendings description: >- Get the status of a lending deposit or withdrawal execution. parameters: - $ref: '#/components/parameters/ActionId' description: >- ID returned by `POST /lendings/deposit/prepare` or `POST /lendings/withdraw/prepare`. responses: '200': description: Status of the lending deposit or withdrawal execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Present only when status is `succeeded`. '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /lending-rebalancing/{id}/execute: post: tags: - Lending rebalancing description: >- Submit the signature of the data obtained from `POST /lending-rebalancing/prepare` to create the lending rebalancing strategy that moves a deposit to the highest-yielding of the selected lending protocols, either once or as a recurring strategy that keeps monitoring APY. Call this before the `signBefore` deadline returned by `POST /lending-rebalancing/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /lending-rebalancing/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /lending-rebalancing: get: tags: - Lending rebalancing description: >- List the lending rebalancing strategies created under the caller's account, optionally filtered by wallet. Read a single one via `GET /lending-rebalancing/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of lending rebalancing strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching lending rebalancing strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /lending-rebalancing/prepare: post: tags: - Lending rebalancing description: >- Computes EIP-712 data to be signed to move a deposit to the highest-yielding of the selected lending protocols, either once or as a recurring strategy that keeps monitoring APY. Submit the resulting signature via `POST /lending-rebalancing/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - token - protocols - rotationThresholdBps - wallet properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the rebalancing will take place. token: type: string description: Underlying token to lend. enum: - USDC - USDT protocols: type: array description: >- Lending protocols to consider when rotating. The highest-yielding pool for `token` on `chain` is resolved for each selected protocol. minItems: 1 items: type: string enum: - aave - compound - morpho - spark example: aave rotationThresholdBps: type: integer description: >- Minimum APY improvement required before rotating to a different pool, in basis points (e.g. 50 = 0.50%). minimum: 0 example: 50 wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address whose deposit is rebalanced — holds the funds and receives the output. EOAs are not supported (unless they use proper EIP-7702 delegation). startingPercentageBps: type: integer description: >- Percentage of the token balance to deposit on the first run, in basis points (e.g. 10000 = 100%). Defaults to 10000. minimum: 0 maximum: 10000 example: 10000 schedule: allOf: - $ref: '#/components/schemas/CronExpression' description: >- How often APY is checked and the position is rebalanced (if needed). Omit to rebalance once, immediately. endDate: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Timestamp after which the strategy stops executing. Only relevant when `schedule` is set. Omit for no end date. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /lending-rebalancing/{id}: get: tags: - Lending rebalancing description: >- Get the status of the lending rebalancing strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. responses: '200': description: >- Status of the lending rebalancing strategy. content: application/json: schema: allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' - type: object properties: currentProtocol: type: string description: Lending protocol the deposit currently sits in. enum: - aave - compound - morpho - spark example: aave currentApy: type: string description: >- Current APY of the deposit's pool, in percent, as a decimal string. example: '4.85' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /lending-rebalancing/{id}/executions: get: tags: - Lending rebalancing description: Get the most recent executions of the lending rebalancing strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. responses: '200': description: Most recent executions of the lending rebalancing strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: description: Status of a single execution of the strategy. allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: costUsd: type: string description: >- Fee actually paid for this execution, in USD, as a decimal string. Omitted while `status` is `pending`. example: '0.41' protocol: type: string description: >- Lending protocol the deposit was moved into during this execution. enum: - aave - compound - morpho - spark example: aave '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /lending-rebalancing/{id}/stop/execute: post: tags: - Lending rebalancing description: >- Submit the signature of the data obtained from `POST /lending-rebalancing/{id}/stop/prepare` to stop the lending rebalancing strategy. Once stopped, `GET /lending-rebalancing/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /lending-rebalancing/{id}/stop/prepare: post: tags: - Lending rebalancing description: >- Computes EIP-712 data to be signed to stop the lending rebalancing strategy. Submit the resulting signature via `POST /lending-rebalancing/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /lending-rebalancing/{id}/withdraw/{withdrawId}/execute: post: tags: - Lending rebalancing description: >- Submit the signature of the data obtained from `POST /lending-rebalancing/{id}/withdraw/prepare`, along with any required approvals, to withdraw from the position managed by the lending rebalancing strategy. Call this before the `signBefore` deadline returned by that endpoint. Past it the payload is no longer accepted. Withdrawing does not stop the strategy. Call `POST /lending-rebalancing/{id}/stop/execute` to stop it. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. - name: withdrawId in: path required: true description: >- ID returned by `POST /lending-rebalancing/{id}/withdraw/prepare`. schema: $ref: '#/components/schemas/UUID' requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /lending-rebalancing/{id}/withdraw/prepare: post: tags: - Lending rebalancing description: >- Computes EIP-712 data to be signed to withdraw from the position managed by the lending rebalancing strategy. The chain, token, protocol and wallet are taken from the strategy. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /lending-rebalancing/{id}/withdraw/{withdrawId}/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /lending-rebalancing/prepare`. requestBody: required: true content: application/json: schema: type: object required: oneOf: - title: By token amount required: - amount - title: By fraction of the position required: - balanceBps properties: amount: type: string description: >- Amount of token to withdraw, as a decimal string. Exactly one of `amount` or `balanceBps` is required. To withdraw the whole balance, prefer `balanceBps` to avoid leaving dust behind, since the position keeps accruing until execution. example: '10.5' balanceBps: type: integer description: >- Fraction of the position to withdraw, in basis points (e.g. 10000 = 100% (full exit), 5000 = 50%). Exactly one of `amount` or `balanceBps` is required. minimum: 0 maximum: 10000 example: 10000 recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the withdrawn token. Defaults to the strategy's `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /stakings/stake/{id}/execute: post: tags: - Stakings description: >- Submit the signature of the data obtained from `POST /stakings/stake/prepare`, along with any required approvals, to deposit ETH into a staking protocol to generate yield. Call this before the `signBefore` deadline returned by `POST /stakings/stake/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /stakings/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stakings/stake/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /stakings/stake/prepare: post: tags: - Stakings description: >- Computes EIP-712 data to be signed to deposit ETH into a staking protocol to generate yield. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /stakings/stake/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - token - protocol - amount - wallet properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the deposit will be made. token: type: string description: >- Underlying token to deposit. WETH is unwrapped to ETH before staking. enum: - ETH - WETH protocol: type: string description: Staking protocol to deposit into. enum: - lido - rocketpool - coinbase amount: type: string description: Amount of token to deposit, as a decimal string. example: '10.5' wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address from where the funds will be pulled and that receives the staking position. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /stakings/unstake/{id}/execute: post: tags: - Stakings description: >- Submit the signature of the data obtained from `POST /stakings/unstake/prepare`, along with any required approvals, to unstake ETH from a staking protocol. Call this before the `signBefore` deadline returned by `POST /stakings/unstake/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /stakings/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stakings/unstake/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /stakings/unstake/prepare: post: tags: - Stakings description: >- Computes EIP-712 data to be signed to unstake ETH from a staking protocol. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /stakings/unstake/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - token - protocol - wallet oneOf: - title: By token amount required: - amount - title: By fraction of the position required: - balanceBps properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the position exists. token: type: string description: >- Underlying token to receive. Choose WETH to receive wrapped ETH. enum: - ETH - WETH protocol: type: string description: Staking protocol to unstake from. enum: - lido - rocketpool - coinbase amount: type: string description: >- Amount of token to unstake, as a decimal string. Exactly one of `amount` or `balanceBps` is required. To unstake the whole balance, prefer `balanceBps` to avoid leaving dust behind. example: '10.5' balanceBps: type: integer description: >- Fraction of the position to unstake, in basis points (e.g. 10000 = 100% (full exit), 5000 = 50%). Exactly one of `amount` or `balanceBps` is required. minimum: 0 maximum: 10000 example: 10000 wallet: allOf: - $ref: '#/components/schemas/Address' description: Address holding the position. recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the withdrawn token. Defaults to `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /stakings/{id}: get: tags: - Stakings description: >- Get the status of a stake or unstake execution. parameters: - $ref: '#/components/parameters/ActionId' description: >- ID returned by `POST /stakings/stake/prepare` or `POST /stakings/unstake/prepare`. responses: '200': description: Status of the stake or unstake execution. content: application/json: schema: allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Present only when status is `succeeded`. '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /deposit-splitting/{id}/execute: post: tags: - Deposit splitting description: >- Submit the signature of the data obtained from `POST /deposit-splitting/prepare` to create the deposit splitting strategy: a Safe wallet that accumulates incoming deposits of a given token and periodically splits the balance across one or more recipients. Call this before the `signBefore` deadline returned by `POST /deposit-splitting/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /deposit-splitting/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /deposit-splitting/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /deposit-splitting: get: tags: - Deposit splitting description: >- List the deposit splitting strategies created under the caller's account, optionally filtered by wallet. Read a single one via `GET /deposit-splitting/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of deposit splitting strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching deposit splitting strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /deposit-splitting/prepare: post: tags: - Deposit splitting description: >- Computes EIP-712 data to be signed to create a deposit splitting strategy: a Safe wallet that accumulates incoming deposits of a given token and periodically splits the balance across one or more recipients. Submit the resulting signature via `POST /deposit-splitting/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - owner - token - allocations - schedule properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the Safe wallet will be created. owner: allOf: - $ref: '#/components/schemas/Address' description: >- Address that owns the Safe wallet and can update or cancel its redirection rule. token: allOf: - $ref: '#/components/schemas/Address' description: >- Token to redirect on deposit. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. Deposits of any other token are not redirected. allocations: type: array description: >- How the accumulated balance of token is split across recipients on each execution. `bps` values must sum to 10000 (100%). minItems: 1 items: type: object required: - recipient - bps properties: recipient: allOf: - $ref: '#/components/schemas/Address' description: Address to redirect a share of the balance to. bps: type: integer description: Share of the balance routed to this recipient, in basis points (e.g. 5000 = 50%). minimum: 0 maximum: 10000 example: 5000 schedule: allOf: - $ref: '#/components/schemas/CronExpression' description: How often the accumulated balance is split across recipients. endDate: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Timestamp after which the strategy stops executing. Omit for no end date. expectedAddress: allOf: - $ref: '#/components/schemas/Address' description: >- Use this field to create a Safe wallet with the same address as one previously deployed on another chain. If the wallet already exists for the specified `owner` and `chain`, wallet creation is skipped. externalId: allOf: - $ref: '#/components/schemas/ExternalId' description: >- Use this field to reference the created Safe wallet by an ID from your own system, such as your user's ID. Not required to be unique. When used alongside `expectedAddress`, the request is rejected if the existing wallet already has a different `externalId`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /deposit-splitting/{id}: get: tags: - Deposit splitting description: >- Get the status of the deposit splitting strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /deposit-splitting/prepare`. responses: '200': description: Status of the deposit splitting strategy. content: application/json: schema: allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: depositAddress: allOf: - $ref: '#/components/schemas/Address' description: Address of the created Safe wallet. externalId: $ref: '#/components/schemas/ExternalId' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /deposit-splitting/{id}/executions: get: tags: - Deposit splitting description: Get the most recent executions of the deposit splitting strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /deposit-splitting/prepare`. responses: '200': description: Most recent executions of the deposit splitting strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: description: Status of a single execution of the strategy. allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: transfers: type: array description: Amounts sent to each recipient during this execution. items: type: object required: - recipient - amount properties: recipient: allOf: - $ref: '#/components/schemas/Address' amount: type: string description: Amount sent to recipient, as a decimal string. example: '10.3' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /deposit-splitting/{id}/stop/execute: post: tags: - Deposit splitting description: >- Submit the signature of the data obtained from `POST /deposit-splitting/{id}/stop/prepare` to stop the deposit splitting strategy. Once stopped, `GET /deposit-splitting/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /deposit-splitting/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /deposit-splitting/{id}/stop/prepare: post: tags: - Deposit splitting description: >- Computes EIP-712 data to be signed to stop the deposit splitting strategy. Submit the resulting signature via `POST /deposit-splitting/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /deposit-splitting/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /dca: get: tags: - DCA description: >- List the DCA strategies created under the caller's account, optionally filtered by wallet. Read a single strategy via `GET /dca/{id}` to get portfolio information. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of DCA strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching DCA strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/DcaStrategy' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /dca/prepare: post: tags: - DCA description: >- Computes EIP-712 data to be signed to create a recurring DCA (dollar-cost averaging) strategy. Submit the resulting signature, along with a signature for each entry in `requiredApprovals` if any are returned, via `POST /dca/{id}/execute`, using the returned `id`. This response expires at `signBefore`. Past that, call `/dca/prepare` again for a fresh payload. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DcaInputs' responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /dca/{id}: get: tags: - DCA description: Get the status of the DCA strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /dca/prepare`. responses: '200': description: Status of the DCA strategy. content: application/json: schema: allOf: - $ref: '#/components/schemas/DcaStrategy' - type: object properties: portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' - type: object properties: totalSell: type: string description: >- Total amount of tokenIn spent across all executions, as a decimal string. example: '105.0' totalBuy: type: string description: >- Total amount of tokenOut received across all executions, as a decimal string. example: '0.031' averagePrice: type: string description: >- Average USD price paid per unit of tokenOut across all executions, as a decimal string. example: '3387.10' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /dca/{id}/execute: post: tags: - DCA description: >- Submit the signature of the data obtained from `POST /dca/prepare`, along with a signature for each `requiredApprovals` entry it returned, to create the recurring DCA (dollar-cost averaging) strategy. Call this before the `signBefore` deadline returned by `POST /dca/prepare`. Past it the payload becomes stale. Track the execution via `GET /dca/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /dca/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /dca/{id}/executions: get: tags: - DCA description: Get the most recent executions of the DCA strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /dca/prepare`. responses: '200': description: Most recent executions of the DCA strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: $ref: '#/components/schemas/StrategyExecution' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /dca/{id}/stop/execute: post: tags: - DCA description: >- Submit the signature of the data obtained from `POST /dca/{id}/stop/prepare` to stop the DCA strategy, optionally along with a signature for each `revocations` entry it returned. Once stopped, `GET /dca/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /dca/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /dca/{id}/stop/prepare: post: tags: - DCA description: >- Computes EIP-712 data to be signed to stop the DCA strategy, along with the transactions that remove the settler's allowance. Submit the resulting signature via `POST /dca/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /dca/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /stop-loss/{id}/execute: post: tags: - Stop loss description: >- Submit the signature of the data obtained from `POST /stop-loss/prepare` to create the stop-loss strategy that monitors a token's exchange rate and swaps it once it falls to or below a threshold. Call this before the `signBefore` deadline returned by `POST /stop-loss/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /stop-loss/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stop-loss/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /stop-loss: get: tags: - Stop loss description: >- List the stop-loss strategies created under the caller's account, optionally filtered by wallet. Read a single one via `GET /stop-loss/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of stop-loss strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching stop-loss strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /stop-loss/prepare: post: tags: - Stop loss description: >- Computes EIP-712 data to be signed to create a stop-loss strategy that monitors a token's exchange rate and swaps it once it falls to or below a threshold. Submit the resulting signature via `POST /stop-loss/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - tokenIn - tokenOut - stopLossRate - wallet - balanceBps - slippageBps properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the position exists. tokenIn: allOf: - $ref: '#/components/schemas/Address' description: Token being monitored and sold when the threshold is hit. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. tokenOut: allOf: - $ref: '#/components/schemas/Address' description: Token to receive after the swap. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. stopLossRate: type: string description: >- Amount of tokenOut received per unit of tokenIn, at or below which to trigger the swap. example: '0.00041' wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address whose balance is monitored and from where the funds will be pulled. EOAs are not supported (unless they use proper EIP-7702 delegation). balanceBps: type: integer description: >- Fraction of the tokenIn balance to swap, in basis points (e.g. 10000 = 100% (full balance), 3330 = 33.3%). minimum: 0 maximum: 10000 example: 10000 slippageBps: $ref: '#/components/schemas/SlippageBps' recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the tokenOut. Defaults to `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /stop-loss/{id}: get: tags: - Stop loss description: Get the status of the stop-loss strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stop-loss/prepare`. responses: '200': description: Status of the stop-loss strategy. content: application/json: schema: allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' - type: object properties: currentRate: type: string description: Current amount of tokenOut received per unit of tokenIn. example: '0.00039' stopLossRate: type: string description: Amount of tokenOut received per unit of tokenIn at or below which the swap triggers. example: '0.00041' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /stop-loss/{id}/executions: get: tags: - Stop loss description: Get the most recent executions of the stop-loss strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stop-loss/prepare`. responses: '200': description: Most recent executions of the stop-loss strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: $ref: '#/components/schemas/StrategyExecution' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /stop-loss/{id}/stop/execute: post: tags: - Stop loss description: >- Submit the signature of the data obtained from `POST /stop-loss/{id}/stop/prepare` to stop the stop-loss strategy. Once stopped, `GET /stop-loss/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stop-loss/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /stop-loss/{id}/stop/prepare: post: tags: - Stop loss description: >- Computes EIP-712 data to be signed to stop the stop-loss strategy. Submit the resulting signature via `POST /stop-loss/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stop-loss/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /take-profit/{id}/execute: post: tags: - Take profit description: >- Submit the signature of the data obtained from `POST /take-profit/prepare` to create the take-profit strategy that monitors a token's exchange rate and swaps it once it rises to or above a threshold. Call this before the `signBefore` deadline returned by `POST /take-profit/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /take-profit/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /take-profit/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /take-profit: get: tags: - Take profit description: >- List the take-profit strategies created under the caller's account, optionally filtered by wallet. Read a single one via `GET /take-profit/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of take-profit strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching take-profit strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /take-profit/prepare: post: tags: - Take profit description: >- Computes EIP-712 data to be signed to create a take-profit strategy that monitors a token's exchange rate and swaps it once it rises to or above a threshold. Submit the resulting signature via `POST /take-profit/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - tokenIn - tokenOut - takeProfitRate - wallet - balanceBps - slippageBps properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the position exists. tokenIn: allOf: - $ref: '#/components/schemas/Address' description: Token being monitored and sold when the threshold is hit. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. tokenOut: allOf: - $ref: '#/components/schemas/Address' description: Token to receive after the swap. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. takeProfitRate: type: string description: >- Amount of tokenOut received per unit of tokenIn, at or above which to trigger the swap. example: '0.00045' wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address whose balance is monitored and from where the funds will be pulled. EOAs are not supported (unless they use proper EIP-7702 delegation). balanceBps: type: integer description: >- Fraction of the tokenIn balance to swap, in basis points (e.g. 10000 = 100% (full balance), 3330 = 33.3%). minimum: 0 maximum: 10000 example: 10000 slippageBps: $ref: '#/components/schemas/SlippageBps' recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the tokenOut. Defaults to `wallet`. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /take-profit/{id}: get: tags: - Take profit description: Get the status of the take-profit strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /take-profit/prepare`. responses: '200': description: Status of the take-profit strategy. content: application/json: schema: allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' - type: object properties: currentRate: type: string description: Current amount of tokenOut received per unit of tokenIn. example: '0.00043' takeProfitRate: type: string description: Amount of tokenOut received per unit of tokenIn at or above which the swap triggers. example: '0.00045' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /take-profit/{id}/executions: get: tags: - Take profit description: Get the most recent executions of the take-profit strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /take-profit/prepare`. responses: '200': description: Most recent executions of the take-profit strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: $ref: '#/components/schemas/StrategyExecution' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /take-profit/{id}/stop/execute: post: tags: - Take profit description: >- Submit the signature of the data obtained from `POST /take-profit/{id}/stop/prepare` to stop the take-profit strategy. Once stopped, `GET /take-profit/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /take-profit/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /take-profit/{id}/stop/prepare: post: tags: - Take profit description: >- Computes EIP-712 data to be signed to stop the take-profit strategy. Submit the resulting signature via `POST /take-profit/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /take-profit/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /limit-order/{id}/execute: post: tags: - Limit order description: >- Submit the signature of the data obtained from `POST /limit-order/prepare` to create the limit order that swaps a fixed amount of tokenIn for tokenOut once the market rate reaches or exceeds the requested limitRate. Call this before the `signBefore` deadline returned by `POST /limit-order/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /limit-order/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /limit-order/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /limit-order: get: tags: - Limit order description: >- List the limit orders created under the caller's account, optionally filtered by wallet. Read a single one via `GET /limit-order/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of limit orders. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching limit orders. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /limit-order/prepare: post: tags: - Limit order description: >- Computes EIP-712 data to be signed to create a limit order that swaps a fixed amount of tokenIn for tokenOut once the market rate reaches or exceeds the requested limitRate. Submit the resulting signature via `POST /limit-order/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - tokenIn - tokenOut - amount - limitRate - wallet properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the swap will be executed. tokenIn: allOf: - $ref: '#/components/schemas/Address' description: Token to swap from. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. tokenOut: allOf: - $ref: '#/components/schemas/Address' description: Token to swap to. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. amount: type: string description: Amount of tokenIn to swap, as a decimal string. example: '0.05' limitRate: type: string description: >- Amount of tokenOut received per unit of tokenIn, at or above which to trigger the swap. example: '3000.0' wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address from where the funds will be pulled. EOAs are not supported (unless they use proper EIP-7702 delegation). recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the tokenOut. Defaults to `wallet`. expiresAt: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Timestamp after which the order is cancelled if it hasn't filled. Omit for no expiration. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /limit-order/{id}: get: tags: - Limit order description: Get the status of the limit order. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /limit-order/prepare`. responses: '200': description: Status of the limit order. content: application/json: schema: allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' - type: object properties: currentRate: type: string description: Current amount of tokenOut received per unit of tokenIn. example: '2950.0' limitRate: type: string description: Amount of tokenOut received per unit of tokenIn at or above which the order executes. example: '3000.0' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /limit-order/{id}/executions: get: tags: - Limit order description: Get the most recent executions of the limit order. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /limit-order/prepare`. responses: '200': description: Most recent executions of the limit order. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: $ref: '#/components/schemas/StrategyExecution' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /limit-order/{id}/stop/execute: post: tags: - Limit order description: >- Submit the signature of the data obtained from `POST /limit-order/{id}/stop/prepare` to stop the limit order. Once stopped, `GET /limit-order/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /limit-order/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /limit-order/{id}/stop/prepare: post: tags: - Limit order description: >- Computes EIP-712 data to be signed to stop the limit order. Submit the resulting signature via `POST /limit-order/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /limit-order/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /portfolio-rebalancing/{id}/execute: post: tags: - Portfolio rebalancing description: >- Submit the signature of the data obtained from `POST /portfolio-rebalancing/prepare` to create the portfolio rebalancing strategy that rebalances a portfolio to target token allocations, either once or as a recurring strategy. Call this before the `signBefore` deadline returned by `POST /portfolio-rebalancing/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /portfolio-rebalancing/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /portfolio-rebalancing/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /portfolio-rebalancing: get: tags: - Portfolio rebalancing description: >- List the portfolio rebalancing strategies created under the caller's account, optionally filtered by wallet. Read a single one via `GET /portfolio-rebalancing/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of portfolio rebalancing strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching portfolio rebalancing strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /portfolio-rebalancing/prepare: post: tags: - Portfolio rebalancing description: >- Computes EIP-712 data to be signed to rebalance a portfolio to target token allocations, either once or as a recurring strategy. Submit the resulting signature via `POST /portfolio-rebalancing/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - chain - allocations - wallet - slippageBps properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the portfolio exists. allocations: type: array description: >- Target allocation for each token. `targetBps` values must sum to 10000 (100%). minItems: 2 items: type: object required: - token - targetBps properties: token: allOf: - $ref: '#/components/schemas/Address' description: Token address. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. targetBps: type: integer description: Target share of the portfolio, in basis points (e.g. 5000 = 50%). minimum: 0 maximum: 10000 example: 5000 wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address whose portfolio is rebalanced — holds the funds and receives the output. EOAs are not supported (unless they use proper EIP-7702 delegation). slippageBps: $ref: '#/components/schemas/SlippageBps' driftToleranceBps: type: integer description: >- Minimum deviation from a token's target allocation required before it is rebalanced, in basis points (e.g. 100 = 1%). minimum: 0 maximum: 10000 example: 100 schedule: allOf: - $ref: '#/components/schemas/CronExpression' description: >- How often the portfolio is checked and rebalanced (if needed). Omit to rebalance once, immediately. endDate: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Timestamp after which the strategy stops executing. Only relevant when `schedule` is set. Omit for no end date. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /portfolio-rebalancing/{id}: get: tags: - Portfolio rebalancing description: >- Get the status of the portfolio rebalancing strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /portfolio-rebalancing/prepare`. responses: '200': description: >- Status of the portfolio rebalancing strategy. content: application/json: schema: allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' - type: object properties: currentAllocations: type: array description: >- Current share of the portfolio held in each token, alongside its target. items: type: object required: - token - targetBps - currentBps properties: token: allOf: - $ref: '#/components/schemas/Address' description: Token address. targetBps: type: integer description: Target share of the portfolio, in basis points (e.g. 5000 = 50%). minimum: 0 maximum: 10000 example: 5000 currentBps: type: integer description: Current share of the portfolio, in basis points (e.g. 5230 = 52.3%). minimum: 0 maximum: 10000 example: 5230 '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /portfolio-rebalancing/{id}/executions: get: tags: - Portfolio rebalancing description: Get the most recent executions of the portfolio rebalancing strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /portfolio-rebalancing/prepare`. responses: '200': description: Most recent executions of the portfolio rebalancing strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: $ref: '#/components/schemas/StrategyExecution' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /portfolio-rebalancing/{id}/stop/execute: post: tags: - Portfolio rebalancing description: >- Submit the signature of the data obtained from `POST /portfolio-rebalancing/{id}/stop/prepare` to stop the portfolio rebalancing strategy. Once stopped, `GET /portfolio-rebalancing/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /portfolio-rebalancing/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /portfolio-rebalancing/{id}/stop/prepare: post: tags: - Portfolio rebalancing description: >- Computes EIP-712 data to be signed to stop the portfolio rebalancing strategy. Submit the resulting signature via `POST /portfolio-rebalancing/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /portfolio-rebalancing/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /stablecoin-consolidation/{id}/execute: post: tags: - Stablecoin consolidation description: >- Submit the signature of the data obtained from `POST /stablecoin-consolidation/prepare` to create the stablecoin consolidation strategy that swaps all tokens above a given USD threshold into a stablecoin, each swap in a separate transaction. Call this before the `signBefore` deadline returned by `POST /stablecoin-consolidation/prepare`. Past it the payload is no longer accepted. Track the execution via `GET /stablecoin-consolidation/{id}`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stablecoin-consolidation/prepare`. requestBody: $ref: '#/components/requestBodies/SignatureSubmission' responses: '204': $ref: '#/components/responses/SignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/SignatureConflict' /stablecoin-consolidation: get: tags: - Stablecoin consolidation description: >- List the stablecoin consolidation strategies created under the caller's account, optionally filtered by wallet. Read a single one via `GET /stablecoin-consolidation/{id}` for its full status. parameters: - name: wallet in: query required: false description: Only return strategies for this wallet. schema: $ref: '#/components/schemas/Address' responses: '200': description: List of stablecoin consolidation strategies. content: application/json: schema: type: object required: - strategies properties: strategies: type: array description: >- Matching stablecoin consolidation strategies. Empty when the account has none, or none match `wallet`. items: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /stablecoin-consolidation/prepare: post: tags: - Stablecoin consolidation description: >- Computes EIP-712 data to be signed to swap all tokens above a given USD threshold into a stablecoin, each swap in a separate transaction. Submit the resulting signature via `POST /stablecoin-consolidation/{id}/execute`. requestBody: required: true content: application/json: schema: type: object required: - token - chain - minAmountUsd - wallet - slippageBps properties: token: type: string description: Stablecoin to consolidate all token balances into. enum: - USDC - USDT - DAI chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain to use to fetch tokens and consolidate to stablecoin. minAmountUsd: type: string description: >- Threshold for token balances to fetch, in USD, as a decimal string. example: '0.05' wallet: allOf: - $ref: '#/components/schemas/Address' description: >- Address whose balances are consolidated. EOAs are not supported (unless they use proper EIP-7702 delegation). slippageBps: $ref: '#/components/schemas/SlippageBps' schedule: allOf: - $ref: '#/components/schemas/CronExpression' description: >- How often to sweep balances into the stablecoin. Omit to run once, immediately. endDate: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Timestamp after which the strategy stops executing. Only relevant when `schedule` is set. Omit for no end date. responses: '200': $ref: '#/components/responses/ActionPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' /stablecoin-consolidation/{id}: get: tags: - Stablecoin consolidation description: >- Get the status of the stablecoin consolidation strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stablecoin-consolidation/prepare`. responses: '200': description: >- Status of the stablecoin consolidation strategy. content: application/json: schema: $ref: '#/components/schemas/StrategyStatus' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /stablecoin-consolidation/{id}/executions: get: tags: - Stablecoin consolidation description: Get the most recent executions of the stablecoin consolidation strategy. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stablecoin-consolidation/prepare`. responses: '200': description: Most recent executions of the stablecoin consolidation strategy. content: application/json: schema: type: object required: - executions properties: executions: type: array description: Most recent executions, ordered by timestamp descending. items: $ref: '#/components/schemas/StrategyExecution' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /stablecoin-consolidation/{id}/stop/execute: post: tags: - Stablecoin consolidation description: >- Submit the signature of the data obtained from `POST /stablecoin-consolidation/{id}/stop/prepare` to stop the stablecoin consolidation strategy. Once stopped, `GET /stablecoin-consolidation/{id}` reports `status` as `stopped`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stablecoin-consolidation/prepare`. requestBody: $ref: '#/components/requestBodies/StopSignatureSubmission' responses: '200': $ref: '#/components/responses/StopSignatureSubmitted' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/NothingToStopConflict' /stablecoin-consolidation/{id}/stop/prepare: post: tags: - Stablecoin consolidation description: >- Computes EIP-712 data to be signed to stop the stablecoin consolidation strategy. Submit the resulting signature via `POST /stablecoin-consolidation/{id}/stop/execute`. parameters: - $ref: '#/components/parameters/ActionId' description: ID returned by `POST /stablecoin-consolidation/prepare`. responses: '200': $ref: '#/components/responses/StopPrepared' '400': $ref: '#/components/responses/BadRequest' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: parameters: ActionId: name: id in: path required: true description: ID returned by `POST /{action}/prepare`. schema: $ref: '#/components/schemas/UUID' IdempotencyKey: name: Idempotency-Key in: header required: true description: >- Client-generated key that makes this request safe to retry. Retrying with the same key returns the original response, or processes the request if the original request failed. Use a value with enough entropy to be unique per request, such as a UUID v4. Keys are scoped to the caller's account and retained for 24 hours, after which the same key may be reused. Reusing a key with a different request body is rejected. schema: type: string maxLength: 255 example: 8f3a1c4e-2b7d-4a91-9c3e-15d8b0a7f6e2 requestBodies: SignatureSubmission: required: true content: application/json: schema: type: object required: - signature properties: signature: $ref: '#/components/schemas/TriggerSignature' signedApprovals: type: array description: >- Signed and RLP-encoded `approve()` transactions authorizing the token spend needed for this action, matching `requiredApprovals` entry in `/prepare` response. Omit or leave empty when `requiredApprovals` was empty. items: $ref: '#/components/schemas/HexString' signedPolicies: type: array description: >- EIP-712 signatures over the `policies` entries returned by `/prepare`, in the same order. Required whenever `policies` was not empty: without them the safeguards are never set and the request is rejected. items: $ref: '#/components/schemas/Signature' StopSignatureSubmission: required: true content: application/json: schema: type: object required: - signature properties: signature: $ref: '#/components/schemas/DeactivateTriggersSignature' signedRevocations: type: array description: >- Signed and RLP-encoded `approve()` transactions setting the settler's allowance back to zero, matching the `revocations` entries in the `/stop/prepare` response. Optional: the strategy stops either way, and omitting them leaves the existing allowance in place. items: $ref: '#/components/schemas/HexString' responses: ActionPrepared: description: >- EIP-712 data to be signed to create the action, along with the approvals and safeguards it requires. content: application/json: schema: type: object required: - id - signBefore - signaturePayload - executionCost - requiredApprovals - policies properties: id: allOf: - $ref: '#/components/schemas/UUID' description: >- ID for this action. Submit the signature via `POST /{action}/{id}/execute` and track its status via `GET /{action}/{id}`. signBefore: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Deadline for submitting the signature via `POST /{action}/{id}/execute`. Past it the payload is no longer accepted, and a fresh one must be requested from `POST /{action}/prepare`. signaturePayload: $ref: '#/components/schemas/TriggerSignaturePayload' executionCost: type: object description: Estimated cost per execution for this action. required: - estimatedUsdPerExecution - maxUsdPerExecution properties: estimatedUsdPerExecution: type: string description: >- Estimated fee for each on-chain transaction, in USD, as a decimal string. example: '0.42' maxUsdPerExecution: allOf: - $ref: '#/components/schemas/MaxFeeUsd' description: >- The maximum fee applied per execution, derived from `estimatedUsdPerExecution`. If the fee of a given execution would exceed this value, that execution is skipped. example: '0.6' requiredApprovals: type: array description: >- Raw `approve()` transactions authorizing the settler to spend the tokens this action moves, which must be signed and submitted alongside the action signature via `POST /{action}/{id}/execute`. Empty when no approvals are required. items: $ref: '#/components/schemas/TransactionRequest' policies: type: array description: >- EIP-712 payloads authorizing the safeguards that restrict what Mimic may do with this wallet. Each must be signed and submitted as `signedPolicies` via `POST /{action}/{id}/execute`. Empty when the wallet is already safeguarded. items: $ref: '#/components/schemas/SafeguardSignaturePayload' SignatureSubmitted: description: >- Signature submitted. Returned again when the same signature is resubmitted for this `id`, so a retry is always safe. StopPrepared: description: >- EIP-712 data to be signed to stop the strategy, and the transactions that remove the settler's allowance. content: application/json: schema: type: object required: - signaturePayload - revocations properties: signaturePayload: $ref: '#/components/schemas/DeactivateTriggersSignaturePayload' revocations: type: array description: >- Raw `approve()` transactions setting the settler's allowance back to zero, so no spending permission is left behind once the strategy is stopped. Signing and submitting them via `POST /{action}/{id}/stop/execute` is optional. Empty when there is no allowance to remove, and also when another strategy on the same wallet and token is still live — the allowance is shared, so zeroing it would stop that one from executing. items: $ref: '#/components/schemas/TransactionRequest' StopSignatureSubmitted: description: >- Signature submitted, with the outcome of any revocations that came with it. content: application/json: schema: type: object required: - revocations properties: revocations: type: array description: >- Outcome of each entry submitted in `signedRevocations`, in the same order. Empty when none were submitted. The strategy is stopped regardless of what these report, so a `failed` or `skipped` entry leaves the allowance in place without affecting the stop itself. items: type: object required: - status properties: status: type: string enum: - succeeded - failed - skipped description: Outcome of this revocation. x-enumDescriptions: succeeded: >- Confirmed on chain, the allowance is now zero. failed: >- Rejected when broadcast, reverted, or not confirmed in time. skipped: >- Not broadcast, because another strategy on the same wallet and token became live after `/stop/prepare` returned and still needs the allowance. txHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash. Absent when status is `skipped`, since nothing was broadcast. BadRequest: description: Bad request — invalid parameters or body. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Unauthorized — missing or invalid credentials. content: application/json: schema: $ref: '#/components/schemas/Error' Forbidden: description: Forbidden — caller is not allowed to access this resource. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: Resource not found. content: application/json: schema: $ref: '#/components/schemas/Error' Conflict: description: >- Conflict — the `Idempotency-Key` was reused with a different request body, or a request with the same key is still in flight. content: application/json: schema: $ref: '#/components/schemas/Error' SignatureConflict: description: >- Conflict — a different signature was already submitted for this `id`, or the signing window closed before this one arrived. content: application/json: schema: $ref: '#/components/schemas/Error' NothingToStopConflict: description: >- Conflict — the strategy has not been executed yet, so there is nothing to stop. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Address: type: string description: >- A valid address on the relevant chain. Format depends on the chain: 0x-prefixed 20-byte hex for EVM chains, base58 for other chains (e.g. Solana, Tron). example: '0x1234567890abcdef1234567890abcdef12345678' HexString: type: string description: An arbitrary 0x-prefixed hex string. example: '0xdeadbeef' Signature: type: string description: A 65-byte hex-encoded ECDSA signature (130 hex chars + 0x prefix). example: 0xabc...def UUID: type: string format: uuid description: >- Identifier for an action request, returned by `POST /{action}/prepare` and used to submit its signature and track its status. example: 550e8400-e29b-41d4-a716-446655440000 ExternalId: type: string description: >- Client-supplied identifier for a wallet. Use it to reference a wallet by an ID from your own system, such as your user's ID. maxLength: 128 example: user_12345 BigInteger: type: string description: A non-negative integer represented as a string. example: '1000000000000000000' CID: type: string description: An IPFS content identifier (CIDv0 or CIDv1 base32). example: QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco SemVer: type: string description: A semantic version string. example: 1.0.0 Timestamp: type: integer title: Unix timestamp (ms) description: Unix timestamp in milliseconds. example: 1700000000000 CronExpression: type: string title: Cron expression (UTC) description: >- A standard 5-field cron expression, in order: minute, hour, day of month, month, day of week. Evaluated in UTC. example: '0 0 * * *' MaxFeeUsd: type: string description: >- Maximum fee to cover the cost of each on-chain transaction, in USD, as a decimal string. A transaction whose fee would exceed this value is not executed. example: '0.5' SlippageBps: type: integer description: >- Maximum slippage to accept on the amount received, in basis points (e.g. 50 = 0.50%). minimum: 0 maximum: 10000 example: 50 Chain: type: string description: >- Identifier of a chain supported by the API. pattern: '^[a-z0-9-]+$' example: ethereum ChainId: type: integer description: >- Numeric EVM chain ID. Used only inside raw transactions and on-chain trigger payloads that must be signed with it; elsewhere the API identifies chains by `Chain`. example: 1 ExecutionStatus: type: object description: Status of an action execution. required: - status properties: status: type: string enum: - pending - succeeded - failed - skipped description: Status of this execution. x-enumDescriptions: pending: >- Still in flight — queued or submitted, but not yet resolved on chain. succeeded: >- Every intent in the execution completed successfully. failed: >- The execution was invalid, or at least one of its intents was discarded, expired or failed. skipped: >- The trigger fired but produced no intents, so nothing was submitted on chain. inputs: type: object description: Key-value map of the original request parameters. timestamp: allOf: - $ref: '#/components/schemas/Timestamp' description: Timestamp of the execution. logs: type: array description: Execution log messages. items: type: string error: type: string description: Error message. Present only when status is `failed`. Swap: type: object description: Single-chain or cross-chain swap that occurred during an execution. required: - sourceChain - destinationChain - tokenIn - tokenOut - amountIn - minAmountOut properties: sourceChain: allOf: - $ref: '#/components/schemas/Chain' description: Chain tokenIn was swapped from. destinationChain: allOf: - $ref: '#/components/schemas/Chain' description: >- Chain tokenOut was received on. Equal to sourceChain for a same-chain swap. tokenIn: allOf: - $ref: '#/components/schemas/Address' description: Token that was spent. tokenOut: allOf: - $ref: '#/components/schemas/Address' description: Token that was received. amountIn: type: string description: Amount of tokenIn spent, as a decimal string. example: '10.5' amountOut: type: string description: >- Actual amount of tokenOut received, as a decimal string. Read from the settlement transaction, so it is omitted until the swap has settled on chain. example: '10.3' minAmountOut: type: string description: >- Least amount of tokenOut the action would accept, as a decimal string. Derived from `slippageBps` when the action was signed, so it is always present and is a floor the settlement is guaranteed to have met. example: '10.1' txHash: allOf: - $ref: '#/components/schemas/HexString' description: Transaction hash on sourceChain. destinationTxHash: allOf: - $ref: '#/components/schemas/HexString' description: >- Transaction hash on destinationChain. Present only when destinationChain differs from sourceChain. PortfolioSnapshot: type: object description: Snapshot of token balances relevant to a strategy and their USD value. required: - timestamp - totalValueUsd - balances properties: timestamp: allOf: - $ref: '#/components/schemas/Timestamp' description: Timestamp the snapshot was taken. totalValueUsd: type: string description: Total USD value of balances, as a decimal string. example: '123456.78' balances: type: array description: Balance of each token relevant to the strategy. items: type: object required: - token - amount - valueUsd properties: token: allOf: - $ref: '#/components/schemas/Address' description: Token address. Use `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for native token. amount: type: string description: Token balance, as a decimal string. example: '10.5' valueUsd: type: string description: USD value of the balance, as a decimal string. example: '35245.67' StrategyStatus: type: object description: Status of a recurring assets management strategy. required: - id - status - maxUsdPerExecution properties: id: allOf: - $ref: '#/components/schemas/UUID' description: ID of this strategy. status: type: string enum: - pending - stale - active - stopped - ended description: Status of this strategy. x-enumDescriptions: pending: >- Prepared but its signature has not been submitted yet, so it has never executed. stale: >- The signature was not submitted before the `signBefore` deadline, so it will never execute. active: Running on schedule. stopped: Deactivated via `POST /{action}/{id}/stop/execute`. ended: Reached its end condition and will not execute again. inputs: type: object description: Key-value map of the original request parameters. nextExecution: allOf: - $ref: '#/components/schemas/Timestamp' description: >- Timestamp of the next scheduled execution. Omitted when `status` is not `active`. portfolio: allOf: - $ref: '#/components/schemas/PortfolioSnapshot' description: >- Current balances and information relevant to this strategy. maxUsdPerExecution: allOf: - $ref: '#/components/schemas/MaxFeeUsd' description: >- Maximum fee applied per execution, derived by `POST /{action}/prepare`. An execution whose fee would exceed this value is skipped. StrategyExecution: description: Status of a single execution of a recurring strategy. allOf: - $ref: '#/components/schemas/ExecutionStatus' - type: object properties: costUsd: type: string description: >- Fee actually paid for this execution, in USD, as a decimal string. Omitted while `status` is `pending`. example: '0.41' swaps: type: array description: Single-chain or cross-chain swaps that occurred during this execution. items: $ref: '#/components/schemas/Swap' DcaInputs: type: object description: Parameters that define a DCA strategy. required: - chain - tokenIn - tokenOut - amount - wallet - slippageBps - schedule properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain where the swap is executed. tokenIn: allOf: - $ref: '#/components/schemas/Address' description: Token spent on each execution. tokenOut: allOf: - $ref: '#/components/schemas/Address' description: Token accumulated. amount: type: string description: Amount of tokenIn spent per execution, as a decimal string. example: '10.5' wallet: allOf: - $ref: '#/components/schemas/Address' description: Address the funds are pulled from. slippageBps: $ref: '#/components/schemas/SlippageBps' schedule: allOf: - $ref: '#/components/schemas/CronExpression' description: How often the DCA swap executes. maxTotalAmount: type: string description: >- Maximum cumulative amount of tokenIn the strategy may spend across all executions, as a decimal string. The strategy stops after the last execution that fits within this limit. Omit for no limit. example: '1200.0' recipient: allOf: - $ref: '#/components/schemas/Address' description: >- Address that receives the tokenOut. Defaults to `wallet`. DcaStrategy: description: A DCA strategy and its current status. allOf: - $ref: '#/components/schemas/StrategyStatus' - type: object properties: inputs: $ref: '#/components/schemas/DcaInputs' Settler: type: object description: >- Mimic's smart contract authorized to move funds out of a user's wallet to execute the corresponding actions. required: - address - chain properties: address: $ref: '#/components/schemas/Address' chain: $ref: '#/components/schemas/Chain' Token: type: object description: A token supported by the API. required: - chain - address - symbol - name - decimals properties: chain: allOf: - $ref: '#/components/schemas/Chain' description: Chain the token is on. address: allOf: - $ref: '#/components/schemas/Address' description: Token contract address. symbol: type: string description: Token symbol. example: USDC name: type: string description: Token name. example: USD Coin decimals: type: integer description: Number of decimals the token uses. example: 6 logoURI: type: string format: uri description: URL of the token logo. example: https://assets.mimic.fi/tokens/usdc.png TriggerDomain: type: object required: - name - version properties: name: type: string example: Mimic Protocol - Registry version: type: string example: '1' SettlerDomain: type: object description: EIP-712 domain of the settler contract the safeguard is set on. required: - name - version - chainId - verifyingContract properties: name: type: string example: Mimic Protocol Settler version: type: string example: '1' chainId: allOf: - $ref: '#/components/schemas/ChainId' description: Chain of the settler this authorization applies to. verifyingContract: allOf: - $ref: '#/components/schemas/Address' description: Settler contract address. SafeguardSignaturePayload: type: object description: >- EIP-712 data to be signed to authorize the safeguards that restrict what Mimic may do with the wallet. The safeguard allows swaps that pay out to the wallet itself and denies every other kind of operation. required: - domain - primaryType - types - values properties: domain: $ref: '#/components/schemas/SettlerDomain' primaryType: type: string example: 'SafeguardAuthorization' types: type: object required: - SafeguardAuthorization properties: SafeguardAuthorization: type: array items: $ref: '#/components/schemas/TypedDataField' values: type: object required: - user - safeguard - nonce - deadline properties: user: allOf: - $ref: '#/components/schemas/Address' description: Wallet the safeguard belongs to. safeguard: allOf: - $ref: '#/components/schemas/HexString' description: Encoded safeguard configuration. nonce: allOf: - $ref: '#/components/schemas/BigInteger' description: Unique value preventing this authorization from being replayed. deadline: allOf: - $ref: '#/components/schemas/BigInteger' description: Unix timestamp in seconds by which the safeguard must be set. TriggerSignaturePayload: type: object description: EIP-712 data to be signed to authorize a function execution. required: - domain - primaryType - types - values properties: domain: $ref: '#/components/schemas/TriggerDomain' primaryType: type: string example: 'Trigger' types: $ref: '#/components/schemas/TriggerTypes' values: $ref: '#/components/schemas/TriggerTypedDataValues' TriggerSignature: type: object description: An EIP-712 signature over a TriggerSignaturePayload, submitted to authorize execution. required: - typedData - sig - signer properties: typedData: type: object required: - types - values properties: types: $ref: '#/components/schemas/TriggerTypes' values: $ref: '#/components/schemas/TriggerTypedDataValues' sig: allOf: - $ref: '#/components/schemas/Signature' description: EIP-712 signature over `typedData` by `signer`. signer: $ref: '#/components/schemas/Address' DeactivateTriggersTypes: type: object description: EIP-712 type definitions for the deactivation typed data. required: - DeactivateTriggers properties: DeactivateTriggers: type: array items: $ref: '#/components/schemas/TypedDataField' DeactivateTriggersValues: type: object required: - triggerSigs properties: triggerSigs: type: array description: >- Signatures identifying the triggers to deactivate. Contains the signature of the single strategy addressed by the request path. minItems: 1 items: $ref: '#/components/schemas/Signature' DeactivateTriggersSignaturePayload: type: object description: EIP-712 data to be signed to stop a strategy. required: - domain - primaryType - types - values properties: domain: $ref: '#/components/schemas/TriggerDomain' primaryType: type: string example: 'DeactivateTriggers' types: $ref: '#/components/schemas/DeactivateTriggersTypes' values: $ref: '#/components/schemas/DeactivateTriggersValues' DeactivateTriggersSignature: type: object description: >- An EIP-712 signature over a DeactivateTriggersSignaturePayload, submitted to authorize stopping a strategy. required: - typedData - sig - signer properties: typedData: type: object required: - types - values properties: types: $ref: '#/components/schemas/DeactivateTriggersTypes' values: $ref: '#/components/schemas/DeactivateTriggersValues' sig: allOf: - $ref: '#/components/schemas/Signature' description: EIP-712 signature over `typedData` by `signer`. signer: $ref: '#/components/schemas/Address' TransactionRequest: type: object description: An unsigned raw transaction that must be signed before it can be submitted. required: - chainId - from - to - nonce - data - value - gasLimit - maxFeePerGas - maxPriorityFeePerGas properties: chainId: allOf: - $ref: '#/components/schemas/ChainId' description: Chain ID this transaction must be signed and submitted on. from: allOf: - $ref: '#/components/schemas/Address' description: Address this transaction is sent from. to: allOf: - $ref: '#/components/schemas/Address' description: Token contract address to call. nonce: type: integer description: Account nonce to use for this transaction. example: 24 data: allOf: - $ref: '#/components/schemas/HexString' description: ABI-encoded calldata for `approve(spender, amount)`. value: allOf: - $ref: '#/components/schemas/BigInteger' description: Native token value to send with the transaction, in wei. Always `"0"`. example: '0' gasLimit: allOf: - $ref: '#/components/schemas/BigInteger' description: Gas limit for this transaction. example: '60000' maxFeePerGas: allOf: - $ref: '#/components/schemas/BigInteger' description: Maximum total fee per gas unit, in wei. example: '30000000000' maxPriorityFeePerGas: allOf: - $ref: '#/components/schemas/BigInteger' description: Maximum priority fee per gas unit, in wei. example: '1000000000' TriggerType: type: integer enum: - 0 - 1 - 2 description: Trigger execution mode. x-enumDescriptions: '0': Cron — fires on a recurring cron schedule. '1': Event — fires on an on-chain event. '2': Once — fires exactly once at a specific time. TriggerTypes: type: object required: - Input - Config - Trigger description: EIP-712 type definitions for the trigger's typed data. properties: Input: type: array items: $ref: '#/components/schemas/TypedDataField' Config: type: array items: $ref: '#/components/schemas/TypedDataField' Trigger: type: array items: $ref: '#/components/schemas/TypedDataField' TypedDataField: type: object required: - name - type properties: name: type: string type: type: string description: Solidity type or a custom type (`Token`, `TokenAmount`). TriggerTypedDataValues: type: object required: - functionCid - version - input - config - executionFeeLimit - minValidations properties: functionCid: $ref: '#/components/schemas/CID' version: $ref: '#/components/schemas/SemVer' input: type: object description: Key-value map matching the function's manifest input schema. config: $ref: '#/components/schemas/TriggerConfig' executionFeeLimit: allOf: - $ref: '#/components/schemas/BigInteger' description: Maximum fee (in protocol units) the signer accepts per execution. minValidations: type: integer example: 1 description: Minimum number of validator confirmations required. CronTriggerConfig: type: object required: - type - schedule - delta - endDate properties: type: type: integer enum: - 0 schedule: $ref: '#/components/schemas/CronExpression' delta: type: string description: A time delta string. example: '30m' endDate: $ref: '#/components/schemas/Timestamp' EventTriggerConfig: type: object required: - type - chain - contract - topics - delta - endDate properties: type: type: integer enum: - 1 chainId: $ref: '#/components/schemas/ChainId' contract: description: Contract address to filter events from, or `"any"` for any contract. oneOf: - $ref: '#/components/schemas/Address' - type: string enum: - any topics: type: array description: > Array of 1–4 topic groups. Each group is an OR filter; groups are AND-combined. minItems: 1 maxItems: 4 items: type: array items: $ref: '#/components/schemas/HexString' delta: type: string description: Time delta after the event before execution fires. endDate: $ref: '#/components/schemas/Timestamp' OnceTriggerConfig: type: object required: - type - startDate - delta - endDate properties: type: type: integer enum: - 2 startDate: $ref: '#/components/schemas/Timestamp' delta: type: string description: Duration window; `endDate` must equal `startDate + delta`. endDate: $ref: '#/components/schemas/Timestamp' TriggerConfig: description: > Trigger schedule configuration. Discriminated by the integer `type` field: `0` → CronTriggerConfig, `1` → EventTriggerConfig, `2` → OnceTriggerConfig. oneOf: - $ref: '#/components/schemas/CronTriggerConfig' - $ref: '#/components/schemas/EventTriggerConfig' - $ref: '#/components/schemas/OnceTriggerConfig' Error: type: object properties: message: type: string securitySchemes: ApiKeyAuth: type: apiKey in: header name: X-Api-Key description: >- API key for your Mimic account. Required for every operation except the public reference-data endpoints.