samedaydesk-com De Fi API

The DeFi API from samedaydesk-com — 4 operation(s) for defi.

Operations 4

GET /defi/morpho-position Base address -> deterministic Morpho borrower position snapshot and… #
GET /defi/morpho-protection Base Morpho borrower -> exact partial-repay and add-collateral amounts for a… #
GET /defi/morpho-market-underwrite Base Morpho market -> deterministic underwriting facts: parameter integrity… #
GET /defi/morpho-preliquidation-replay Base transaction -> deterministic Morpho PreLiquidation replay: strict event… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/samedaydesk-com:samedaydesk-com-defi-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

samedaydesk-com-defi-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SameDayDesk machine commerce gateway De Fi API
  version: 1.23.55
  description: Deterministic agent APIs for web and company intelligence, repository security, agent-work economics, machine-service discoverability, payment preflight and settlement proof, wallet context, and Morpho decision evidence. Pay per call through Base x402, with a Circle Gateway Nanopayments path for gasless batched USDC.
  contact:
    email: contact@samedaydesk.com
    url: https://samedaydesk.com
  x-guidance: Choose the narrowest route that answers the task. Supply required query parameters, inspect the currently advertised HTTP 402 offers, enforce your own price and network policy, then retry the identical method, path, and query with one supported payment credential. Treat runtime payment challenges as authoritative.
