Skip to content

Read symbol price#

About#

Returns current price for a specific symbol

GET /users/current/accounts/:accountId/symbols/:symbol/current-price

For more information see Swagger documentation

Headers#

Name Type Required Description
auth-token string Yes authorization token. See Authentication & authorization

Path parameters#

Name Type Required Description
accountId string Yes MetaTrader account id. You can retrieve account id from Web application after you add your MetaTrader account to our platform. The account id can also be obtained via Provisioning API
symbol string Yes symbol (e.g. a currency pair or an index)

Responses:

  • 200 - Current price returned successfully. Response schema: MetatraderSymbolPrice
  • 401 - Authorization failed. Response schema: Error
  • 404 - MetaTrader account not found or not provisioned yet or symbol is not defined for this broker. Response schema: Error

Examples#

Example request:

curl -X GET --header 'Accept: application/json' --header 'auth-token: token' 'https://mt-client-api-v1.agiliumtrade.agiliumtrade.ai/users/current/accounts/865d3a4d-3803-486d-bdf3-a85679d9fad2/symbols/AUDNZD/current-price'

Example response:

{
  "symbol": "AUDNZD",
  "bid": 1.05297,
  "ask": 1.05309,
  "profitTickValue": 0.59731,
  "lossTickValue": 0.59736,
  "time": "2020-04-07T03:45:23.345Z",
  "brokerTime": "2020-04-07 06:45:23.345"
}