OANDA Pricing API

The Pricing API from OANDA — 2 operation(s) for pricing.

Operations 2

GET /pricing Get Base Prices #
GET /pricing/range Get Price Range #

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/oanda-pricing-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

oanda-pricing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: OANDA v20 REST Accounts Pricing API
  description: The full OANDA v20 REST API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more.
  contact:
    name: OANDA API Support
    url: http://developer.oanda.com/rest-live-v20/introduction/
    email: api@oanda.com
  license:
    name: MIT
    url: https://github.com/oanda/v20-openapi/blob/master/LICENSE.txt
  version: 3.0.25
servers:
- url: /v3
tags:
- name: Pricing
paths:
  /pricing:
    get:
      summary: Get Base Prices
      description: Get pricing information for a specified instrument. Accounts are not associated in any way with this endpoint.
      operationId: getBasePrices
      parameters:
      - $ref: '#/components/parameters/authorizationHeaderParam'
      - $ref: '#/components/parameters/acceptDatetimeFormatHeaderParam'
      - name: time
        description: The time at which the desired price for each instrument is in effect. The current price for each instrument is returned if no time is provided.
        in: query
        schema:
          type: string
          format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
      responses:
        '200':
          description: Pricing information has been successfully provided.
          headers:
            RequestID:
              description: The unique identifier generated for the request
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  prices:
                    type: array
                    description: The list of prices that satisfy the request.
                    items:
                      $ref: '#/components/schemas/Price'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
      tags:
      - Pricing
  /pricing/range:
    get:
      summary: Get Price Range
      description: Get pricing information for a specified range of prices. Accounts are not associated in any way with this endpoint.
      operationId: getPriceRange
      parameters:
      - $ref: '#/components/parameters/authorizationHeaderParam'
      - $ref: '#/components/parameters/acceptDatetimeFormatHeaderParam'
      - $ref: '#/components/parameters/instrumentNamePathParam'
      - name: from
        description: The start of the time range to fetch prices for.
        in: query
        required: true
        schema:
          type: string
          format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
      - name: to
        description: The end of the time range to fetch prices for. The current time is used if this parameter is not provided.
        in: query
        schema:
          type: string
          format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
      responses:
        '200':
          description: Pricing information has been successfully provided.
          headers:
            RequestID:
              description: The unique identifier generated for the request
              schema:
                type: string
            Link:
              description: A link to the next page of results if the results were paginated
              schema:
                type: string
          content:
            application/json:
              schema:
                type: object
                properties:
                  prices:
                    type: array
                    description: The list of prices that satisfy the request.
                    items:
                      $ref: '#/components/schemas/Price'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '405':
          $ref: '#/components/responses/405'
      tags:
      - Pricing
components:
  parameters:
    authorizationHeaderParam:
      name: Authorization
      description: The authorization bearer token previously obtained by the client
      in: header
      required: true
      schema:
        type: string
        format: The string 'Bearer ' followed by the token.
    acceptDatetimeFormatHeaderParam:
      name: Accept-Datetime-Format
      description: Format of DateTime fields in the request and response.
      in: header
      schema:
        type: string
    instrumentNamePathParam:
      name: instrument
      description: Name of the Instrument
      in: path
      required: true
      schema:
        type: string
        format: A string containing the base currency and quote currency delimited by a "_".
  responses:
    '400':
      description: Bad Request. The client has provided invalid data to be processed by the server.
      headers:
        RequestID:
          description: The unique identifier generated for the request
          schema:
            type: string
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                type: string
                description: The code of the error that has occurred. This field may not be returned for some errors.
              errorMessage:
                type: string
                description: The human-readable description of the error that has occurred.
    '405':
      description: Method Not Allowed. The client has attempted to access an endpoint using an HTTP method that is not supported.
      headers:
        RequestID:
          description: The unique identifier generated for the request
          schema:
            type: string
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                type: string
                description: The code of the error that has occurred. This field may not be returned for some errors.
              errorMessage:
                type: string
                description: The human-readable description of the error that has occurred.
    '401':
      description: Unauthorized. The endpoint being access required the client to authenticated, however the the authentication token is invalid or has not been provided.
      headers:
        RequestID:
          description: The unique identifier generated for the request
          schema:
            type: string
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                type: string
                description: The code of the error that has occurred. This field may not be returned for some errors.
              errorMessage:
                type: string
                description: The human-readable description of the error that has occurred.
    '404':
      description: Not Found. The client has attempted to access an entity that does not exist.
      headers:
        RequestID:
          description: The unique identifier generated for the request
          schema:
            type: string
      content:
        application/json:
          schema:
            type: object
            properties:
              errorCode:
                type: string
                description: The code of the error that has occurred. This field may not be returned for some errors.
              errorMessage:
                type: string
                description: The human-readable description of the error that has occurred.
  schemas:
    Price:
      type: object
      description: The Price representation
      properties:
        instrument:
          type: string
          description: The Price's Instrument.
          format: A string containing the base currency and quote currency delimited by a "_".
        tradeable:
          type: boolean
          description: Flag indicating if the Price is tradeable or not
        timestamp:
          type: string
          description: The date/time when the Price was created.
          format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
        baseBid:
          type: string
          description: The base bid price as calculated by pricing.
          format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
        baseAsk:
          type: string
          description: The base ask price as calculated by pricing.
          format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
        bids:
          type: array
          description: The list of prices and liquidity available on the Instrument's bid side. It is possible for this list to be empty if there is no bid liquidity currently available for the Instrument in the Account.
          items:
            $ref: '#/components/schemas/PriceBucket'
        asks:
          type: array
          description: The list of prices and liquidity available on the Instrument's ask side. It is possible for this list to be empty if there is no ask liquidity currently available for the Instrument in the Account.
          items:
            $ref: '#/components/schemas/PriceBucket'
        closeoutBid:
          type: string
          description: The closeout bid price. This price is used when a bid is required to closeout a Position (margin closeout or manual) yet there is no bid liquidity. The closeout bid is never used to open a new position.
          format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
        closeoutAsk:
          type: string
          description: The closeout ask price. This price is used when an ask is required to closeout a Position (margin closeout or manual) yet there is no ask liquidity. The closeout ask is never used to open a new position.
          format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
    PriceBucket:
      type: object
      description: A Price Bucket represents a price available for an amount of liquidity
      properties:
        price:
          type: string
          description: The Price offered by the PriceBucket
          format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
        liquidity:
          type: integer
          description: The amount of liquidity offered by the PriceBucket