servers:
- url: https://agents.samedaydesk.com
tags:
- name: DeFi
paths:
  /defi/morpho-position:
    get:
      summary: Base address -> deterministic Morpho borrower position snapshot and…
      parameters:
      - name: address
        in: query
        required: true
        schema:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
      - name: shocks
        in: query
        required: false
        description: Comma-separated collateral price shocks in percent, from -99 through 100.
        schema:
          type: string
          example: -10,-20,-30
      responses:
        '200':
          description: read-only Morpho position snapshot and deterministic stress scenarios
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  address:
                    type: string
                  chain:
                    type: object
                  fetchedAt:
                    type: string
                  latestIndexedAt:
                    type: string
                    nullable: true
                  positionCount:
                    type: integer
                  positions:
                    type: array
                  source:
                    type: object
                  boundary:
                    type: string
                required:
                - ok
                - address
                - chain
                - positionCount
                - positions
                - source
                - boundary
              example:
                ok: true
                address: '0x4352Cc849b33a936Ad93bB109aFDec1c89653b4f'
                chain:
                  id: 8453
                  name: Base mainnet
                positionCount: 1
                positions:
                - marketId: 0x...
                  risk:
                    currentLtvPct: 72
                    liquidationLtvPct: 86
                    healthFactor: 1.194
                    liquidatableAtIndexedState: false
                  scenarios:
                  - collateralPriceShockPct: -10
                    healthFactor: 1.075
                    liquidatable: false
                source:
                  indexed: Morpho API
                  directRpc: required before execution
                boundary: Read-only indexed observation; verify against direct RPC before execution.
        '402':
          description: payment required (x402, $0.02 USDC base)
      operationId: inspectMorphoPosition
      tags:
      - DeFi
      x-payment-info:
        operation:
          id: defi_morpho-position
          price: '20000'
          billingBasis: per-call
          supportedRails:
          - x402
        price:
          amount: '0.02'
          currency: USD
          mode: fixed
        protocols:
        - x402:
            asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
            network: eip155:8453
            scheme: exact
  /defi/morpho-protection:
    get:
      summary: Base Morpho borrower -> exact partial-repay and add-collateral amounts for a…
      parameters:
      - name: address
        in: query
        required: true
        schema:
          type: string
          pattern: ^0x[0-9a-fA-F]{40}$
      - name: targetHealthFactor
        in: query
        required: false
        description: Target Morpho health factor after the stress scenario.
        schema:
          type: number
          exclusiveMinimum: 1
          maximum: 5
          default: 1.25
      - name: protectAgainstShockPct
        in: query
        required: false
        description: Collateral-price shock percentage to withstand.
        schema:
          type: number
          minimum: -99
          maximum: 0
          default: -10
      - name: executionBufferBps
        in: query
        required: false
        description: Explicit amount buffer for debt accrual and integer rounding.
        schema:
          type: integer
          minimum: 0
          maximum: 500
          default: 25
      responses:
        '200':
          description: deterministic protection quote with unsigned transaction templates
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  product:
                    type: string
                    const: morpho-protection-quote
                  address:
                    type: string
                  inputs:
                    type: object
                  positionCount:
                    type: integer
                  actionableCount:
                    type: integer
                  unverifiedCount:
                    type: integer
                  quotes:
                    type: array
                  invariants:
                    type: object
                  boundary:
                    type: string
                required:
                - ok
                - product
                - address
                - inputs
                - positionCount
                - actionableCount
                - unverifiedCount
                - quotes
                - invariants
                - boundary
              example:
                ok: true
                product: morpho-protection-quote
                address: '0x4352Cc849b33a936Ad93bB109aFDec1c89653b4f'
                inputs:
                  targetHealthFactor: 1.25
                  protectAgainstShockPct: -10
                  executionBufferBps: 25
                positionCount: 1
                actionableCount: 1
                unverifiedCount: 0
                quotes:
                - status: protection_available
                  plans:
                  - id: partial_repay
                    amount: '125.4'
                    transactions:
                    - to: 0x...
                      value: '0'
                      data: 0x...
                invariants:
                  signing: none
                  broadcasting: none
                  custody: none
                boundary: Unsigned planning output only; re-verify state and simulate before execution.
        '400':
          description: invalid request, charged nothing
        '402':
          description: payment required (x402, $0.10 USDC base)
      operationId: planMorphoProtection
      tags:
      - DeFi
      x-payment-info:
        operation:
          id: defi_morpho-protection
          price: '100000'
          billingBasis: per-call
          supportedRails:
          - x402
        price:
          amount: '0.1'
          currency: USD
          mode: fixed
        protocols:
        - x402:
            asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
            network: eip155:8453
            scheme: exact
  /defi/morpho-market-underwrite:
    get:
      summary: 'Base Morpho market -> deterministic underwriting facts: parameter integrity…'
      parameters:
      - name: marketId
        in: query
        required: true
        description: Morpho market ID on Base mainnet.
        schema:
          type: string
          pattern: ^0x[0-9a-fA-F]{64}$
      responses:
        '200':
          description: deterministic multi-source Morpho market underwriting evidence
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  product:
                    type: string
                    const: morpho-market-underwrite
                  marketId:
                    type: string
                  chain:
                    type: object
                  market:
                    type: object
                  trailingApy:
                    type: object
                  history:
                    type: object
                  borrowers:
                    type: object
                  preLiquidation:
                    type: object
                  verification:
                    type: object
                  decisionChecks:
                    type: array
                  boundary:
                    type: string
                required:
                - ok
                - product
                - marketId
                - chain
                - market
                - borrowers
                - verification
                - decisionChecks
                - boundary
              example:
                ok: true
                product: morpho-market-underwrite
                marketId: 0x...
                chain:
                  id: 8453
                  name: Base mainnet
                market:
                  listed: true
                  state:
                    utilizationPct: 72
                    liquidityAssetsUsd: 500000
                borrowers:
                  totalCount: 24
                  concentration:
                    top1BorrowPct: 18
                    top5BorrowPct: 51
                  healthBands:
                    below1_05: 0
                verification:
                  marketParamsHashMatches: true
                  restMatchesGraphql: true
                  directRpc:
                    verdict: stored_state_exact_match
                decisionChecks:
                - id: market_params_integrity
                  status: pass
                boundary: Read-only underwriting evidence; not an allocation instruction or execution authorization.
        '400':
          description: invalid request, charged nothing
        '402':
          description: payment required (x402, $0.25 USDC base)
      operationId: underwriteMorphoMarket
      tags:
      - DeFi
      x-payment-info:
        operation:
          id: defi_morpho-market-underwrite
          price: '250000'
          billingBasis: per-call
          supportedRails:
          - x402
        price:
          amount: '0.25'
          currency: USD
          mode: fixed
        protocols:
        - x402:
            asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
            network: eip155:8453
            scheme: exact
  /defi/morpho-preliquidation-replay:
    get:
      summary: 'Base transaction -> deterministic Morpho PreLiquidation replay: strict event…'
      parameters:
      - name: transactionHash
        in: query
        required: true
        description: Successful Base transaction containing a Morpho PreLiquidate event.
        schema:
          type: string
          pattern: ^0x[0-9a-fA-F]{64}$
      responses:
        '200':
          description: historical deterministic Morpho PreLiquidation event replay
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  product:
                    type: string
                    const: morpho-preliquidation-replay
                  chain:
                    type: object
                  transaction:
                    type: object
                  eventCount:
                    type: integer
                  events:
                    type: array
                  verification:
                    type: object
                  boundary:
                    type: string
                required:
                - ok
                - product
                - chain
                - transaction
                - eventCount
                - events
                - verification
                - boundary
              example:
                ok: true
                product: morpho-preliquidation-replay
                chain:
                  id: 8453
                  name: Base mainnet
                transaction:
                  hash: 0x...
                  status: success
                  gasCostEth: '0.00014'
                eventCount: 1
                events:
                - assets:
                    repaid:
                      symbol: USDC
                      amount: '26.27'
                    seized:
                      symbol: cbBTC
                      amount: '0.000427'
                  grossEconomics:
                    incentiveInLoanAmount: '1.15'
                    incentivePct: 4.38
                verification:
                  receiptStatus: success
                  eventDecoded: true
                boundary: Historical deterministic replay; not a forward profit forecast or execution instruction.
        '400':
          description: invalid request, charged nothing
        '402':
          description: payment required (x402, $0.10 USDC base)
      operationId: replayMorphoPreLiquidation
      tags:
      - DeFi
      x-payment-info:
        operation:
          id: defi_morpho-preliquidation-replay
          price: '100000'
          billingBasis: per-call
          supportedRails:
          - x402
        price:
          amount: '0.1'
          currency: USD
          mode: fixed
        protocols:
        - x402:
            asset: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
            network: eip155:8453
            scheme: exact
