> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ebury.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an estimate or firm quote

Obtain either an estimate or firm quote; estimates are for reference only, while a firm quote can be used to book a trade.


## OpenAPI

````yaml /openapi.json post /quotes
openapi: 3.0.0
info:
  description: |
    Ebury API allows customers:
      to retrieve accounts, balances, beneficiaries, and transactions;
      to get buy/sell estimates and quotes, book trades and retrieve trade history;
      to allocate payments to a trade and beneficiary, and to submit payments in bulk;
      to download documents such as trade receipt, payment instruction and payment receipt;
      to manage the authorised persons on their account.
    The Metadata API allows applications to clarify some parts of the Ebury API
      that are impractical to express schematically.
  termsOfService: https://docs.ebury.io/#terms-of-use
  title: Ebury API
  version: '0.1'
servers:
  - url: https://{environment}.ebury.io
    variables:
      environment:
        default: api
        enum:
          - api
          - sandbox
security:
  - api_key: []
paths:
  /quotes:
    post:
      tags:
        - Quotes
      summary: Get an estimate or firm quote
      description: >
        Get an estimate or firm quote. An estimate is as it's described:

        * The current rates on offer within the Ebury platform with no firm
        quote.

        * A firm quote returns a reference than can be used to book a trade.
      parameters:
        - description: >-
            The quote type. A quote_type of quote returns a quote ID which a
            trade can be booked against
          in: query
          name: quote_type
          required: true
          schema:
            type: string
            enum:
              - estimate
              - quote
        - description: The ID of the client this quote is for
          in: query
          name: client_id
          required: true
          schema:
            type: string
        - name: Authorization
          in: header
          description: The access token
          required: true
          schema:
            type: string
        - description: The ID of the contact
          in: header
          name: X-Contact-ID
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
        description: Request Payload
        required: true
      responses:
        '200':
          description: Estimated rates response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateOrQuoteResponse'
        '201':
          description: Quote created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EstimateOrQuoteResponse'
        '400':
          description: >-
            Formatting, parameter or schema validation error. See error message
            for further details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: Access denied due to authentication failure
        '403':
          description: >-
            Could not complete action due to data constraints. Refer to error
            message for additional details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: Client ID not found
        '409':
          description: Requested quote causes a conflict, see response body for details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '502':
          description: Internal integration error. Contact support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
components:
  schemas:
    QuoteRequest:
      properties:
        amount:
          description: Amount
          format: double
          type: number
        buy_currency:
          description: Buy currency
          type: string
        operation:
          description: Operation (buy or sell)
          enum:
            - buy
            - sell
          type: string
        sell_currency:
          description: Sell currency
          type: string
        trade_type:
          description: The trade type
          enum:
            - spot
            - forward
          type: string
        value_date:
          description: >
            Value date for the trade. If the value date is not valid then the
            quote will be returned for next available value date. If the value
            date is not provided, then the quote will be returned for the next
            available valid value date.
          format: date
          type: string
      required:
        - amount
        - buy_currency
        - operation
        - sell_currency
        - trade_type
      type: object
    EstimateOrQuoteResponse:
      properties:
        book_trade:
          description: >-
            Call this endpoint to book the trade (refer to Trades documentation
            for required payload)
          format: uri
          type: string
        buy_amount:
          description: Buy amount
          format: double
          type: number
        buy_currency:
          description: Buy currency
          type: string
        inverse_rate:
          description: The inverse rate
          format: double
          type: number
        inverse_rate_symbol:
          description: The symbol of inverse rate
          type: string
        quote_id:
          description: Quote identifier. Used to create book a trade at the Trades endpoint
          type: string
        quoted_rate:
          description: The rate quoted
          format: double
          type: number
        quoted_rate_symbol:
          description: The symbol of rate quoted
          type: string
        sell_amount:
          description: Sell amount
          format: double
          type: number
        sell_currency:
          description: Sell currency
          type: string
        estimated_rate:
          description: The estimated rate
          format: double
          type: number
        estimated_rate_symbol:
          description: The symbol of estimated rate
          type: string
        fee_amount:
          description: Fee amount
          format: float
          type: number
        fee_currency:
          description: Fee currency
          type: string
        value_date:
          description: Date on which quote is requested
          format: date
          type: string
        warning:
          description: >-
            A warning is only returned if the requested value date was not valid
            and the next available date has been returned.
          type: string
      required:
        - inverse_rate
        - inverse_rate_symbol
        - value_date
      type: object
    ErrorMessage:
      description: An error message.
      properties:
        code:
          type: string
          description: The code for the error.
        details:
          description: Error details
          type: string
        message:
          type: string
          description: A short description of the cause of the error.
      required:
        - code
        - message
        - details
      type: object
  securitySchemes:
    api_key:
      description: An API Key.
      in: header
      name: x-api-key
      type: apiKey

````