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

# Get Linked Trade URLs

> Retrieve trade URLs for your main account and all linked accounts

## Overview

Returns the trade URLs for your main account and all linked Steam accounts. Useful for automated trading bots that need to send trade offers.

<Warning>
  Trade URLs are sensitive! Keep them private. Anyone with a trade URL can send trade offers to that account.
</Warning>

## Authentication

<ParamField header="X-API-Key" type="string" required>
  Your site API key
</ParamField>

## Rate Limit

**1 request per minute**

## Response

<ResponseField name="main_account" type="object">
  Main account trade URL information

  <Expandable title="Main Account Object">
    <ResponseField name="id64" type="string">
      Steam ID64 of the main account
    </ResponseField>

    <ResponseField name="trade_url" type="string">
      Full trade URL including token, or `null` if not set
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="linked_accounts" type="array">
  Array of linked account trade URL information

  <Expandable title="Linked Account Object">
    <ResponseField name="id64" type="string">
      Steam ID64 of the linked account
    </ResponseField>

    <ResponseField name="trade_url" type="string">
      Full trade URL including token, or `null` if not set
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.liquid.tf/api/dev/get_linked_trade_urls" \
    -H "X-API-Key: YOUR_SITE_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.liquid.tf/api/dev/get_linked_trade_urls', {
    headers: {
      'X-API-Key': 'YOUR_SITE_API_KEY'
    }
  });

  const data = await response.json();

  // Send trade offer to main account
  if (data.main_account.trade_url) {
    console.log('Main account:', data.main_account.id64);
    console.log('Trade URL:', data.main_account.trade_url);
  }

  // Send trade offers to linked accounts
  data.linked_accounts.forEach(account => {
    if (account.trade_url) {
      console.log('Linked account:', account.id64);
      console.log('Trade URL:', account.trade_url);
    }
  });
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.liquid.tf/api/dev/get_linked_trade_urls',
      headers={'X-API-Key': 'YOUR_SITE_API_KEY'}
  )

  data = response.json()

  # Send trade offer to main account
  if data['main_account']['trade_url']:
      print(f"Main: {data['main_account']['id64']}")
      print(f"URL: {data['main_account']['trade_url']}")

  # Send trade offers to linked accounts
  for account in data['linked_accounts']:
      if account['trade_url']:
          print(f"Linked: {account['id64']}")
          print(f"URL: {account['trade_url']}")
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "main_account": {
      "id64": "76561198000000000",
      "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=123456&token=ABCDEF12"
    },
    "linked_accounts": [
      {
        "id64": "76561198000000001",
        "trade_url": "https://steamcommunity.com/tradeoffer/new/?partner=123457&token=GHIJKL34"
      },
      {
        "id64": "76561198000000002",
        "trade_url": null
      }
    ]
  }
  ```
</ResponseExample>

## When Trade URLs Are Null

A `trade_url` will be `null` if:

* The account hasn't set a trade URL via [Set Trade URL](/api-reference/user/set-trade-url)
* The trade URL was removed or invalidated

Make sure to check for `null` values before attempting to send trade offers.

## Use Cases

* Automated trading bots sending trade offers
* Multi-account management systems
* Validating trade URLs are set before creating listings
* Sending trade offers to specific linked accounts

## Security

<Warning>
  **Keep trade URLs private!** Do not log them in plain text or expose them in your application UI. Store securely and only use for sending trade offers.
</Warning>
