# Fetch trades that need to be sent (Deprecated)

`GET /v1/ready-to-transfer-p2p`

> **Deprecated.** Use Trade websocket instead.

Connecting to the trade websocket is required to sell items (included in the extension and official app).

If your connection is unstable (such as public Wi-Fi or mobile data), your trade websocket connection can be interrupted and the creation of a trade event may be missed.

In order not to miss the sending of a trade you should be making this request at least every minute.

Please check send_until timestamp before creating trade in Steam (we do not recommend creating a trade if one minute or less is left).

[Trade websocket documentation is published here.](//docs.waxpeer.com/?method=websocket)

Prices are integers. `1000` = `1 USD`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `steam_api` | query | string | required | Your [Steam API key](https://steamcommunity.com/dev/apikey) |

## Example (curl)

```bash
curl -X GET 'https://api.waxpeer.com/v1/ready-to-transfer-p2p?steam_api=YOUR_STEAM_API_KEY'
```

## Example response

```json
{
  "id": 1,
  "costum_id": "string",
  "trade_id": "3547735377",
  "tradelink": "https://steamcommunity.com/tradeoffer/new/?partner=14221897&token=i2yUssgF",
  "trade_message": "string",
  "done": false,
  "stage": 1,
  "creator": "seller",
  "send_until": "2022-10-30T15:18:46.566Z",
  "last_updated": "2022-10-30T15:13:08.139Z",
  "for_steamid64": "76561198338314XXX",
  "user": {
    "id": "182dbd1c-2es6-470s-z1q2-627xa6207211",
    "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/16/1622081f90ef78b0ca1372cae7663a2592939e00_medium.jpg"
  },
  "seller": {
    "id": "282dbd1c-2es6-470s-z1q2-627xa6207212",
    "avatar": "https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/16/1622081f90ef78b0ca1372cae7663a2592939e00_medium.jpg"
  },
  "items": [
    {
      "id": 4258189,
      "item_id": 27165625733,
      "give_amount": 25926,
      "merchant": "string",
      "image": "https://steamcommunity-a.akamaihd.net/economy/image/class/730/5041964706/200fx125f",
      "price": 27581,
      "game": "csgo",
      "name": "AWP | Neo-Noir (Minimal Wear)",
      "status": 0
    }
  ],
  "unlock_at": 1783166400
}
```

## Responses

- `200` successful operation

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | number | optional | Waxpeer trade id |
| `costum_id` | string | optional |  |
| `trade_id` | string | optional |  |
| `tradelink` | string | optional | Your partners Steam tradelink |
| `trade_message` | string | optional | Trade message |
| `done` | boolean | optional | Is trade closed by our system |
| `stage` | number | optional | 11: reserved, waiting for the Steam trade lock to expire. Any other value: the lock has expired and delivery is in progress. |
| `creator` | string | optional | Who will create trade (buyer/seller). In most cases - seller |
| `send_until` | string | optional | Time when the trade will expire |
| `last_updated` | string | optional | Time when the trade was updated |
| `for_steamid64` | string | optional | Your partners Steam id64 |
| `user` | object | optional |  |
| `user.id` | string | optional | User id in our system |
| `user.avatar` | string | optional |  |
| `seller` | object | optional |  |
| `seller.id` | string | optional | Seller id in our system |
| `seller.avatar` | string | optional |  |
| `items` | array<object> | optional |  |
| `items.id` | number | optional | Waxpeer id of trade obtained during executing buy request |
| `items.item_id` | string | optional | Steam item id before trade |
| `items.give_amount` | number | optional | Item price without fee (1000 = 1$) |
| `items.merchant` | string | optional | Merchant identifier |
| `items.image` | string | optional | Item image |
| `items.price` | number | optional | Item price (1000 = 1$) |
| `items.game` | string | optional | What game the item is from |
| `items.name` | string | optional | Item name |
| `items.status` | number | optional | Status of the trade:   6->Declined and refunded  5->Completed  4->Trade sent and can be accepted  2->Waiting for seller to confirm trade on mobile  1->Processing and creating the trade  0->Waiting for user to buy more items and if the user doesn't buy more items then the status will automatically change with in a certain period |
| `unlock_at` | number | optional | Epoch seconds when the Steam trade lock ends. Same clock as the withdraw webhook send_until. null on a regular trade. |


## Notes for agents

- Auth is the query parameter `api`, not an Authorization header.
- See [/statuses.md](/statuses.md) for numeric trade status plus `escrow_status` / `release_date`.
- Prefer GET /v2/search-items-by-name over v1.
- Prefer GET /v2/get-items-list over v1 (cursor keyset pagination without the 5000 row cap). Pass next_cursor only while has_more is true.
- Prefer POST /v2/my-history over v1 (faster on long histories, ordered by trade id). On buy rows, price is the amount you paid.
- Trade-locked listings are omitted unless you pass include_hold=1. They then include unlock_at and send_until (RFC 3339 UTC).
- Buy a trade-locked listing only by exact item_id with allow_trade_locked (query 1 on GET /v1/buy-one-p2p, body true on POST /v1/buy). GET /v1/buy-one-p2p-name never sells hold items.
- CSV snapshot: GET /v1/prices/snapshot?format=csv (gzip). include_hold appends unlock_at,send_until. compact and whitemarket are JSON-only.
- Do not use GET /v1/ready-to-transfer-p2p; use the [trade websocket](/websocket.md).
