> ## Documentation Index
> Fetch the complete documentation index at: https://cobo.com/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# Transaction history

> <Note>This content applies to WaaS 1.0 only. We highly recommend that you upgrade to [WaaS 2.0](https://www.cobo.com/developers/v2/guides/overview/introduction).</Note> This endpoint returns a JSON response containing the transaction history for a given coin and address. The response can be filtered by various parameters such as side, max_id, min_id, begin_time, end_time, and include_financial. The maximum number of transactions returned is 50.

<Note>Only successful deposit/withdraw requests will be considered as 'Transaction' here</Note>

#### Request

<ParamField query="coin" type="String">Coin code (Does not return all currencies)</ParamField>
<ParamField query="side" type="enum(deposit / withdraw)">Deposit/withdraw</ParamField>
<ParamField query="address" type="String">Deposit/withdraw address is optional. If not included, all address history will be returned.</ParamField>
<ParamField query="max_id" type="String">The transaction history ID limit is optional. If not included, will by default return the most recent records.(cannot be used with min\_id)</ParamField>
<ParamField query="min_id" type="String">Optional. If included, the sequence will be changed to time ASC. If not included, will by default return the most recent records, time DESC.(cannot be used with max\_id)</ParamField>
<ParamField query="limit" type="Integer">Page size is optional. If not included, the default size will be 50, and the maximum size will also be 50.</ParamField>
<ParamField query="begin_time" type="Long">Begin timestamp(milliseconds). If set, transactions whose confirmation times are shorter than this value will not be returned. (cannot be used with end\_time)</ParamField>
<ParamField query="end_time" type="Long">End time stamp (milliseconds). If it is passed in, the transactions whose transaction confirmation time is greater than or equal to this will not be returned.(cannot be used with begin\_time)</ParamField>
<ParamField query="include_financial" type="String">Request all transactions, if they are, return all transactions (including Staking, Trading)</ParamField>

#### Response

<ResponseField name="success" type="bool">request successful or failed</ResponseField>

<ResponseField name="result" type="object[]">
  <Expandable title="object">
    <Snippet file="full_custodian_transaction_snippet.mdx" />
  </Expandable>
</ResponseField>

<RequestExample>
  ```python Python theme={null}
  request(
      'GET',
      '/v1/custody/transaction_history/',
      {
          "coin": "BTC_USDT",
          "side": "deposit"
      },
      api_key, api_secret, host
  )
  ```

  ```javascript JavaScript theme={null}
  coboFetch('GET', '/v1/custody/transaction_history/',
          {
              "coin": "BTC_USDT",
              "side": "deposit"
          },
          api_key, api_secret, host
      ).then(res => {
          res.json().then((data)=>{
              console.log(JSON.stringify(data, null, 4));
          })
      }).catch(err => {
          console.log(err)
      });
  ```

  ```go Go theme={null}
  Request("GET", "/v1/custody/transaction_history/", map[string]string{
      "coin": "BTC_USDT",
      "side": "deposit",
  })
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "success": true,
    "result": [
      {
          "id": "20221013214833000312228000005846",
          "coin": "BTC_USDT",
          "display_code": "USDT",
          "description": "Tether",
          "decimal": 8,
          "address": "38GewuNXgnbmsxgvGFKd5ZNjUdNavxgEGM",
          "source_address": "AutoTest_RC02",
          "side": "deposit",
          "amount": "6000000",
          "abs_amount": "0.06",
          "txid": "L65954e38419b55abb10b37fc6fca54f",
          "vout_n": 0,
          "request_id": null,
          "status": "success",
          "abs_cobo_fee": "0",
          "created_time": 1665668913144,
          "last_time": 1665668913144,
          "confirmed_num": 3,
          "remark": "",
          "tx_detail": {
              "txid": "L65954e38419b55abb10b37fc6fca54f",
              "blocknum": 0,
              "blockhash": "",
              "fee": 0,
              "actualgas": 0,
              "gasprice": 1,
              "hexstr": ""
          },
          "source_address_detail": "AutoTest_RC02",
          "confirming_threshold": 3,
          "fee_coin": "BTC",
          "fee_decimal": 8,
          "fee_amount": 0,
          "type": "internal",
          "tx_request_type": ""
      },
      {
          "id": "20221013213858000312228000007739",
          "coin": "BTC_USDT",
          "display_code": "USDT",
          "description": "Tether",
          "decimal": 8,
          "address": "38GewuNXgnbmsxgvGFKd5ZNjUdNavxgEGM",
          "source_address": "AutoTest_RC02",
          "side": "deposit",
          "amount": "23000000",
          "abs_amount": "0.23",
          "txid": "L3dbb8e30d8da66c9ea0d7171e1fbe2c",
          "vout_n": 0,
          "request_id": null,
          "status": "success",
          "abs_cobo_fee": "0",
          "created_time": 1665668338625,
          "last_time": 1665668338625,
          "confirmed_num": 3,
          "remark": "",
          "tx_detail": {
              "txid": "L3dbb8e30d8da66c9ea0d7171e1fbe2c",
              "blocknum": 0,
              "blockhash": "",
              "fee": 0,
              "actualgas": 0,
              "gasprice": 1,
              "hexstr": ""
          },
          "source_address_detail": "AutoTest_RC02",
          "confirming_threshold": 3,
          "fee_coin": "BTC",
          "fee_decimal": 8,
          "fee_amount": 0,
          "type": "internal",
          "tx_request_type": ""
      }
    ]
  }
  ```
</ResponseExample>
