Skip to content

Retrieve CPU credit usage#

About#

Returns information about used, available and left credits

GET /users/current/accounts/:accountId/credits

For more information see Swagger documentation. Note, that this URL is valid for new-york region only. You can find URLs for other regions on API access page.

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

Responses:

  • 200 - Symbol specification returned successfully. Response schema: CreditUsage
  • 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.project-stock.v3.agiliumlabs.cloud/users/current/accounts/83387573-d48c-481c-92b1-ab8471af9c20/credits'

Example response:

{
  "perAccount": [{
    "period": '10s',
    "total": 1000,
    "available": 500
  }],
  "perUser": [{
    "period": '1s',
    "total": 500,
    "available": 250
  }],
  "perServer": [{
    "period": '1m',
    "total": 5000,
    "available": 2500
  }]
}