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

# Deposit to Trading Account

> Deposit collateral to a Trading Account

**Function:**

```
{package}::dex_accounts_entry::deposit_to_subaccount_at
```

**ABI Object (deposit\_to\_subaccount\_at):**

```typescript theme={null}
const functionAbi: MoveFunction = {
  name: "deposit_to_subaccount_at",
  visibility: "private",
  is_entry: true,
  is_view: false,
  generic_type_params: [],
  params: [
    "&signer",
    "address",
    "0x1::object::Object<0x1::fungible_asset::Metadata>",
    "u64",
  ],
  return: [],
};
```

**Parameters:**

* `signer` - The account signer
* `subaccount_address` - The Trading Account address to deposit to
* `asset_metadata` - The fungible asset metadata (USDC)
* `amount` - Amount in smallest unit (e.g., 1000000 = 1 USDC if 6 decimals)

**Example:**

<CodeGroup>
  ```typescript Typescript theme={null}
  const transaction = await aptos.transaction.build.simple({
    sender: account.accountAddress,
    data: {
      function: `${PACKAGE}::dex_accounts_entry::deposit_to_subaccount_at`,
      typeArguments: [],
      functionArguments: [
        "0x123...abc", // subaccountAddr
        "0x456...def", // usdcAddress (USDC metadata object address)
        1000000, // amount (1 USDC with 6 decimals)
      ],
    },
  });
  ```

  ```python Python theme={null}
  transaction = rest_client.build_transaction(
      sender=account.address(),
      payload={
          "function": f"{PACKAGE}::dex_accounts_entry::deposit_to_subaccount_at",
          "type_arguments": [],
          "function_arguments": [
              "0x123...abc",  # subaccountAddr
              "0x456...def",  # usdcAddress (USDC metadata object address)
              1000000,  # amount (1 USDC with 6 decimals)
          ],
      },
  )
  ```
</CodeGroup>
