# GET Platform Position

#### `GET /positions/platform/:platform_code` <a href="#get-positions-platform-platform_code" id="get-positions-platform-platform_code"></a>

```
const getPositionsForPlatform = (platformCode: string) => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/positions/' + platformCode + '{}'
  const decodedSecret = Buffer.from(apiSecret, 'base64')
  const hmac = crypto.createHmac('sha256', decodedSecret)
  const signedPayload = hmac.update(payload).digest('base64')

  // SET HEADERS
  const headers = {
    'X-NDAX-API-KEY': 'public_key',
    'X-NDAX-SIGNED': signedPayload,
    'X-NDAX-TIMESTAMP': timestamp,
    'X-NDAX-PASSPHRASE': 'passphrase'
  }
  const options = {
    headers,
    body,
    json: true
  }

  return request.get(
    'https://api.ndax.in/positions/platform/' + platformCode,
    options
  )
}
```

> Sample Response

```
{
  "message": [
    {
      "platform_code": "PLAT01",
      "participant_code": "CUST01",
      "asset": "BTC",
      "position_all_open_trades": "10.02",
      "position_all_accepted_trades_only": "10.02",
      "position_all_active_trades_only": "0"
    },
    {
      "platform_code": "PLAT01",
      "participant_code": "CUST01",
      "asset": "e₹",
      "position_all_open_trades": "-100200",
      "position_all_accepted_trades_only": "-100200",
      "position_all_active_trades_only": "0"
    },
    {
      "platform_code": "PLAT01",
      "participant_code": "CUST02",
      "asset": "USDT",
      "position_all_open_trades": "-110000",
      "position_all_accepted_trades_only": "0",
      "position_all_active_trades_only": "-110000"
    },
    {
      "platform_code": "PLAT01",
      "participant_code": "CUST02",
      "asset": "e₹",
      "position_all_open_trades": "109670",
      "position_accepted_trades_only": "0",
      "position_active_trades_only": "109670"
    }
  ]
}
```

Returns an array of all positions maintained at NDAX for the platform issuing the query. The response will include positions for all participants active on the platform. Response parameters listed below.

Query parameters include:

* `participant_code` (optional) the participant\_codes to filter the response by (e.g `?participant_code=PLAT01&participant_code=PLAT02`)

Response:

<table><thead><tr><th width="264.3333333333333">Parameter</th><th width="389">Description</th><th>Type</th></tr></thead><tbody><tr><td>platform_code</td><td>The code of the platform for the position</td><td>string</td></tr><tr><td>participant_code</td><td>The code of the participant that holds the position</td><td>string</td></tr><tr><td>asset</td><td>The asset code for the for the position, e.g. e₹</td><td>string</td></tr><tr><td>position_all_open_trades</td><td>The net position of all open trades in the asset, i.e. trades with a <code>trade_state</code> of <code>accepted</code> or <code>active</code></td><td>string</td></tr><tr><td>position_accepted_trades_only</td><td>The net position of all trades in the asset with a <code>trade_state</code> of <code>accepted</code>, i.e. trades where settlement has not yet been attempted</td><td>string</td></tr><tr><td>position_active_trades_only</td><td>The net position of all trades in the asset with a <code>trade_state</code> of <code>active</code>, i.e. trades where settlement has been attempted but was unsuccessful</td><td>string</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ndax.in/v3/private-endpoints/positions/get-platform-position.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