x-service-info:
  categories:
  - agentic-payments
  - machine-commerce
  - data
  - defi
  docs:
    extractionTrial: https://agents.samedaydesk.com/.well-known/extraction-trial
    apiReference: https://agents.samedaydesk.com/openapi.json
    homepage: https://agents.samedaydesk.com
    llms: https://agents.samedaydesk.com/llms.txt
    buyerPolicyReference: https://github.com/epistemedeus/agent-payment-policy
    purchaseEvidence: https://agents.samedaydesk.com/.well-known/agent-payment-evidence.json
    callerResultClient: https://neomorphic.io/downloads/samedaydesk-caller-result/0.1.2/descriptor.json
    callerResultArchive: https://neomorphic.io/downloads/samedaydesk-caller-result/0.1.2/samedaydesk-caller-result-0.1.2.tar.gz
  callerResultClient:
    schema: samedaydesk.caller-result-client.v1
    name: samedaydesk-caller-result
    version: 0.1.2
    license: MIT
    optional: true
    charged: false
    paymentRequired: false
    npmPublished: false
    nodeMinimum: 22.12.0
    archiveUrl: https://neomorphic.io/downloads/samedaydesk-caller-result/0.1.2/samedaydesk-caller-result-0.1.2.tar.gz
    sha256: df8cf4e24d437a0d49779cd2fee87b8145c6c8cb171a0b9f68b1c1a2195c322c
    descriptorUrl: https://neomorphic.io/downloads/samedaydesk-caller-result/0.1.2/descriptor.json
    sourceUrl: https://github.com/epistemedeus/x402-url-extractor/tree/f8b939c5dc7a66d59b2b2d6358f3158dfa56d542/caller-result-client
    sdk:
      '@modelcontextprotocol/sdk': 1.30.0
      '@x402/mcp': 2.16.0
    install:
    - mkdir samedaydesk-caller-result
    - tar -xzf samedaydesk-caller-result-0.1.2.tar.gz -C samedaydesk-caller-result
    - cd samedaydesk-caller-result
    - npm ci --ignore-scripts
    modules:
      mcp:
        exportName: bindPaidMcpCallerResult
        specifier: ./src/mcp-caller-result.mjs
        packageExport: samedaydesk-caller-result/mcp
      http:
        exportNames:
        - bindCallerResultFeedback
        - reportCallerResult
        specifier: ./src/http-caller-result.mjs
        packageExport: samedaydesk-caller-result/http
      recovery:
        exportNames:
        - startPaidMcpResult
        - resumePaidMcpResult
        specifier: ./src/mcp-recovery.mjs
        packageExport: samedaydesk-caller-result/recovery
        bin: bin/recover-mcp.mjs
      continuation:
        exportNames:
        - discoverHttpNextActions
        - discoverSdkNextActions
        - retrieveEntitledHttp
        specifier: ./src/continuation.mjs
        packageExport: samedaydesk-caller-result/continuation
    feedback:
      optional: true
      charged: false
      usefulness: unknown
      dispositions:
      - useful
      - not_useful
      http:
        method: POST
        path: /commerce/caller-result-feedback
        header: x-samedaydesk-caller-result-feedback
        schema: samedaydesk.caller-result-feedback.v1
      mcp:
        tool: report_caller_result
        method: tools/call
        metaKey: samedaydesk/mcp-caller-result
        schema: samedaydesk.caller-result-feedback.mcp.v1
        wrapperOmitsMeta: true
    feedbackArchive:
      version: 0.1.0
      archiveUrl: https://neomorphic.io/downloads/samedaydesk-caller-result/0.1.0/samedaydesk-caller-result-0.1.0.tar.gz
      sha256: 3c134598697aadb038a98bfee4ad6e82472df34d3fa325e19507a33ed5dc974b
      containsRecovery: false
      relativePath: caller-result-client/export/public/bytes/samedaydesk-caller-result/0.1.0/samedaydesk-caller-result-0.1.0.tar.gz
    nextAction: Download the current archive, verify sha256, unpack with the install lines, and import bindPaidMcpCallerResult. Optional recovery of an already authorized paid result imports startPaidMcpResult and resumePaidMcpResult from samedaydesk-caller-result/recovery, or runs node bin/recover-mcp.mjs in a second process. The 0.1.0 archive is feedback only. Report useful or not_useful only when you choose. Skipping the statement leaves the purchase.