Tristero Quotes API

Request quotes for swaps and margin positions

Operations 2

POST /quotes Get a spot swap quote #
POST /quotes/margin Get a margin quote #

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/tristero-quotes-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

tristero-quotes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Tristero Assets Quotes API
  description: Tristero is a cross-chain trading protocol supporting spot swaps, margin positions, and feather (UTXO-based) swaps. This API provides endpoints for requesting quotes, submitting orders, managing margin positions, and real-time updates via WebSocket.
  version: 2.0.0
  contact:
    name: Tristero Support
    url: https://tristero.com
servers:
- url: https://api.tristero.com/v2
  description: Production
- url: https://staging-api.tristero.com/v2
  description: Staging
- url: http://localhost:8060
  description: Local (Quoter)
- url: http://localhost:8070
  description: Local (Filler)
security:
- ApiKeyAuth: []
tags:
- name: Quotes
  description: Request quotes for swaps and margin positions
paths:
  /quotes:
    post:
      tags:
      - Quotes
      summary: Get a spot swap quote
      description: Request a quote for a cross-chain spot swap. Returns order parameters that can be signed and submitted.
      operationId: getQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
            examples:
              arbitrum-usdc-to-base-usdt:
                summary: Arbitrum USDC to Base USDT
                value:
                  src_chain_id: '42161'
                  src_token_address: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
                  src_token_quantity: '1000000'
                  src_wallet_address: 0x...
                  dst_chain_id: '8453'
                  dst_token_address: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2'
                  dst_wallet_address: 0x...
      responses:
        '200':
          description: Quote response with order data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Unprocessable - route not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /quotes/margin:
    post:
      tags:
      - Quotes
      summary: Get a margin quote
      description: Request a quote for opening a leveraged margin position. Any token can be used as collateral.
      operationId: getMarginQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MarginQuoteRequest'
            examples:
              2x-long-weth:
                summary: 2x Long WETH with USDC collateral
                value:
                  chain_id: '42161'
                  wallet_address: 0x...
                  collateral_token: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
                  base_token: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1'
                  leverage_ratio: 2
                  collateral_amount: '1000000'
      responses:
        '200':
          description: Margin quote response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarginQuoteResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    OrderParameters:
      type: object
      properties:
        src_asset:
          type: string
          description: Source token address
        dst_asset:
          type: string
          description: Destination token address
        src_quantity:
          type: string
          description: Source amount
        dst_quantity:
          type: string
          description: Expected destination amount
        min_quantity:
          type: string
          description: Minimum acceptable output (slippage protection)
        dark_salt:
          type: string
          description: Random salt for order uniqueness
    OrderData:
      type: object
      properties:
        parameters:
          $ref: '#/components/schemas/OrderParameters'
        deadline:
          type: integer
          description: Unix timestamp deadline
        router_address:
          type: string
          description: Router contract address
        filler_wallet_address:
          type: string
          description: Filler wallet address
        order_type:
          type: string
          enum:
          - FEATHER
          - PERMIT2
          - MARGIN
        custom_data:
          type: array
          items:
            type: string
            format: binary
    TokenInfo:
      type: object
      properties:
        chain_id:
          type: integer
        address:
          type: string
        symbol:
          type: string
        decimals:
          type: integer
    MarginQuoteRequest:
      type: object
      required:
      - chain_id
      - wallet_address
      - collateral_token
      - base_token
      - leverage_ratio
      - collateral_amount
      properties:
        chain_id:
          type: string
          description: Chain ID where position will be opened
          example: '42161'
        wallet_address:
          type: string
          description: User's wallet address
          example: 0x...
        collateral_token:
          type: string
          description: Collateral token address (any ERC20, e.g., USDC, USDT0, WETH)
          example: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
        base_token:
          type: string
          description: Base token address for the position (e.g., WETH for long ETH)
          example: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1'
        leverage_ratio:
          type: integer
          description: Leverage multiplier (e.g., 2 for 2x)
          minimum: 1
          example: 2
        collateral_amount:
          type: string
          description: Collateral amount in raw units
          example: '1000000'
    QuoteRequest:
      type: object
      required:
      - src_chain_id
      - src_token_address
      - src_token_quantity
      - src_wallet_address
      - dst_chain_id
      - dst_token_address
      - dst_wallet_address
      properties:
        src_chain_id:
          type: string
          description: Source chain ID (e.g., '1' for Ethereum, '42161' for Arbitrum)
          example: '42161'
        src_token_address:
          type: string
          description: Source token address or 'native' for gas token
          example: '0xaf88d065e77c8cC2239327C5EDb3A432268e5831'
        src_token_quantity:
          type: string
          description: Amount to swap in raw units (wei/token decimals)
          example: '1000000'
        src_wallet_address:
          type: string
          description: Source wallet address
          example: 0x...
        dst_chain_id:
          type: string
          description: Destination chain ID
          example: '8453'
        dst_token_address:
          type: string
          description: Destination token address or 'native'
          example: '0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2'
        dst_wallet_address:
          type: string
          description: Destination wallet address
          example: 0x...
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message
        detail:
          type: object
          description: Additional error details
    QuoteResponse:
      type: object
      properties:
        src_token:
          $ref: '#/components/schemas/TokenInfo'
        dst_token:
          $ref: '#/components/schemas/TokenInfo'
        order_data:
          $ref: '#/components/schemas/OrderData'
        order_type:
          type: string
          enum:
          - FEATHER
          - PERMIT2
          description: Type of swap mechanism
        order_id:
          type: string
          description: Unique order identifier
        router_address:
          type: string
          description: Router contract address for Permit2 approvals
    TokenMetadata:
      type: object
      properties:
        address:
          type: string
        symbol:
          type: string
        name:
          type: string
        decimals:
          type: integer
    MarginQuoteResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        chain_id:
          type: string
          description: Chain ID
        collateral_token:
          $ref: '#/components/schemas/TokenMetadata'
        base_token:
          $ref: '#/components/schemas/TokenMetadata'
        loan_token:
          $ref: '#/components/schemas/TokenMetadata'
        interest_rate_bps:
          type: integer
          description: Annual interest rate in basis points
        order_data:
          $ref: '#/components/schemas/OrderData'
        position_size:
          type: string
          description: Total position size in base token units
        loan_amount:
          type: string
          description: Amount being borrowed
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication (if required by deployment)
externalDocs:
  description: Tristero Python SDK Documentation
  url: https://pypi.org/project/tristero/