# OAuth Resources

### Authorization

Use the access token previously obtained via the oauth server. The access token should be included in resource endpoint requests as an authorization header containing a “[bearer token](https://www.oauth.com/oauth2-servers/differences-between-oauth-1-2/bearer-tokens/)”.

### Base URL

{% embed url="<https://api.blockchain.info/partner-resource-gateway>" %}

## Endpoints

### **Transaction History**

* Endpoint: `/v1/transactions`
* Method: GET
* [Scope](https://www.notion.so/OAuth-2-0-Service-143c86ae3660492f8f3bb9837aca18a6?pvs=21): `read_transactions`
* Description: Retrieve the authenticated user's transaction history.
* Parameters: `startDate`, `endDate`, `type` (optional)
* Notes:&#x20;
  * This endpoint can return a maximum of 30 days of history and by default will return the most recent 30 days of history.
  * Possible types include: `withdrawal`, `deposit`, `trade`
  * Possible statuses include: `pending`, `complete`, `failed`
* Response:

  <pre class="language-json"><code class="lang-json">[
    {
      "id": "fde34db4-942b-4138-b407-5f04a2ddca92",
      "createdAt": "2024-04-05T13:14:57.957Z",
      "amount": 100.00,
      "currency": "USD",
      "type": "deposit",
      "status": "completed"
    },
    {
      "id": "df90726c-ceba-4024-8db8-753cbb2463f9",
  <strong>    "createdAt": "2024-04-06T11:12:01.233Z",
  </strong>    "amount": 1.2,
      "currency": "ETH",
      "type": "withdrawal",
      "status": "pending"
    },
    {
      "id": "11e99b2a-8c8f-42f4-b4ee-3bc1074963ae",
      "createdAt": "2024-04-08T09:01:01.114Z",
      "updatedAt": "2024-04-08T09:23:19.921Z",
      "inputAmount": 500.0,
      "inputCurrency": "USD",
      "outputAmount": 0.21222,
      "outputCurrency": "ETH",
      "type": "trade",
      "status": "complete"
    }
  ]

  </code></pre>

### **Balances**

* Endpoint: `/v1/balances`
* Method: GET
* [Scope](https://www.notion.so/OAuth-2-0-Service-143c86ae3660492f8f3bb9837aca18a6?pvs=21): `read_balance`
* Description: Retrieve an overview of the authenticated user's account, including asset details such as symbol, quantity, and current worth.
* Response:

```javascript
[
  {
    "symbol": "BTC",
    "isFiat": false,
    "quantity": 1.5,
    "currentWorth": 100422.90
  },
  {
    "symbol": "ETH",
    "isFiat": false,
    "quantity": 10,
    "currentWorth": 32205.60
  },
  {
    "symbol": "USD",
    "isFiat": true,
    "quantity": 309.92,
    "currentWorth": 309.92
  }
]
```


---

# 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.blockchain.com/oauth-resources/oauth-resources.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.
