# Transfers

### Transfers <a href="#transfers" id="transfers"></a>

#### `GET /transfers` <a href="#get-transfers" id="get-transfers"></a>

```
const getTransfers = () => {
  const timestamp = Math.round(Date.now() / 1000)
  const payload = timestamp + 'GET' + '/transfers' + '{}'
  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/transfers', options)
}
```

> Sample Response

```
{
  "message": [
    {
      "id": 39,
      "client_transfer_id" : "5fed7a1d-1cd3-4be7-9d63-dd67805d441d",
      "created_at": "2020-09-01T20:53:31.653Z",
      "updated_at": "2020-09-01T20:53:31.653Z",
      "status": "settled",
      "from_participant_code": "ABC123",
      "from_account_group": "UNALLOCATED",
      "from_account_label": "general",
      "to_participant_code": "DEMO01",
      "to_account_group": null,
      "to_account_label": "general",
      "asset": "BTC",
      "amount": "20.00",
      "movement_id": "1902a0eb-a925-4d08-bcad-ea8ed4696a24",
      "admin_transfer": true
    },
    {
      "id": 38,
      "client_transfer_id": null,
      "created_at": "2020-09-01T20:53:31.406Z",
      "updated_at": "2020-09-01T20:53:31.406Z",
      "status": "approved",
      "from_participant_code": "ABC123",
      "from_account_group": "UNALLOCATED",
      "from_account_label": "general",
      "to_participant_code": "ABC123",
      "to_account_group": "XYZ456",
      "to_account_label": "general",
      "asset": "e₹",
      "amount": "100.00",
      "movement_id": null,
      "admin_transfer": false
    }
  ],
  "page": 1,
  "total_pages": 1
}
```

Returns an array of all transfers requests made to or from your participant, or to or from your platform's account group.

Response:

<table><thead><tr><th width="193.33333333333331">Parameter</th><th width="423">Description</th><th>Type</th></tr></thead><tbody><tr><td>id</td><td>The transfer request ID</td><td>number</td></tr><tr><td>client_transfer_id</td><td>Optional unique identifier for the transfer.<br>Note: this must be unique, per platform, per 72 hour period</td><td>string</td></tr><tr><td>created_at</td><td>The timestamp when the transfer request was requested</td><td>timestamp</td></tr><tr><td>updated_at</td><td>The timestamp when the transfer request was last updated</td><td>timestamp</td></tr><tr><td>status</td><td>The current status of the transfer request</td><td>string</td></tr><tr><td>from_participant_code</td><td>The source participant for the transfer to, e.g. <code>ABCDEF</code></td><td>string</td></tr><tr><td>from_account_group</td><td>The source account group for the transfer, e.g. <code>ABCDEF</code><br>Note: this may be <code>null</code> if the requesting participant is not authorized to see the source account group</td><td>string</td></tr><tr><td>from_account_label</td><td>The source account label for the transfer, e.g. <code>general</code></td><td>string</td></tr><tr><td>to_participant_code</td><td>The destination participant for the transfer, e.g. <code>ABCDEF</code></td><td>string</td></tr><tr><td>to_account_group</td><td>The destination account group for the transfer, e.g. <code>ABCDEF</code><br>Note: this may be <code>null</code> if the requesting participant is not authorized to see the destination account group</td><td>string</td></tr><tr><td>to_account_label</td><td>The destination account label for the transfer, e.g. <code>general</code></td><td>string</td></tr><tr><td>asset</td><td>The asset code for the request, e.g. e₹</td><td>string</td></tr><tr><td>amount</td><td>The amount or quantity transferred, e.g. <code>100</code></td><td>string</td></tr><tr><td>movement_id</td><td>A unique ID for the specific account update<br>Note: this will be <code>null</code> until the transfer updates to <code>settled</code></td><td>string</td></tr></tbody></table>

**Transfer Request Status**

<table><thead><tr><th width="162">Status</th><th>Description</th></tr></thead><tbody><tr><td>pending</td><td>The request has been created and is pending approval from users</td></tr><tr><td>approved</td><td>The request is approved but not settled</td></tr><tr><td>canceled</td><td>The request is canceled and in a terminal state</td></tr><tr><td>rejected</td><td>The request is rejected and in a terminal state</td></tr><tr><td>settled</td><td>The request was settled and is in a terminal state</td></tr></tbody></table>
