# Get All Transactions

<mark style="color:green;">**`GET`**</mark> `https://api.sfox.com/v1/account/transactions`

Retrieve your transaction history, including trades and transfers. It returns an array of objects, each of which has details for each individual transaction.

{% hint style="info" %}
[**Rate Limit**](/rest-api/rate-limits.md)**: 1 request per 10 seconds**

Receive real-time [trade](/websocket-api/market-data/trades.md), [order](/websocket-api/orders-and-account-data/orders.md), and [balance](/websocket-api/orders-and-account-data/balances.md) updates using the sFOX WebSocket API. [Click here for details](/websocket-api/orders-and-account-data.md).
{% endhint %}

## Request

### Query Parameters

<table><thead><tr><th width="113.8203125">Name</th><th width="125">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>from</code></strong></td><td>timestamp</td><td>Start date for your query. Results will include transactions that occurred after this date. <strong>Unix timestamp in ms.</strong> Default: utcnow - 24hrs</td></tr><tr><td><strong><code>to</code></strong></td><td>timestamp</td><td>End date for your query. Results will include transactions that occurred before this date. <strong>Unix timestamp in ms.</strong> Default: utcnow</td></tr><tr><td><strong><code>limit</code></strong></td><td>int</td><td>Maximum number of results to be returned by the request. Default: 250. Maximum: 1000</td></tr><tr><td><strong><code>after</code></strong></td><td>int</td><td>Pagination parameter. Return results that occurred after (newer) than the specified ID (<code>id</code> from response body).<br><br>Use this parameter when you want to retrieve only new transactions from a previous request.</td></tr><tr><td><strong><code>offset</code></strong></td><td>int</td><td>Pagination parameter. Return results that occurred before (older) than the results from a previous request. <br><br>Specify the number of entries you've already had returned to you to get the next batch. e.g. If you retrieved <code>500</code> results in your previous request and you want the next <code>500</code>, set the offset to <code>501</code>.</td></tr><tr><td><strong><code>types</code></strong></td><td>string</td><td>Filter by transaction type. To filter by more than one type, separate each type with a comma. Possible values: <code>charge</code>, <code>deposit</code>, <code>withdraw</code>, <code>credit</code>, <code>buy</code>, <code>sell</code></td></tr><tr><td><strong><code>pending</code></strong></td><td>boolean</td><td>Specify whether the results should include transactions that are NOT completed (<code>Done</code>). e.g. pending deposits or withdrawals. <strong>Only applicable to</strong> <code>deposit</code> <strong>and</strong> <code>withdraw</code> <code>types</code>. Default: <code>false</code></td></tr></tbody></table>

### Example Requests

{% tabs %}
{% tab title="Shell" %}

```bash
curl -H 'Authorization: Bearer <API_TOKEN>' \ 
https://api.sfox.com/v1/account/transactions?limit=50
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

axios({
  method: 'get',
  url: 'https://api.sfox.com/v1/account/transactions',
  headers: {
    'Authorization': 'Bearer <API_KEY>'
  },
  params: {
   limit: 50
  }
}).then(response => {
  console.log(response)
}).catch(err => {
  console.error(err)
});ja
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

data = requests.get(
  "https://api.sfox.com/v1/account/transactions",
  headers={
    "Authorization": "Bearer <API_KEY>",
  }
  params={
   "limit": 50
  }
)
print(data)
```

{% endtab %}
{% endtabs %}

## Response

### Response Body

Response body is an array of objects. Each object represents a transaction and will include the following keys:

<table><thead><tr><th width="183.61764680221557">Key</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>id</code></strong></td><td>sFOX-generated transaction ID. Use for <code>after</code> pagination.</td></tr><tr><td><strong><code>atxid</code></strong></td><td>Account transaction ID. An sFOX-generated ID specifically for deposit, withdrawal, credit, or charge transactions.</td></tr><tr><td><strong><code>order_id</code></strong></td><td>sFOX-generated ID of the order that this transaction is associated with, if applicable.</td></tr><tr><td><strong><code>client_order_id</code></strong></td><td>The optional ID that you specified when <a href="/pages/-Mkd5fv0VwgWbHGXHO7z"><mark style="color:blue;">placing an order</mark></a></td></tr><tr><td><strong><code>trade_id</code></strong></td><td>sFOX-generated ID of the trade, if applicable.</td></tr><tr><td><strong><code>day</code></strong></td><td>The timestamp of the transaction, in ISO8601 format</td></tr><tr><td><strong><code>action</code></strong></td><td>The action name of this transaction (“Deposit”, “Withdraw”, “Buy”, “Sell”, "Credit", "Charge")</td></tr><tr><td><strong><code>currency</code></strong></td><td>The base currency of the transaction </td></tr><tr><td><strong><code>memo</code></strong></td><td>The optional memo you specified for a withdrawal transaction</td></tr><tr><td><strong><code>amount</code></strong></td><td>The transacted amount of the <code>currency</code></td></tr><tr><td><strong><code>net_proceeds</code></strong></td><td>Net amount after fees</td></tr><tr><td><strong><code>price</code></strong></td><td>Price per unit of the <code>currency</code></td></tr><tr><td><strong><code>fees</code></strong></td><td>Fee paid in terms of the  <code>currency</code></td></tr><tr><td><strong><code>status</code></strong></td><td>The current transaction status</td></tr><tr><td><strong><code>hold_expires</code></strong></td><td>The expiration date of a hold on this transaction, if applicable</td></tr><tr><td><strong><code>tx_hash</code></strong></td><td>The transaction hash, if applicable (applicable to crypto deposits and withdrawals)</td></tr><tr><td><strong><code>algo_name</code></strong></td><td>The algorithm used to execute the transaction, if the transaction is an order</td></tr><tr><td><strong><code>algo_id</code></strong></td><td>The ID associated with the algorithm</td></tr><tr><td><strong><code>account_balance</code></strong></td><td>Your balance of the <code>currency</code> after the transaction</td></tr><tr><td><strong><code>AccountTransferFee</code></strong></td><td>Fee paid in terms of the  <code>currency</code> for deposit or withdrawal transactions</td></tr><tr><td><strong><code>description</code></strong></td><td>A description of the transaction. For crypto deposits, this is the sender address. For crypto withdrawals this is the destination address</td></tr><tr><td><strong><code>added_by_user_email</code></strong></td><td>The username/email address of the user who initiated this transaction</td></tr><tr><td><strong><code>symbol</code></strong></td><td>The currency pair of the transaction for trades (<code>action</code> = <code>Buy</code> or <code>Sell</code>)</td></tr><tr><td><strong><code>timestamp</code></strong></td><td>The UNIX timestamp of the transaction in milliseconds</td></tr></tbody></table>

