# Buy item by name and send to specific tradelink

`GET /v1/buy-one-p2p-name`

Notes about trades and frequently asked questions

The duration of the trade in different situations:

If seller's info is invalid then it can be cancelled immediately and status 6 is set;

If seller's details are valid, but no trade is created, then it will auto-cancel after 6 minutes;

if created or waiting for mobile confirmation then it will auto-cancel after 11 to 15 min (depends on when created);

if trade is waiting for mobile confirmation and connection with the seller was lost then it will auto-cancel after 6 hours.

We recommend adding project_id to purchase so that you can track a trade in case of a timeout or break of purchase request using the /check-many-project-id GET method one minute after the request.

An array of possible messages with purchase errors and other information, such as status, can be seen by opening the response scheme, where:

System busy - trade is cancelled due to tradelink check timeout or heavy load;

buy_csgo - CS:GO purchases are deactivated on the market;

buy_rust - RUST purchases are deactivated on the market.

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

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api` | query | string | required | Your [WAXPEER API](https://waxpeer.com/profile/user) |
| `project_id` | query | string | optional | Your unique ID (string [50])

Allows to track your trades by project_id via /check-many-project-id |
| `name` | query | string | required | Name of an item you can also pass without extension which will buy the cheapest available |
| `token` | query | string | required | Token parameter from Steam tradelink |
| `price` | query | number | required | Item price (1000 = 1$) |
| `partner` | query | string | required | Partner parameter from Steam tradelink |
| `game` | query | enum | required | Which game would you like to buy items from |

## Example (curl)

```bash
curl -X GET 'https://api.waxpeer.com/v1/buy-one-p2p-name?api=%7B%7BAPI_KEY%7D%7D&project_id=my-shop-order-123&name=AK-47+%7C+Redline+%28Field-Tested%29&token=oFvyi0Ma&price=15000&partner=378049039&game=csgo'
```

## Example response

```json
{
  "success": true,
  "id": 1,
  "price": 720,
  "msg": "buy_csgo"
}
```

## Responses

- `200` successful operation

## 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.
- Do not use GET /v1/ready-to-transfer-p2p; use the [trade websocket](/websocket.md).
