OANDA Users API
The Users API from OANDA — 2 operation(s) for users.
The Users API from OANDA — 2 operation(s) for users.
swagger: '2.0'
info:
title: OANDA v20 REST Accounts Users 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
basePath: /v3
schemes:
- https
consumes:
- application/json
produces:
- application/json
tags:
- name: Users
paths:
/users/{userSpecifier}:
get:
summary: User Info
description: Fetch the user information for the specified user. This endpoint is intended to be used by the user themself to obtain their own information.
operationId: getUserInfo
parameters:
- $ref: '#/parameters/authorizationHeaderParam'
- $ref: '#/parameters/userSpecifierPathParam'
responses:
'200':
description: The user information has been provided
headers:
RequestID:
description: The unique identifier generated for the request
type: string
schema:
type: object
properties:
userInfo:
$ref: '#/definitions/UserInfo'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'405':
$ref: '#/responses/405'
tags:
- Users
/users/{userSpecifier}/externalInfo:
get:
summary: External User Info
description: Fetch the externally-available user information for the specified user. This endpoint is intended to be used by 3rd parties that have been authorized by a user to view their personal information.
operationId: getExternalUserInfo
parameters:
- $ref: '#/parameters/authorizationHeaderParam'
- $ref: '#/parameters/userSpecifierPathParam'
responses:
'200':
description: The external user information has been provided
headers:
RequestID:
description: The unique identifier generated for the request
type: string
schema:
type: object
properties:
userInfo:
$ref: '#/definitions/UserInfoExternal'
'401':
$ref: '#/responses/401'
'403':
$ref: '#/responses/403'
'405':
$ref: '#/responses/405'
tags:
- Users
definitions:
UserInfo:
type: object
description: A representation of user information, as provided to the user themself.
properties:
username:
type: string
description: The user-provided username.
userID:
type: integer
description: The user's OANDA-assigned user ID.
country:
type: string
description: The country that the user is based in.
emailAddress:
type: string
description: The user's email address.
UserInfoExternal:
type: object
description: A representation of user information, as available to external (3rd party) clients.
properties:
userID:
type: integer
description: The user's OANDA-assigned user ID.
country:
type: string
description: The country that the user is based in.
FIFO:
type: boolean
description: Flag indicating if the the user's Accounts adhere to FIFO execution rules.
parameters:
userSpecifierPathParam:
name: userSpecifier
description: The User Specifier
in: path
type: string
format: 'A user specifier may have one of 3 formats: the OANDA-assigned User ID (numerical), the client-provided username prefixed by the "@" symbol (e.g. "@myusername"), or the "@" symbol. The "@" symbol on its own acts as an alias for the username of the user accessing the endpoint (as inferred from the token provided).'
required: true
authorizationHeaderParam:
name: Authorization
description: The authorization bearer token previously obtained by the client
in: header
type: string
format: The string 'Bearer ' followed by the token.
required: true
responses:
'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
type: string
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.
'403':
description: Forbidden. The client has provided a token that does not authorize them to perform the action implemented by the API endpoint.
headers:
RequestID:
description: The unique identifier generated for the request
type: string
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
type: string
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.