### Transaction Statuses

The following table describes the possible Status Codes returned from this request.

{% hint style="info" %}
**These Status Codes are only applicable to deposit and withdrawal transactions.** Other transaction types will always be returned with status = Done
{% endhint %}

<table data-full-width="false"><thead><tr><th width="210.03515625">Status Code</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>Initiated</code></strong></td><td>Transaction initiated</td></tr><tr><td><strong><code>In Progress</code></strong></td><td>Transaction is in progress</td></tr><tr><td><strong><code>Approval Required</code></strong></td><td><ul><li><strong>Deposits:</strong> N/A</li><li><strong>Withdrawals:</strong> Approval is required before the transaction will be initiated</li></ul></td></tr><tr><td><strong><code>Processing Automatic withdrawal</code></strong></td><td><ul><li><strong>Deposits:</strong> N/A</li><li><strong>Withdrawals:</strong> Transaction is being broadcast</li></ul></td></tr><tr><td><strong><code>Confirmed</code></strong></td><td><ul><li><strong>Deposits:</strong> Transaction has been received. It is not available yet but will be shortly</li><li><strong>Withdrawals:</strong> Transaction has been approved. It has not been sent yet but will be shortly</li></ul></td></tr><tr><td><strong><code>Done</code></strong></td><td><ul><li><strong>Deposits:</strong> Transaction is complete and available to you</li><li><strong>Withdrawals:</strong> Transaction is complete</li></ul></td></tr><tr><td><strong><code>Canceled</code></strong></td><td>Transaction has been canceled</td></tr><tr><td><strong><code>Admin Hold, Pending Further Review</code></strong></td><td>Transaction was flagged for review. Contact support@sfox.com for more information</td></tr></tbody></table>

### Responses

<details>

<summary><mark style="color:green;">200</mark></summary>

```json
[
    {
        "id": 68029980111539,
        "AtxId": null,
        "order_id": "80000120662565",
        "client_order_id": "2013acd0-ea78-46c3-b2ac-ed4546f13182",
        "trade_id": "8848300113216138",
        "day": "2024-03-28T15:47:41.000Z",
        "action": "Sell",
        "currency": "usd",
        "memo": "",
        "amount": 71.26350189,
        "net_proceeds": 71.26350189,
        "price": 71299.1514729,
        "fees": 0.03564958,
        "status": "done",
        "hold_expires": "",
        "tx_hash": "",
        "algo_name": "Limit",
        "algo_id": "201",
        "account_balance": 3702.72950349,
        "AccountTransferFee": 0,
        "Description": "",
        "wallet_display_id": "5a3f1b1c-719d-11e9-b0be-0ea0e44d1000",
        "added_by_user_email": "example@sfox.com",
        "symbol": "btc/usd",
        "IdempotencyId": null,
        "timestamp": 1711640861000
    },
    {
        "id": 68029980111538,
        "AtxId": null,
        "order_id": "80000120662565",
        "client_order_id": "2013acd0-ea78-46c3-b2ac-ed4546f13182",
        "trade_id": "8848300113216138",
        "day": "2024-03-28T15:47:41.000Z",
        "action": "Sell",
        "currency": "btc",
        "memo": "",
        "amount": -0.001,
        "net_proceeds": -0.001,
        "price": 71299.1514729,
        "fees": 0.03564958,
        "status": "done",
        "hold_expires": "",
        "tx_hash": "",
        "algo_name": "Limit",
        "algo_id": "201",
        "account_balance": 10.00216189,
        "AccountTransferFee": 0,
        "Description": "",
        "wallet_display_id": "5a3f1b1c-719d-11e9-b0be-0ea0e44d1000",
        "added_by_user_email": "example@sfox.com",
        "symbol": "btc/usd",
        "IdempotencyId": null,
        "timestamp": 1711640861000
    },
    {
        "id": 68029980111501,
        "AtxId": 1670509823872833,
        "order_id": "",
        "client_order_id": "",
        "trade_id": "",
        "day": "2024-03-28T16:03:54.000Z",
        "action": "Credit",
        "currency": "dot",
        "memo": "",
        "amount": 0.0564958,
        "net_proceeds": 0.0564958,
        "price": 9.60559235,
        "fees": 0,
        "status": "done",
        "hold_expires": "",
        "tx_hash": "",
        "algo_name": "",
        "algo_id": "",
        "account_balance": 120.70980446,
        "AccountTransferFee": 0,
        "Description": "Staking Reward",
        "wallet_display_id": "5a3f1b1c-719d-11e9-b0be-0ea0e44d1000",
        "added_by_user_email": "example@sfox.com",
        "symbol": null,
        "IdempotencyId": null,
        "timestamp": 1711641834000
    }
]
```

</details>


---

# 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.sfox.com/rest-api/account-management/get-all-transactions.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.
