Sway Charts API Documentation
  • REST API Specification
    • Getting Started
      • Introduction
      • Errors
      • API Versioning
      • Conditional Requests & Updates
      • Entity Versioning
      • Data Types and Formats
      • Rate Limits & Throttling
    • Authentication & Authorization
      • HMAC Authentication
      • POST Create Session Token
      • POST Ping
      • POST Logout
    • Trading
      • POST Place Order
      • PUT Modify Order
      • DELETE Cancel Order
    • Reference Data
      • GET List Instruments
      • List Instrument Details
    • Users and Accounts
      • GET Get Users
      • GET List Account Portfolio
      • GET List Open Positions
      • GET List Open Orders
      • GET List Cash Transfers
      • GET POST List Orders
      • GET List Account Metrics
      • GET List Account Events
    • Market Data
      • POST Request Market Data
    • Conversion Rates
      • POST Get Conversion Rates
    • Cash Transaction
      • Single Order Request
      • Order Group Request
      • Order Response
      • Instrument
      • Instrument Details
      • Trading Session
      • Limit Value
      • Margin Rate
      • Margin Tier
      • User Details
      • Account Details
      • Account Portfolio
      • Balance
      • Position
      • Order
      • Order Leg
      • Execution
      • Cash Transfer
      • Historic Order List
      • Account Metrics
      • Position Metrics
      • Currency Metrics
      • Account Event
      • Market Data Request
      • Market Data Event Type
      • Market Data List
      • Quote
      • Candle
      • Conversion Rate
    • Revision History
Powered by GitBook
On this page
  1. REST API Specification
  2. Users and Accounts

GET List Account Metrics

GET https://api.swaycharts.io/dxsca-web/accounts/{account code}/metrics
GET https://api.swaycharts.io/dxsca-web/accounts/metrics?accounts={account codes}

Retrieve current metrics (such as PnL or equity) for an account or several accounts. User can always view metrics on his own accounts, but can only view orders of other accounts if a special permission is set.

Values in the API are fluent since they depend on market data. So the client is either expected to poll the API to get current values or to make use of the notifications API.

By default only the total account metrics are reported. Please use the include-positions query parameter to include metrics for individual positions.

// Request

Empty request

Authorization header should be included in case of basic authentication

// Path Parameters

account code - unique code assigned to an account (see Account Code)

// Query Parameters

The following parameters are supported to query metrics for multiple accounts:

account codes (optional) - comma-separated list of unique codes assigned to an account (see Account Code)
include-positions (optional) - if true, the result will include individual per-position metrics

// Response 

A list of current account metrics as a list of account metrics object.

The ETag header is not sent.

// Errors

Common errors

API is not permitted for the user

Status code: 404 Not Found
Error code: 2
Description: Entity not found at server
Request URI is malformed (request parameters are incorrect)

Status code: 400 Bad Request
Error code: 32
Description: Incorrect request parameters (<request parameter that was incorrect>)

PreviousGET POST List OrdersNextGET List Account Events

Last updated 1 year ago